r/ScientificComputing 22d ago

PhysCC: A DSL Compiler for Physics Simulations (SYCL, MPI, AVX2)

I’ve been working on PhysCC, an open-source tool designed to bridge the gap between high-level physics equations and low-level hardware optimization.

The problem: Writing boilerplate for SYCL, MPI, or AVX2 stencils is tedious. The solution: You write a simple equation like u = u + dt * lap(u) and PhysCC generates the optimized backend code.

Key Features:

  • Multi-backend support (Single-core, OpenMP, MPI, SYCL, CUDA).
  • AI-informed pass: It analyzes the PDE type (Hyperbolic, Parabolic, Elliptic) and suggests optimal work-group sizes for Intel Iris Xe.
  • Built-in visualization script for heatmaps.

It’s still a work in progress, but I’d love to hear your thoughts on the codegen or the feature extraction logic!
https://github.com/NikosPappas/PhysCC

9 Upvotes

2 comments sorted by

1

u/SamPost 17d ago

I only got as far as looking at the MPI code generator, which just does a sendrcv swap for the halo exchange. That is very far from optimized. Not even non-blocking, overlapped communications; which I teach to beginner programmers.

This smells a little bit vibe-coded. Not that I am sure without looking further, or that that is a crime. But, it doesn't inspire confidence that this is useful for anyone that cares about performance.

1

u/Pure_Treat6246 17d ago

First,thank you for your review.Indeed,some parts are vibe-coded.I only made this projects just as a starting point for other to move on.That is why I have made it so far. As for the performance ,the only think I could do is give options command line argument,for each option,rather MPI,OPENMP,or CUDA to use.Thank you again for your time inspecting the source code.