Skip to content

Instantly share code, notes, and snippets.

@ityonemo
Last active July 30, 2020 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ityonemo/9f53072613b09a87b17e0e786b05b03d to your computer and use it in GitHub Desktop.
Save ityonemo/9f53072613b09a87b17e0e786b05b03d to your computer and use it in GitHub Desktop.
gromacs installation on lambda v100

Gromacs on Lambda V100 nodes

Installation

  1. Install singularity
sudo apt-get update && sudo apt-get install -y build-essential libssl-dev uuid-dev \
  libgpgme11-dev squashfs-tools libseccomp-dev wget pkg-config git cryptsetup

export VERSION=1.13 OS=linux ARCH=amd64 && \
  wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz && \
  sudo tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz && \
  rm go$VERSION.$OS-$ARCH.tar.gz

echo 'export PATH=/usr/local/go/bin:$PATH' >> ~/.bashrc && \
  source ~/.bashrc

export VERSION=3.5.2 && # adjust this as necessary \
    wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-${VERSION}.tar.gz && \
    tar -xzf singularity-${VERSION}.tar.gz && \
    cd singularity

./mconfig && \
    make -C builddir && \
    sudo make -C builddir install
  1. clean up singualarity stuff from your home directory
cd ~
rm -rf singularity*
  1. create a singularity script which pulls gromacs version precompiled with nvidia support
cat << EOF > gromacs.def
Bootstrap: docker
From: nvcr.io/hpc/gromacs:2020.2
EOF
  1. build the container
sudo singularity build /usr/bin/gmx-cnt gromacs.def
rm gromacs.def
  1. fake out gmx to be able to run the container with nvidia transparently
cat << EOF | sudo tee /usr/bin/gmx
#!/bin/sh
singularity run --nv -B \${PWD}:/host_pwd --pwd /host_pwd /usr/bin/gmx-cnt gmx "\$@"
EOF

sudo chmod +x /usr/bin/gmx

Testing

These instructions abstracted and simplified from NVIDIA's HPC gitlab repository: https://gitlab.com/NVHPC/ngc-examples/-/blob/master/gromacs/2018.2/single-node/singularity.sh

  1. get the gromacs "water" dataset
DATA_SET=water_GMX50_bare
wget -c ftp://ftp.gromacs.org/pub/benchmarks/${DATA_SET}.tar.gz
tar xf ${DATA_SET}.tar.gz
  1. prep and run the "water" dataset run
cd ./water-cut1.0_GMX50_bare/1536

gmx grompp -f pme.mdp
gmx mdrun -ntmpi 8 -nb gpu -ntomp 6 -pin on -v -noconfout -nsteps 5000 -s topol.tpr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment