Skip to content

Instantly share code, notes, and snippets.

@ChristinaLK
Last active March 17, 2022 16:06
Show Gist options
  • Save ChristinaLK/34b1a4c636e54c9f07250d9293c78e1b to your computer and use it in GitHub Desktop.
Save ChristinaLK/34b1a4c636e54c9f07250d9293c78e1b to your computer and use it in GitHub Desktop.
#!/bin/bash
# this script is meant to be run on hpclogin2.chtc.wisc.edu
# it assumes that the gromacs-2022.tar.gz file has been downloaded to /software/smunawar
# To run the script, run the following command:
# bash install.sh
# move to local disk for the compilation
mkdir /software/smunawar/gromacs
cd /scratch/local/smunawar
cp /software/smunawar/gromacs-2022.tar.gz ./
# load modules
module load cmake/3.16.4-gcc930
module load openmpi/4.0.5-gcc93
# compilation steps
tar xfz gromacs-2022.tar.gz
cd gromacs-2022
mkdir build
cd build
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_MPI=on -DCMAKE_INSTALL_PREFIX=/software/smunawar/gromacs
make
make check
make install
# source /software/smunawar/gromacs/bin/GMXRC
echo "DONE"
#!/bin/sh
# this script is meant to be submitted as a SLURM job for GROMACS installation
# it assumes that the gromacs-2022.tar.gz file has been downloaded to /software/smunawar
# To submit the job, run the following command:
# sbatch install_job.sh
#SBATCH --partition=univ2 # default "univ2", if not specified
#SBATCH --time=4-00:00:00 # run time in days-hh:mm:ss
#SBATCH --nodes=1 # require 2 nodes
#SBATCH --ntasks-per-node=20 # cpus per node (by default, "ntasks"="cpus")
#SBATCH --mem=128000 # RAM per node
#SBATCH --error=job.%J.err
#SBATCH --output=job.%J.out
# move to local disk for the compilation
mkdir /software/smunawar/gromacs
cd /scratch/local/smunawar
cp /software/smunawar/gromacs-2022.tar.gz ./
# load modules
module load cmake/3.16.4-gcc930
module load openmpi/4.0.5-gcc93
# compilation steps
tar xfz gromacs-2022.tar.gz
cd gromacs-2022
mkdir build
cd build
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_MPI=on -DCMAKE_INSTALL_PREFIX=/software/smunawar/gromacs
make -j 10
make check
make install
echo "DONE"
rm -rf gromacs-2022 gromacs-2022.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment