Hi! If you’re building DPC++ itself, just build it with OpenMP:
python3 ../buildbot/configure.py --llvm-external-projects=openmp [whatever other options]
After building and installing it, GROMACS should detect OpenMP support without any extra flags (you might want to purge GROMACS’s CMake cache in the build directory).
Note: Open-source DPC++ and Unified Runtime are moving fast, so beware of bugs or API changes when using the tip of sycl branch (or any of the nightly snapshots for that matter).
After trying that, I’m still having the same issue. (Tried to make a fresh build)
CMake Error at cmake/gmxManageOpenMP.cmake:50 (message):
The compiler you are using does not support OpenMP parallelism. This might
hurt your performance a lot, in particular with GPUs. Try using a more
recent version, or a different compiler. If you don't want to use OpenMP,
disable it explicitly with -DGMX_OPENMP=OFF
Call Stack (most recent call first):
CMakeLists.txt:432 (include)
There seems to be something off with the dpc++ build as I cannot find libomp.so anywhere.
After building, I have ./projects/openmp/runtime/src/omp.h and ./lib/libomp.so in the build directory. Installing puts them to {install_prefix}/lib/clang/19/include/omp.h and {install_prefix}/lib/x86_64-unknown-linux-gnu/libomp.so.
I have omp.h at /build_default/projects/openmp/runtime/src
No libomp.so at /build_default/lib
No omp.h at /build_default/install/lib/clang/19/include
No libomp.so (and not any directories) at /build_default/install/lib
By looking at ccmake, I have CLANG_DEFAULT_OPENMP_RUNTIME libomp, LLVM_ENABLE_PROJECTS clang;sycl;llvm-spirv;opencl;xpti;xptifw;libdevice;sycl-jit;openmp
Could openmp library be somehow statically linked? Anyway, gromacs still complains about the lacking support.
Could openmp library be somehow statically linked?
The OpenMP library could perhaps be statically linked to the application (GROMACS), but building Clang should still produce a library file (libomp.so or libomp.a) for that linking to happen. We’re not linking OpenMP to Clang; we build OpenMP library that should later be linked to GROMACS.
Hmm, I’m really bad at setting up LLVM, but here is what I got
IMO, that is a question better answered at intel/llvm · Discussions · GitHub. The problem is that LLVM does not build OpenMP, that’s not related to GROMACS.
That said, compared to your example, I usually directly call