DPC++ extremely long linking time and include warnings

GROMACS version: latest
GROMACS modification: Yes
Here post your question

Hi,
I have built gromacs with open source version of DPC++ and I’m having couple of issues.

While building, there is a wall of include warnings:

...
clang++: warning: no such include directory: '/home/tapio/PROJECT/repositories/gromacs-tn/src/gromacs/trajectory/include' [-Wmissing-include-dirs]
clang++: warning: no such include directory: '/home/tapio/PROJECT/repositories/gromacs-tn/src/gromacs/trajectoryanalysis/include' [-Wmissing-include-dirs]
clang++: warning: no such include directory: '/home/tapio/PROJECT/repositories/gromacs-tn/src/gromacs/analysisdata/include' [-Wmissing-include-dirs]
clang++: warning: no such include directory: '/home/tapio/PROJECT/repositories/gromacs-tn/src/gromacs/applied_forces/include' [-Wmissing-include-dirs]
...

Which seems strange as those paths should not exist. Anyway, build proceeds to the end and Gromacs works fine.

Another issue is that linking of libgromacs is extremely slow (couple of minutes). This is frustrating as I’m modifying gromacs and need to constantly recompile.

I have tried building Gromacs with standard Clang 19, and these issues don’t show up with it (it will recompile in couple of seconds).

I have compiled the DPC++ with following options:

-DLLVM_ENABLE_RUNTIMES=openmp
-DBUILD_SHARED_LIBS=ON
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_PARALLEL_LINK_JOBS=64 
-DOPENMP_ENABLE_LIBOMPTARGET=OFF 
-DLLVM_STATIC_LINK_CXX_STDLIB=ON

Any ideas what could be causing these issues?

Thanks,

Tapio

Yes, it’s a new warning introduced in Clang 19, not yet addressed in GROMACS. Nothing to worry about, will be fixed in GROMACS 2025. You can add a compiler flag to silence it or apply the patch to your codebase.

That’s how DPC++ compiler works, a lot of GPU code optimization is happening at the linking step, so each time it’s processing all 100+ GPU kernels over again. Not much can be done as far as I know (and last time I checked, linking parallelism did not help).

1 Like

Great answers, thanks again!