Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: GROMACS 2024.2 with NVSHMEM & cuFFTMp fixes for Slingshot #146

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/uenv-gromacs.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,30 @@ The `plumed` view contains GROMACS 2022.5 (older version) with PLUMED 2.9.0. Thi

The `gromacs` view contains the newest GROMACS 2024.1 that has been configured and tested for the highest performance on the Grace-Hopper nodes.

### Build from Source

Users that require customized variants of the packages can build their own using the `develop` view. One can use the following set of commands to do the same.

```bash
uenv start gromacs/2024:v1

# this sets PATH, LD_LIBRARY_PATH and PKG_CONFIG_PATH with the dependencies of gromacs and plumed
uenv view develop

# load GROMACS source from repo/tarball and cd to it
mkdir build
cd build
CXX=mpic++ CC=mpicc ftn=mpif90
cmake .. -DGMX_MPI=on -DGMX_GPU=CUDA -DGMX_SIMD=ARM_NEON_ASIMD
make
make check
make install
source /usr/local/gromacs/bin/GMXRC

# same for plumed
# set CXX, etc and call the build system
```

### How to Run

To start a job, 2 bash scripts are required: a standard SLURM submission script, and a wrapper to start the CUDA MPS daemon (in order to have multiple MPI ranks per GPU).
Expand Down
5 changes: 5 additions & 0 deletions recipes/gromacs/2024.2/gh200-mpi/compilers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bootstrap:
spec: gcc@12
gcc:
specs:
- [email protected]
7 changes: 7 additions & 0 deletions recipes/gromacs/2024.2/gh200-mpi/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: gromacs-gh200
store: /user-environment
description: GPU-optimised GROMACS with and without PLUMED, and the toolchain to build your own GROMACS.
spack:
repo: https://github.com/spack/spack.git
commit: v0.22.0
modules: false
35 changes: 35 additions & 0 deletions recipes/gromacs/2024.2/gh200-mpi/environments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
gromacs:
compiler:
- toolchain: gcc
spec: [email protected]
unify: when_possible
specs:
- cmake
- cuda
- [email protected]
- blas
- lapack
- hwloc
- fftw
- [email protected]
- [email protected] +cuda +mpi +hwloc +cufftmp
- [email protected] +cuda ~shared +mpi +hwloc +cufftmp +plumed
mpi:
spec: [email protected]
gpu: cuda
variants:
- +mpi
- +cuda
- cuda_arch=90
views:
develop:
exclude: ['gromacs']
gromacs:
exclude: ['gromacs+plumed']
link: run
plumed:
exclude: ['[email protected]']
link: run
packages:
- perl

23 changes: 23 additions & 0 deletions recipes/gromacs/2024.2/gh200-mpi/modules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
modules:
# Paths to check when creating modules for all module sets
prefix_inspections:
bin:
- PATH
lib:
- LD_LIBRARY_PATH
lib64:
- LD_LIBRARY_PATH

default:
arch_folder: false
# Where to install modules
roots:
tcl: /user-environment/modules
tcl:
all:
autoload: none
hash_length: 0
exclude_implicits: true
exclude: ['%[email protected]', 'gcc %[email protected]']
projections:
all: '{name}/{version}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/cmake/gmxDetectCpu.cmake
+++ b/cmake/gmxDetectCpu.cmake
@@ -83,7 +83,7 @@ function(gmx_run_cpu_detection TYPE)
set(GCC_INLINE_ASM_DEFINE "-DGMX_X86_GCC_INLINE_ASM=0")
endif()

- set(_compile_definitions "${GCC_INLINE_ASM_DEFINE} -I${PROJECT_SOURCE_DIR}/src -DGMX_CPUINFO_STANDALONE ${GMX_STDLIB_CXX_FLAGS} -DGMX_TARGET_X86=${GMX_TARGET_X86_VALUE}")
+ set(_compile_definitions ${GCC_INLINE_ASM_DEFINE} -I${PROJECT_SOURCE_DIR}/src -DGMX_CPUINFO_STANDALONE ${GMX_STDLIB_CXX_FLAGS} -DGMX_TARGET_X86=${GMX_TARGET_X86_VALUE})
set(LINK_LIBRARIES "${GMX_STDLIB_LIBRARIES}")
try_compile(CPU_DETECTION_COMPILED
"${PROJECT_BINARY_DIR}"

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/cmake/gmxDetectSimd.cmake
+++ b/cmake/gmxDetectSimd.cmake
@@ -77,7 +77,7 @@ function(gmx_suggest_simd _suggested_simd)
else()
set(GMX_TARGET_X86_VALUE 0)
endif()
- set(_compile_definitions "${GCC_INLINE_ASM_DEFINE} -I${CMAKE_SOURCE_DIR}/src -DGMX_CPUINFO_STANDALONE ${GMX_STDLIB_CXX_FLAGS} -DGMX_TARGET_X86=${GMX_TARGET_X86_VALUE}")
+ set(_compile_definitions ${GCC_INLINE_ASM_DEFINE} -I${CMAKE_SOURCE_DIR}/src -DGMX_CPUINFO_STANDALONE ${GMX_STDLIB_CXX_FLAGS} -DGMX_TARGET_X86=${GMX_TARGET_X86_VALUE})

# Prepare a default suggestion
set(OUTPUT_SIMD "None")
Loading