GPU build of GROMACS
With GROMACS we can side-step some thorny issues for now since GROMACS can be built for multiple NVIDIA compute capabilities at the same time (see https://manual.gromacs.org/documentation/current/install-guide/index.html#cuda-gpu-acceleration). Some interesting points to note:
-
This can be done either with the GMX_CUDA_TARGET_SM or GMX_CUDA_TARGET_COMPUTE CMake variables, which take a semicolon delimited string with the two digit suffixes of CUDA (virtual) architectures names, for instance “60;75;86”.
We should probably make some choices about what our own default targets are
-
to reduce build time and binary size we do not generate code for every single possible architecture
It's probably worth us checking the size of the final binaries to see if they are outrageous.
-
We probably want cuFFTmp (though there are a number of options for FFT)
-
With
GMX_MPI=ON
, GROMACS attempts to automatically detect GPU support in the underlying MPI library at compile time, and enables direct GPU communication when this is detected. However, there are some cases when GROMACS may fail to detect existing GPU-aware MPI support, in which case it can be manually enabled by setting environment variableGMX_FORCE_GPU_AWARE_MPI=1
at runtimeGiven our unusual way of building OpenMPI with GPU support, we should check this