Amber is developed by: David Case at Rutgers University, Tom Cheatham at the University of Utah, Ken Merz at Michigan State University, Adrian Roitberg at the University of Florida, Carlos Simmerling at SUNY-Stony Brook, Scott LeGrand at NVIDIA, Darrin York at Rutgers University, Ray Luo at UC Irvine, Junmei Wang at the University of Pittsburgh, Maria Nagan at Stony Brook, Ross Walker at GSK, and many others. Amber was originally developed under the leadership of Peter Kollman.
For basic information about setting up an Amber job, see the Amber manual and the Amber tutorials .
Considerations for Amber jobs on rhel8:
The following sub-tabs have examples for each version with their cooresponding dependency builds:
Amber version 20 is built with both CPU and GPU compatibility
Amber/20-gpu is compiled to run on a100, v100x, v100, and p100 GPU types
#!/bin/bash module load amber/20-gpu export CUDA_VISIBLE_DEVICES=0 $AMBERHOME/bin/pmemd.cuda -O -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPUFor GPU jobs, you can submit with the following:
sbatch -p gpu --gres=gpu:a100:1 --ntasks-per-core=1 gpu.testSample MPI batch script for amber/20.gcc
#!/bin/bash module load amber/20.gcc mpirun -np $SLURM_NTASKS $AMBERHOME/bin/pmemd.MPI -O -i mdin.CPU -o mdout.CPU -p prmtop -c inpcrd -r restrt.CPU -x mdcrd.CPU
sbatch --ntasks=# --ntasks-per-core=1 --nodes=1 cpu.test #ntasks < 16 sbatch -p multinode --ntasks=# --ntasks-per-core=1 cpu.test #ntasks > 16where:
| -p multinode | Submit to the multinode partition where all nodes are Infiniband-connected |
| --ntasks # | the number of MPI processes you wish to run. |
| --ntasks-per-core=1 | ensures that Gromacs will only run 1 MPI process per physical core (i.e will not use both hyperthreaded CPUs). This is recommended for parallel jobs. |
| --time=168:00:00 | max walltime=168 hrs (1 week). See the section on chaining jobs below. |
| --exclusive | Allocate the nodes exclusively to this job (recommended for parallel jobs) |
Amber version 22 is built with both CPU and GPU compatibility
Amber/22-gpu is compiled to run on a100, v100x, v100, and p100 GPU types
#!/bin/bash module load amber/22-gpu export CUDA_VISIBLE_DEVICES=0 $AMBERHOME/bin/pmemd.cuda -O -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPUFor GPU jobs, you can submit with the following:
sbatch -p gpu --gres=gpu:a100:1 --ntasks-per-core=1 gpu.testSample MPI batch script for amber/22.gcc
#!/bin/bash module load amber/22.gcc mpirun -np $SLURM_NTASKS $AMBERHOME/bin/pmemd.MPI -O -i mdin.CPU -o mdout.CPU -p prmtop -c inpcrd -r restrt.CPU -x mdcrd.CPU
sbatch --ntasks=# --ntasks-per-core=1 --nodes=1 cpu.test #ntasks < 16 sbatch -p multinode --ntasks=# --ntasks-per-core=1 cpu.test #ntasks > 16where:
| -p multinode | Submit to the multinode partition where all nodes are Infiniband-connected |
| --ntasks # | the number of MPI processes you wish to run. |
| --ntasks-per-core=1 | ensures that Gromacs will only run 1 MPI process per physical core (i.e will not use both hyperthreaded CPUs). This is recommended for parallel jobs. |
| --time=168:00:00 | max walltime=168 hrs (1 week). See the section on chaining jobs below. |
| --exclusive | Allocate the nodes exclusively to this job (recommended for parallel jobs) |
Amber version 22-ambertools23 is built with both CPU and GPU compatibility
Amber/22-ambertools23-gpu.gcc is compiled to run on a100, v100x, v100, and p100 GPU types
#!/bin/bash module load amber/22-ambertools23-gpu.gcc export CUDA_VISIBLE_DEVICES=0 $AMBERHOME/bin/pmemd.cuda -O -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPUFor GPU jobs, you can submit with the following:
sbatch -p gpu --gres=gpu:a100:1 --ntasks-per-core=1 gpu.testSample MPI batch script for amber/22-ambertools23.gcc
#!/bin/bash module load amber/22-ambertools23.gcc mpirun -np $SLURM_NTASKS $AMBERHOME/bin/pmemd.MPI -O -i mdin.CPU -o mdout.CPU -p prmtop -c inpcrd -r restrt.CPU -x mdcrd.CPU
sbatch --ntasks=# --ntasks-per-core=1 --nodes=1 cpu.test #ntasks < 16 sbatch -p multinode --ntasks=# --ntasks-per-core=1 cpu.test #ntasks > 16where:
| -p multinode | Submit to the multinode partition where all nodes are Infiniband-connected |
| --ntasks # | the number of MPI processes you wish to run. |
| --ntasks-per-core=1 | ensures that Gromacs will only run 1 MPI process per physical core (i.e will not use both hyperthreaded CPUs). This is recommended for parallel jobs. |
| --time=168:00:00 | max walltime=168 hrs (1 week). See the section on chaining jobs below. |
| --exclusive | Allocate the nodes exclusively to this job (recommended for parallel jobs) |
Amber version 26 is currently the default version on Biowulf
Amber version 26 is built with both CPU and GPU compatibility
Amber/26-gpu is compiled to run on a100, v100x, and v100 GPU types
#!/bin/bash module load amber/26-gpu export CUDA_VISIBLE_DEVICES=0 $AMBERHOME/bin/pmemd.cuda -O -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPUFor GPU jobs, you can submit with the following:
sbatch -p gpu --gres=gpu:a100:1 --ntasks-per-core=1 gpu.testSample MPI batch script for amber/26-gcc
#!/bin/bash module load amber/26-gcc mpirun -np $SLURM_NTASKS $AMBERHOME/bin/pmemd.MPI -O -i mdin.CPU -o mdout.CPU -p prmtop -c inpcrd -r restrt.CPU -x mdcrd.CPU
sbatch --ntasks=# --ntasks-per-core=1 --nodes=1 cpu.test #ntasks < 16 sbatch -p multinode --ntasks=# --ntasks-per-core=1 cpu.test #ntasks > 16where:
| -p multinode | Submit to the multinode partition where all nodes are Infiniband-connected |
| --ntasks # | the number of MPI processes you wish to run. |
| --ntasks-per-core=1 | ensures that Gromacs will only run 1 MPI process per physical core (i.e will not use both hyperthreaded CPUs). This is recommended for parallel jobs. |
| --time=168:00:00 | max walltime=168 hrs (1 week). See the section on chaining jobs below. |
| --exclusive | Allocate the nodes exclusively to this job (recommended for parallel jobs) |
Amber 26 is able to scale on multiple GPUs that support peer-to-peer communication (see the Amber GPU page for an explanation of peer-to-peer communication).
Please keep in mind that the performance in most cases is worse on 2 (and 4) GPUs than on a single GPU. If you plan to run a job on 2 GPUs, please run benchmarks first and verify that the performance is better on 2 GPUs than on 1. (Benchmarks). Note that the batch system will set the variable $CUDA_VISIBLE_DEVICES to the allocated GPUs.
Sample batch script on 2 GPUs:
#!/bin/bash module load amber/26-gpu cd /path/to/your/dir export CUDA_VISIBLE_DEVICES=0,1 mpirun -np 2 $AMBERHOME/bin/pmemd.cuda.MPI -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPUSubmit with:
sbatch --partition=gpu --gres=gpu:a100:2 --nodes=1 --cpus-per-task=32 --time=12:00:00 jobscript
Sample batch script on 4 GPUs:
#!/bin/bash module load amber/26-gpu cd /path/to/your/dir export CUDA_VISIBLE_DEVICES=0,1,2,3 mpirun $AMBERHOME/bin/pmemd.cuda.MPI -i mdin.GPU -o mdout.GPU -p prmtop -c inpcrd -r restrt.GPU -x mdcrd.GPUSubmit with:
sbatch --partition=gpu --gres=gpu:a100:4 --nodes=1 --cpus-per-task=64 --mem=64g --time=12:00:00 jobscript
You can check the behaviour of your job with the 'nvidia-smi' utility. Determine the GPU node on which your job is running via jobload or sjobs. Suppose your job is on node cn0626, and is using 2 GPUs:
biowulf% ssh cn0626 nvidia-smi Mon Jan 16 17:52:13 2017 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 367.48 Driver Version: 367.48 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Tesla K80 On | 0000:83:00.0 Off | Off | | N/A 41C P0 115W / 149W | 145MiB / 12205MiB | 75% Default | +-------------------------------+----------------------+----------------------+ | 1 Tesla K80 On | 0000:84:00.0 Off | Off | | N/A 27C P8 33W / 149W | 0MiB / 12205MiB | 0% Default | +-------------------------------+----------------------+----------------------+ | 2 Tesla K80 On | 0000:8A:00.0 Off | Off | | N/A 70C P0 128W / 149W | 145MiB / 12205MiB | 80% Default | +-------------------------------+----------------------+----------------------+ | 3 Tesla K80 On | 0000:8B:00.0 Off | Off | | N/A 45C P8 33W / 149W | 0MiB / 12205MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 51187 C ...cal/apps/amber/amber16/bin/pmemd.cuda.MPI 61MiB | | 0 51188 C ...cal/apps/amber/amber16/bin/pmemd.cuda.MPI 79MiB | | 2 51187 C ...cal/apps/amber/amber16/bin/pmemd.cuda.MPI 79MiB | | 2 51188 C ...cal/apps/amber/amber16/bin/pmemd.cuda.MPI 61MiB | +-----------------------------------------------------------------------------+The GPU numbers reported by 'nvidia-smi' may not match the GPUs you specified with the 'CUDA_VISIBLE_DEVICES' variable.
Walltime limits are set on most Biowulf partitions. Type 'batchlim' to see the current walltime limits, or see the systems status page. Note that the default walltime on the norm queue is 4 hrs, but you can extend this to 10 days. Amber jobs should be designed to run for a week or so, save a checkpoint file, and submit a new job starting from that checkpoint.
An example batch script is below. This script runs a single simulation, saves a copy of the output files, and then resubmits a new job starting from Amber's 'restart' file.
#!/bin/bash
# this file is called amber.run
module load amber/16
module list
echo "Running on $SLURM_NTASKS corse"
# rename the restart file to the coordinate filename
mv restrt inpcrd
#run sander
mpirun -np $SLURM_NTASKS `which sander.MPI` -O -i mdin -c inpcrd -p prmtop -r restrt -x traj -e ene -o mdout
#keep a copy of the output from this run
mv mdout md_$run.out
mv traj md_$run.trj
mv ene md_$run.ene
cp restrt md_$run.rst
# if less than 10 runs have been performed, increase the run number and submit the next job
if (( "$run" < "10" ))
then
run=`expr $run + 1`
sbatch --ntasks=8 --ntasks-per-core=1 --time=168:00:00 --exclusive amber.run
fi
To submit this job, copy the original input coordinate file to 'restrt' for the first run, and then submit.
cp inpcrd restrt sbatch --ntasks=8 --ntasks--per-core=1 --time=168:00:00 --exclusive amber.run
Based on the benchmarks, it is highly recomended that you run Amber on a GPU node.