GROMACS version: 2021
GROMACS modification: Yes/No
Here post your question
I am installing gromacs with Clang and Clang++ (for SYCL) complier for a system with Nvidia gpu’s. While installation it ask me for g++ for c++ complier and clang++ is not able to pass the test. Please let me know if anyone has done these type of installation.
Thank you
GROMACS 2023 is known to work on NVIDIA cards via SYCL (with both Intel DPC++ and hipSYCL); however, CUDA is strongly recommended for production runs instead.
If you encounter an error with GROMACS 2023, could you please share the commands you are using and the error message?
Please, share the cmake command you used and your system configuration (OS, CUDA and oneAPI/DPC++ versions, etc). The error message by itself is not very telling.
Per Codeplay troubleshooting guide, you should add -fdenormal-fp-math=ieee compilation flag. For GROMACS, it can be done by setting -DSYCL_CXX_FLAGS_EXTRA='-fsycl-targets=nvptx64-nvidia-cuda;-Xclang;-fdenormal-fp-math=ieee' instead of the shorter version you have.
Note 1: please add -DGMX_GPU_NB_CLUSTER_SIZE=8 to your cmake command; otherwise the GPU code will not work correctly.
Note 2: Depending on how you installed oneAPI and your CMake version, you might get the following warning during CMake execution: “To use GPU acceleration efficiently, mdrun requires OpenMP multi-threading, which is currently not enabled.” In this case, it is recommended also to add -DCMAKE_C_FLAGS=-isystem/opt/intel/oneapi/compiler/latest/linux/compiler/include/ -DCMAKE_CXX_FLAGS=-isystem/opt/intel/oneapi/compiler/latest/linux/compiler/include/ flags to cmake.
Unfortunately, SYCL is a new technology, and automatic detection of the necessary build flags does not always work smoothly yet.
P.S.: I edited the topic title to make it more searchable.
In was installing it on Ubuntu 22.04 the with the same flags and got this error
– The CXX compiler identification is IntelLLVM 2023.0.0
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - failed
– Check for working CXX compiler: /opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm/clang++
– Check for working CXX compiler: /opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm/clang++ - broken
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
Could you please also provide Software versions and full logs (not just the last item)? It might also matter how you compiled GROMACS and what GPU you’re running on.
it runs, if I match the number of cpu cores to the flag ntmpi i.e if I set it to 16. The system has v100 nvidia gpu with 16 cpu cores. Gromacs version is 2023.1, also could we enable the OpenMP support for SYCL version.
Sure. OpenMP is highly recommended to use with GPU builds. I would not expect it to be relevant for the issue you’re observing, but (a) OpenMP is needed for good performance in most cases, (b) non-OpenMP GPU builds receive very limited testing.
So, you are running non-OpenMP build of GROMACS 2023.1 with oneAPI ??? and Codeplay plugin version ???, CUDA version ???, and it works fine when you use -ntmpi 16, but with lower number of ranks it hangs? Could you please attach the full output when GROMACS is run with SYCL_PI_TRACE=2, like below?