Compiling and Installing Amber 22
Compiling Amber 22 on CentOS 7 is a little different than previous versions. Start with CentOS 7 minimal so that you can install the required versions of all tools without having to worry about if the bundled tool is the correct version or not–gcc for instance.
#Update
yum -y upgrade
#Install Amber Dependencies
yum -y install tcsh make \
which flex bison patch bc \
libXt-devel libXext-devel \
perl perl-ExtUtils-MakeMaker util-linux wget \
bzip2 bzip2-devel zlib-devel tar
#Install GCC 8
yum -y install centos-release-scl
yum -y install devtoolset-8
scl enable devtoolset-8 bash
#Install Other Tools
yum -y install cifs-utils nano
#Get cmake
cd /usr/local
wget https://github.com/Kitware/CMake/releases/download/v3.18.1/cmake-3.18.1-Linux-x86_64.tar.gz
wget https://github.com/Kitware/CMake/releases/download/v3.18.1/cmake-3.18.1-Linux-x86_64.sh
#Extract and install cmake
chmod a+x /usr/local/cmake-3.18.1-Linux-x86_64.sh
/usr/local/cmake-3.18.1-Linux-x86_64.sh
#Add cmake to path
export PATH=$PATH:/usr/local/cmake-3.18.1-Linux-x86_64/bin
#Copy Amber Files from network share--or whereever.
mkdir /MOUNT_DIRECTORY/
mount.cifs -o user=USERNAME,dom=DOMAIN //SERVERNAME/SHAREFOLDER /MOUNT_DIRECTORY/
#
cp /MOUNT_DIRECTORY/Amber22.tar.bz2 /usr/local/
cp /MOUNT_DIRECTORY/AmberTools22.tar.bz2 /usr/local/
#
umount /MOUNT_DIRECTORY/
#Extract Amber
tar xvfj /usr/local/Amber22.tar.bz2
tar xvfj /usr/local/AmberTools22.tar.bz2
#Complile Amber for Serial CPU
export AMBERHOME=/usr/local/amber22
cd /usr/local/amber22_src/build/
mkdir /usr/local/amber22
./run_cmake
make install
source /usr/local/amber22/amber.sh
#Test
export AMBERHOME=/usr/local/amber22
cd /usr/local/amber22
make test.serial
#CUDA
#Disable nouveau video driver
nano /etc/modprobe.d/blacklist-nouveau.conf
#Add the following contents:
blacklist nouveau
options nouveau modeset=0
#
dracut --force
#reboot!
reboot
#
#Install CUDA #https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=RHEL&target_version=8&target_type=runfile_local
cd /usr/local
wget https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda_11.1.1_455.32.00_linux.run
sh cuda_11.1.1_455.32.00_linux.run
#If CUDA install is failing, check log at /var/log/nvidia-installer.log
#If error in log is: ERROR: Unable to find the kernel source tree for the currently running kernel
#Try installing dkms and libvdpau
yum install kernel-devel epel-release
yum -y install dkms
yum -y install libvdpau x86_64
#cmake
cd /usr/local/amber22_src/build/
cp ./run_cmake ./run_cmake.orig
cp ./run_cmake ./run_cmake.gpu
nano ./run_cmake.gpu
#Edit -DCMAKE_INSTALL_PREFIX and -DCUDA in the Linux section
cmake $AMBER_PREFIX/amber22_src \
-DCMAKE_INSTALL_PREFIX=$AMBER_PREFIX/amber22 \
-DCOMPILER=GNU \
-DMPI=FALSE -DCUDA=TRUE -DINSTALL_TESTS=TRUE \
-DDOWNLOAD_MINICONDA=TRUE \
-DBUILD_QUICK=TRUE \
2>&1 | tee cmake.log
./run_cmake.gpu
make install
source /usr/local/amber22/amber.sh
#Test
export AMBERHOME=/usr/local/amber22
cd /usr/local/amber22
#One of these commands should work to test gpu install, but is not working on my install
#make test.serial.cuda
#make test.cuda
#Add to bashrc
export PATH=$PATH:/usr/local/cmake-3.18.1-Linux-x86_64/bin
export AMBERHOME=/usr/local/amber22
source /usr/local/amber22/amber.sh
https://ambermd.org/InstCentOS.php
https://ahelpme.com/linux/centos7/how-to-install-gnu-gcc-8-on-centos-7/
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=RHEL&target_version=8&target_type=runfile_loca