Skip to content

Commit fced282

Browse files
kanduriPrashanth Kanduri
andauthored
add docs on building GROMACS from source (#126)
Co-authored-by: Prashanth Kanduri <[email protected]>
1 parent 998108c commit fced282

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

docs/software/sciapps/gromacs.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,43 @@ Protein atoms = 86,996 Lipid atoms = 867,784 Water atoms = 2,041,230 Ions = 1
159159
- If the problem allows the integration step to take place on the GPU with `-update gpu`, that can lead to significant performance and scaling gains as it allows an even greater part of the computations to take place on the GPU.
160160
- A single node of the GH200 cluster offers 4x CPU+GPU. For problems that can benefit from scaling beyond a single node, use the flag `export FI_CXI_RX_MATCH_MODE=software` in the SBATCH script. The best use of resources in terms of node-hours might be achieved on a single node for most simulations.
161161

162+
### Building GROMACS from Source
163+
164+
The [GROMACS] uenv provides all the dependencies required to build GROMACS from source, with several optional features enabled. This approach is particularly useful for deploying customized variants of GROMACS. You can follow these steps to build GROMACS from source:
165+
166+
```bash
167+
uenv start --view=develop <GROMACS_UENV> # (1)!
168+
169+
cd <PATH_TO_GROMACS_SOURCE> # (2)!
170+
171+
mkdir build && cd build
172+
cmake \
173+
-DCMAKE_C_COMPILER=gcc \
174+
-DCMAKE_CXX_COMPILER=g++ \
175+
-DGMX_MPI=on \
176+
-DGMX_GPU=CUDA \
177+
-GMX_CUDA_TARGET_SM="90" \ # for the Hopper GPUs
178+
-DGMX_SIMD=ARM_NEON_ASIMD \ # for the Grace CPUs
179+
-DGMX_DOUBLE=off \ # turn on double precision only if useful
180+
-DCMAKE_INSTALL_PREFIX=/custom/gromacs/install/path
181+
..
182+
183+
make
184+
make check
185+
make install
186+
source /custom/gromacs/install/path/bin/GMXRC
187+
```
188+
189+
1. Start the GROMACS uenv and load the `develop` view (which provides all the necessary dependencies)
190+
191+
2. Go to the GROMACS source directory
192+
193+
See [GROMACS Installation Guide] for more details, especially on special configurations.
194+
162195
## Further documentation
163196

164197
* [GROMACS Homepage][GROMACS]
165198
* [GROMACS Manual](https://manual.gromacs.org/2024.1/index.html)
166199

167-
[GROMACS]: https://www.gromacs.org
200+
[GROMACS]: https://www.gromacs.org
201+
[GROMACS Installation Guide]: https://manual.gromacs.org/current/install-guide/index.html

0 commit comments

Comments
 (0)