Gromacs
Gromacs. A free and open-source software suite for high-performance molecular dynamics and output analysis. There are two versions of gromacs 2024.5, the CPU version and de GPU version.
Usage CPU version
Example script : test-gromacs-cpu.sh
#!/bin/sh
#SBATCH --job-name=test-gromacs-cpu
#SBATCH --output=test-gromacs-cpu-%j.out
#SBATCH --error=test-gromacs-cpu-%j.err
#SBATCH -p thin
#SBATCH -N 1
#SBATCH --ntasks-per-node=16
# load CPU version
module load gromacs/gromacs-2024.5_cpu
export OMP_NUM_THREADS=16
mpirun $GROMACS_BIN/./gmx_mpi --help
echo "done!"
Submit with :
sbatch --account=your_project_ID test-gromacs-cpu.sh
Usage GPU version
Example script : test-gromacs-gpu.sh
#!/bin/sh
#SBATCH --job-name=test-gromacs-gpu
#SBATCH --output=test-gromacs-gpu-%j.out
#SBATCH --error=test-gromacs-gpu-%j.err
#SBATCH -p ada
#SBATCH -N 1
#SBATCH --ntasks-per-node=16
#SBATCH --gres=gpu:4
# load gromacs with GPU support
module load gromacs/gromacs-2024.5_gpu
nvidia-smi -L
export CUDA_VISIBLE_DEVICES=0,1,2,3
export OMP_NUM_THREADS=16
export GMX_ENABLE_DIRECT_GPU_COMM=1
export GMX_FORCE_UPDATE_DEFAULT_GPU=true
mpirun $GROMACS_BIN/./gmx_mpi --help
echo "done!"
Submit with :
sbatch --account=your_project_ID test-gromacs-gpu.sh
Gromacs 2020.5
Example script : test-gromacs-cpu.sh
#!/bin/sh
#SBATCH --job-name=test-gromacs-cpu
#SBATCH --output=test-gromacs-cpu-%j.out
#SBATCH --error=test-gromacs-cpu-%j.err
#SBATCH -p thin
#SBATCH -N 1
#SBATCH --ntasks-per-node=16
# load CPU version
module load gromacs/gromacs-2020.5_cpu
export OMP_NUM_THREADS=16
# also available for single and double precission
# $GROMACS_SINGLE_BIN/./gmx_mpi --help
# $GROMACS_DOUBLE_BIN/./gmx_mpi_d --help
mpirun $GROMACS_BIN/./gmx_mpi --help
echo "done!"
Submit with :
sbatch --account=your_project_ID test-gromacs-cpu.sh
Example script : test-gromacs-gpu.sh
#!/bin/sh
#SBATCH --job-name=test-gromacs-gpu
#SBATCH --output=test-gromacs-gpu-%j.out
#SBATCH --error=test-gromacs-gpu-%j.err
#SBATCH -p ada
#SBATCH -N 1
#SBATCH --ntasks-per-node=16
#SBATCH --gres=gpu:4
# load gromacs with GPU support
module load gromacs/gromacs-2020.5_gpu
nvidia-smi -L
export CUDA_VISIBLE_DEVICES=0,1,2,3
export OMP_NUM_THREADS=16
export GMX_ENABLE_DIRECT_GPU_COMM=1
export GMX_FORCE_UPDATE_DEFAULT_GPU=true
mpirun $GROMACS_BIN/./gmx_mpi --help
echo "done!"
Submit with :
sbatch --account=your_project_ID test-gromacs-gpu.sh
More info :