r/ScientificComputing • u/Pure_Treat6246 • 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
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.