Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
doku:gromacs [2014/11/04 15:35] shdoku:gromacs [2022/06/23 13:24] msiegel
Line 1: Line 1:
-===== GROMACS 5.0.1 ===== +====== GROMACS ======
-==== Installation VSC-1 (MPI-parallel) ====+
  
-1. Make sure we use a recent version of the Intel MPI toolchain. +===== GPU Partition =====
-<code> +
-mpi-selector --query +
-mpi-selector --list  +
-... in case  +
-mpi-selector --set intel_mpi_intel64-4.1.1.036 +
-exit +
-relogin +
-</code>+
  
-2Follow [[http://www.gromacs.org/Documentation/Installation_Instructions_4.5/Cmake|Instructions-Cmake]] +First you have to decide on which hardware GROMACS should run, we call 
-and prepare for installation, ie create two separate directoriesone for building the other for the actual installation. +this a ''partition'', described in detail at On a login node, type 
-<code> +''sinfo'' to get a list of the available partitionsBe aware that each 
-cd /opt/sw/ +setup has different hardware, for example the partition 
-wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-5.0.1.tar.gz +''gpu_gtx1080single'' on VSC3 has 1 GPU and single socket à 4 cores, 
-gunzip ./gromacs-5.0.1.tar.gz +with 2 hyperthreads each core, listed at [[doku:vsc3gpuqos | GPU Partitions on VSC3]]
-tar xvf ./gromacs-5.0.1.tar +The partition has to be set in the batch script, see the example 
-gzip gromacs-5.0.1.tar +belowThus here it makes sense to let GROMACS run on 8 threads 
-mv ./gromacs-5.0.1 ./gromacs-5.0.1_mpi +(''-ntomp 8''), yet it makes little sense to force more threads than 
-chown -R root ./gromacs-5.0.1_mpi  +that, as this would lead to oversubscribingGROMACS decides mostly on 
-chgrp -R root ./gromacs-5.0.1_mpi +its own how it wants to work, so don't be surprised if it ignores 
-rm -rf ./gromacs-5.0.1_mpi_build   ( delete all previous attempts and restart from scratch ) +settings like environment variables.
-mkdir  ./gromacs-5.0.1_mpi_build +
-cd ./gromacs-5.0.1_mpi_build +
-</code>+
  
-3Download the latest version of ''fftw'' and install single and +=== Batch Script === 
-double precision versions of it. For future CUDA compatibility   +In order to be scheduled efficiently with [[doku:slurm | SLURM]], one writes a ''shell 
-''gcc'' is preferred over ''icc'' for this step. +script'' (see the text file ''myscript.sh'' below) consisting of
-<code> +  
-cd /opt/sw/fftw +  * some SLURM parameters: the ''#BATCH ...'' part) 
-cp from/where/ever/it/is/fftw-3.3.4.tar.gz  ./ +  * exporting environment variables: ''export CUDA_VISIBLE_DEVICES=0'' 
-gunzip ./fftw-3.3.4.tar.gz +  * cleaning the environment: ''module purge'' 
-tar xvf ./fftw-3.3.4.tar +  * loading modules: ''load gcc/7.3 ...'' 
-gzip fftw-3.3.4.tar +  * last but not least starting the program in question: ''gmx_mpi ...''
-cd ./fftw-3.3.4 +
-./configure --help +
-export CC=gcc +
-export F77=gfortran +
-./configure --prefix=/opt/sw/fftw/fftw-3.3.4 --enable-shared --enable-single --enable-openmp  --enable-sse2 +
-make clean +
-make +
-make install +
-</code>+
  
-4. Do the CMAKE build, +<code sh myscript.sh
-<code> +#!/bin/bash 
-cd /opt/sw/gromacs-5.0.1_mpi_build +#SBATCH --job-name=myname 
-export CMAKE_PREFIX_PATH=/opt/sw/fftw/fftw-3.3.4 +#SBATCH --partition=gpu_gtx1080single 
-export FFTW_LOCATION=/opt/sw/fftw/fftw-3.3.4 +#SBATCH --gres=gpu:1 
-export CC=mpiicc +#SBATCH --nodes=1
-export CXX=mpiicpc +
-/opt/sw/cmake/2.8.11/bin/cmake -DGMX_GPU=OFF -DFFTW3F_INCLUDE_DIR=$FFTW_LOCATION/include -DFFTW3F_LIBRARIES=$FFTW_LOCATION/lib/libfftw3f.a -DCMAKE_INSTALL_PREFIX=/opt/sw/gromacs-5.0.1_mpi -DGMX_X11=OFF -DCMAKE_C_COMPILER=mpiicc -DCMAKE_CXX_COMPILER=mpiicpc -DGMX_MPI=ON -DGMX_PREFER_STATIC_LIBS=ON ../gromacs-5.0.1_mpi  >&   ./cmake.log +
-make +
-make install   ( only this step creates all the executables in /opt/sw/gromacs-5.0.1_mpi/bin, as symbolic links though ) +
-</code>+
  
 +unset OMP_NUM_THREADS
 +export CUDA_VISIBLE_DEVICES=0
  
 +module purge
 +module load gcc/7.3 nvidia/1.0 cuda/10.1.168 cmake/3.15.4 openmpi/4.0.5 python/3.7 gromacs/2021.2_gtx1080
  
- +gmx_mpi mdrun -s topol.tpr
- +
- +
- +
- +
-==== GROMACS with gpu support ==== +
- +
-up to version 4.5.x openmm is needed for gpu support. For versions from 4.6.x on gpu support is included in gromaces source already. +
- +
-On VSC-1 Gromacs was built with this cmake command (specifying mpiiccc and mpiicpc did not work here, -DGMX_MPI=ON is enough for compiling with MPI support): +
- +
-<code> +
- +
-CC=icc CXX=icpc /opt/sw/cmake/2.8.11/bin/cmake -DGMX_GPU=ON -DGMX_MPI=ON -DCMAKE_INSTALL_PREFIX=/opt/sw/gromacs/4.6.5_gpu -DFFTWF_LIBRARY=/opt/sw/fftw/3.3.3_sp/lib/libfftw3f.so -DFFTWF_INCLUDE_DIR=/opt/sw/fftw/3.3.3_sp/include .+
 </code> </code>
  
 +Type ''sbatch myscript.sh'' to submit such a batch script to [[doku:SLURM]]. you
 +get the job id, and your job will be scheduled, and executed
 +automatically.
  
-There might be a problem coming from CUDA, where the intel compiler version is checked. In this case uncomment this part in the /opt/sw/cuda-5.5/include/host_config.h  file 
  
-<code> +=== CPU GPU Load ===
-//#if defined(__ICC)+
  
-//#if !(__INTEL_COMPILER == 9999 && __INTEL_COMPILER_BUILD_DATE == 20110811) || !defined(__GNUC__) || !defined(__LP64__)+There is a whole page dedicated to [[doku:monitoring]] the CPU and GPU, for 
 +GROMACS the relevant sections are section [[doku:monitoring#Live]] Live and [[doku:monitoring#GPU]].
  
-//#error -- unsupported ICC configuration! Only ICC 12.1 on Linux x86_64 is supported!+=== Performance ===
  
-//#endif /* !(__INTEL_COMPILER == 9999 && __INTEL_COMPILER_BUILD_DATE == 20110811|| !__GNUC__ || !__LP64__ */+As an example we ran ''gmx_mpi mdrun -s topol.tpr'' with different 
 +options, where ''topol.tpl'' is just some sample topology, we don'
 +actually care about the result. Without any options GROMACS already 
 +runs fine (a). Setting the number of tasks (b,c) is not needed; if set 
 +wrong can even slow the calculation down significantly (over 
 +provisioning)! Enforcing pinning also does not show any effects (d), 
 +we assume that the tasks are pinned automatically already. The only 
 +improvement we had was using the ''-update gpu'' option, which puts more 
 +load on the GPU. This might not work however if we use more than one 
 +GPU.
  
-//#endif /* __ICC * +^ cmd         ^ ns day ^ cpu load % ^ gpu load % ^ notes                               ^ 
-</code>+| a | --          | 160    | 100   | 80        |                                    | 
 +| b | -ntomp 8    | 160    | 100   | 80        |                                    | 
 +| c | -ntomp 16   | 140    | 40    | 70        | gromacs warning: over provisioning | 
 +| d | -pin on     | 160    | 100   | 80        |                                    | 
 +| e | -update gpu | 170    | 100   | 90        |                                    |
  
  • doku/gromacs.txt
  • Last modified: 2023/11/23 12:27
  • by msiegel