Amber 18-bf11 + AmberTools 18-bf12
#!/bin/sh
VERSION=18
TOOLSVERSION=18INSTALL_DIR="/local/apl/lx/amber18-bf11v"
TARBALL_DIR="/home/users/${USER}"PARALLEL=12
#----------------------------------------------------------------------
module purge
module load intel_parallelstudio/2017update8
module load cuda/9.1export AMBERHOME=${INSTALL_DIR}
export CUDA_HOME="/local/apl/lx/cuda-9.1"export LANG=C
export LC_ALL=C# install directory has to be prepared before running this script
if [ ! -d $AMBERHOME ]; then
echo "Create $AMBERHOME before running this script."
exit 1
fi# the install directory must be empty
if [ "$(ls -A $AMBERHOME)" ]; then
echo "Target directory $AMBERHOME not empty"
exit 2
fiulimit -s unlimited
# prep files
cd $AMBERHOME
bunzip2 -c ${TARBALL_DIR}/Amber${VERSION}.tar.bz2 | tar xf -
bunzip2 -c ${TARBALL_DIR}/AmberTools${TOOLSVERSION}.tar.bz2 | tar xf -mv amber${VERSION}/* .
rmdir amber${VERSION}# apply patches if exists
./update_amber --update
# configure python separately (miniconda)
AmberTools/src/configure_python
$AMBERHOME/bin/amber.conda install mkl-rt --yesecho "[GPU serial edition (three versions)]"
./configure --no-updates -volta -cuda gnu
make -j${PARALLEL} install && make cleanecho "[GPU parallel edition (three versions)]"
./configure --no-updates -volta -mpi -cuda gnu
make -j${PARALLEL} install && make clean
# tests of GPU versions will be done elsewhereecho "[CPU serial edition]"
LANG=C ./configure --no-updates -mkl intel
make -j${PARALLEL} install
. ${AMBERHOME}/amber.sh
make test.serial
make cleanecho "[CPU openmp edition]"
LANG=C ./configure --no-updates -openmp -mkl intel
make -j${PARALLEL} install
make test.openmp
make cleanecho "[CPU parallel edition]"
LANG=C ./configure --no-updates -intelmpi -mkl intel
make -j${PARALLEL} install
export DO_PARALLEL="mpirun -np 2"
make test.parallel
export DO_PARALLEL="mpirun -np 4"
cd test && make test.parallel.4proccd $AMBERHOME
make clean && chmod 700 src