#! /bin/bash ###### PRELIMINARY ################################ ## Manual intervention required #1. testdir='/share/apps/configrepo' if [ ! -d "$testdir" ] ; then echo "$testdir" not found echo "Abort. Please create the $testdir directory and try again" exit 1 else #if needed #also: elif [new condition] echo "$testdir" found. Proceed. fi echo ' ' ###### END OF PRELIMINARY ################################ ### 2222222222222222222222222222222222222222222222 ### #2. Intel Paralell studio, parallel_studio_xe_2017_update2.tgz (huge, ~ 4 GB) cd $testdir wget http://comsics.usm.my/tlyoon/configrepo/howto/customise_centos/intel/inst_intel_parallelstudioXE17.txt chmod +x inst_intel_parallelstudioXE17.txt ./inst_intel_parallelstudioXE17.txt ### END of 2222222222222222222222222222222222222222222222 ### ### 333333333333333333333333333333333333333333333 ### #3. Download and install cuda-repo-rhel7-10-1-local-10.1.105-418.39-1.0-1.x86_64.rpm (CUDA driver for CentOS 7, version 10.1) cd $testdir ## This will be made as the default version cuda (as of 20 Apr 2019) f2i=cuda-repo-rhel7-10-1-local-10.1.105-418.39-1.0-1.x86_64.rpm if [ ! -e "$f2i" ] ; then echo "$f2i" not found else echo "$f2i" found. fi echo ' ' read -p "Press ENTER to proceed with the download of $f2i. Press 'n' if DO NOT wish to download $f2i. " pass if test "$pass" = "n" then echo "Will not download" $f2i else echo "Download " $f2i #wget https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-rhel7-10-1-local-10.1.105-418.39-1.0-1.x86_64.rpm wget https://www.dropbox.com/s/eu3111u5o6nlyyq/cuda-repo-rhel7-10-1-local-10.1.105-418.39-1.0-1.x86_64.rpm?dl=0 -O cuda-repo-rhel7-10-1-local-10.1.105-418.39-1.0-1.x86_64.rpm fi echo ' ' read -p "Press ENTER to proceed with the installation of $f2i. Press 'n' if DO NOT wish to proceed with the installation of $f2i. " pass if test "$pass" = "n" then echo "Will not proceed with the installatoin of " $f2i else echo "Proceed with the installatoin of " $f2i ## %%%%% rpm -i $f2i yum clean all yum install -y cuda ## Follow and accept all prompts. The installation process will take up some while, around 10 mins or longer. ## After installation, make sure that the CUDA paths are linked in ~/.bashrc echo ' ' >> ~/.bashrc echo '# Added by CUDA installation ' >> ~/.bashrc echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc echo 'export CUDA_HOME=/usr/local/cuda' >> ~/.bashrc echo ' ' >> ~/.bashrc cd /usr/local/cuda/samples/ make # this will make a whole lot of executables in /usr/local/cuda-9.2/samples/bin/x86_64/linux/release ## To test the cuda installation, cd /usr/local/cuda/samples/bin/x86_64/linux/release ./deviceQuery ./bandwidthTest ## %%%%% fi # end if "Proceed with the installatoin of " $f2i ### END OF 333333333333333333333333333333333333333333333 ### echo 'customize_centos_part2.txt is completed.' ### 44444444444444444444444444444444444444444 ### #3. Download and install cuda_9.2.148_396.37_linux.run (CUDA driver for CentOS 7, version 9.2) ### required by qe-6.1-gpu cd $testdir f2i=cuda_9.2.148_396.37_linux.run if [ ! -e "$f2i" ] ; then echo "$f2i" not found else echo "$f2i" found. fi echo ' ' read -p "Press ENTER to proceed with the download of $f2i. Press 'n' if DO NOT wish to download $f2i. " pass if test "$pass" = "n" then echo "Will not download" $f2i else echo "Download " $f2i # wget https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda_9.2.148_396.37_linux -O cuda_9.2.148_396.37_linux.run wget https://www.dropbox.com/s/sbqm3arpl8i4do8/cuda_9.2.148_396.37_linux.run?dl=0 -O cuda_9.2.148_396.37_linux.run fi echo ' ' read -p "Press ENTER to proceed with the installation of $f2i. Press 'n' if DO NOT wish to proceed with the installation of $f2i. " pass if test "$pass" = "n" then echo "Will not proceed with the installatoin of " $f2i else echo "Proceed with the installatoin of " $f2i ## %%%%% init 3 chmod +x cuda_9.2.148_396.37_linux.run ./cuda_9.2.148_396.37_linux.run init 5 cd /usr/local/cuda-9.2/samples/ make # this will make a whole lot of executables in /usr/local/cuda-9.2/samples/bin/x86_64/linux/release ## To test the cuda installation, cd /usr/local/cuda-9.2/samples/bin/x86_64/linux/release ./deviceQuery ./bandwidthTest ## %%%%% fi # end if "Proceed with the installatoin of " $f2i ### END OF 44444444444444444444444444444444444444444 ### #5 install Anaconda3-5.3.1 for CentOS, including numba numpy matplotlib scipy cudatoolkit tensorflow-gpu cudnn cd /share/apps/configrepo wget http://comsics.usm.my/tlyoon/configrepo/howto/customise_centos/inst_anaconda.txt chmod +x inst_anaconda.txt ./inst_anaconda.txt #6 install pgi compilers, see https://www.pgroup.com/doc/pgiinstall174.pdf or https://www.pgroup.com/resources/docs/18.7/x86/pgi-install-guide/index.htm cd /share/apps/configrepo; wget http://comsics.usm.my/tlyoon/configrepo/howto/customise_centos/inst_pgi.txt chmod +x inst_pgi.txt ./inst_pgi.txt #7 install gaussian 09 cd /share/apps/configrepo; wget http://comsics.usm.my/tlyoon/configrepo/howto/customise_centos/gaussian/inst_g09; chmod +x inst_g09 ./inst_g09 echo 'customize_centos_part2.txt is completed.'