#! /bin/bash #Customising Ubuntu 15.10 ======================== sudo -i # 0 mkdir /share mkdir /share/apps mkdir /share/apps/configrepo mkdir /share/apps/local mkdir /share/apps/local/bin mkdir /share/apps/local/lib mkdir /state mkdir /state/partition1 cd /share/apps/local/bin/ scp comsics.usm.my:/share/apps/local/bin/check_pbs . chmod +x check_pbs #1 update using software updater (so that grub can see windows when booted up). Reboot only then proceed. #2. Install essential packages apt-get install vim dpkg --add-architecture i386 apt-get update apt-get install libstdc++5:i386 apt-get install libstdc++5 apt-get install g++-multilib libc6-dev-i386 libc6:i386 ##needed for icc installtion apt-get install ia32-libs ## not working, but it does not matter apt-get install openjdk-7-jre-headless #needed by icc installation apt-get install python-dev ##needed by lammps apt-get install libjpeg-dev ##needed by lammps apt-get install gfortran ##needed by lammps apt-get upgrade Install flash plugin via ubuntu software center Follow http://tecadmin.net/install-google-chrome-in-ubuntu/# to install google chrome #3 installating icc (using built-in gcc) mkdir /usr/lib32 ln -s /usr/lib/i386-linux-gnu/libstdc++.so.5 /usr/lib32/libstdc++.so.5 ln -s /home/tlyoon/share/apps/configrepo/l_cprof_p_11.1.072/pset/32/gcc-3.2/libstdc++.so.5 /share/apps/local/lib/ # ln -s /usr/lib/i386-linux-gnu/libstdc++.so.5 /share/apps/local/lib/ Install intel icc into /share/apps cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/intel/inst_icc_11.0.081_sa inst_icc_11.0.081_sa #4. Install intel ifort into /share/apps (using built-in gcc) cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/intel/inst_ifort_111072_sa sh inst_ifort_111072_sa #5. Install impi into /share/apps (using built-in gcc) cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/intel/inst_impi_410024_sa sh inst_impi_410024_sa 6. Install intel ifftw into /share/apps (using built-in gcc) # ln -s /usr/lib/i386-linux-gnu/libstdc++.so.5 /share/apps/local/lib #avoid doing if not needed cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/intel/inst_ifftw_111072_sa sh inst_ifftw_111072_sa #if it does not work, just cp the ifftw2 and ifftw3 lib from elsewhere and paste them in the right place # 7. Install gcc version 4.9.0 for enabling cuda in lammps. Cuda in lammps cannot support gcc higher than ver 4.9.0 cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/gcc/inst_gcc_4.9.0 sh inst_gcc_4.9.0 Creat links to use gcc-4.9.0 in root and users by adding the lines in ~/.bashr: ##sourcing gcc 4.9.2 export LD_LIBRARY_PATH=/share/apps/gcc/4.9.0/lib:/share/apps/gcc/4.9.0/lib64:$LD_LIBRARY_PATH export PATH=/share/apps/gcc-4.9.0/bin:$PATH ### note: gfortran from gcc-4.9.0 may not work, so for gfortran, has to use the one installed from apt-get install gfortran ubuntu. ########################################## ## for the following cuda installation, use built-in gcc #8 Installing CUDA Toolkit 7.5 on Ubuntu 15.10 Linux. To be done manually # The following explains how to install CUDA Toolkit 7.5 on 64-bit Ubuntu 15.10 Linux. # Retrieve the CUDA repository package for Ubuntu 15 from the CUDA download site and install it in a terminal. # From https://developer.nvidia.com/cuda-downloads, # Download Target Installer for Linux Ubuntu 15.10 x86_64. As of 10 Nov 2015, the version is # cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb (md5sum: 5cf65b8139d70270d9234d5ff4d697c7) # Installation Instructions: dpkg -i cuda-repo-ubuntu1504-7-5-local_7.5-18_amd64.deb mv /share/apps/gcc-4.9.0/lib64/libstdc++.so.6 /share/apps/gcc-4.9.0/lib64/libstdc++.so.6.orig ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /share/apps/gcc-4.9.0/lib64/libstdc++.so.6 apt-get update apt-get install cuda # You should reboot the system afterwards and verify the driver installation with the nvidia-settings utility. # Environment Variables # As part of the CUDA environment, you should add the following in the .bashrc file of your home folder. export CUDA_HOME=/usr/local/cuda-7.5 export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:LD_LIBRARY_PATH PATH=${CUDA_HOME}/bin:${PATH} export PATH # CUDA SDK Samples # Now you can copy the SDK samples into your home directory, and build a test sample. # $ cuda-install-samples-7.5.sh ~ # $ cd ~/NVIDIA_CUDA-7.5_Samples # $ cd 1_Utilities/deviceQuery # $ make # If everything goes well, you should be able to verify your CUDA installation by running the deviceQuery sample. ################################## #9. Install openmpi based on intel (built-in-gcc) cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/openmpi/inst_openmp185_intel sh inst_openmp185_intel #11. apt-get install gfortran ## needed by openmpi gnu installation and also by lammps #12. Install openmpi based on gnu using gcc-4.9.0 cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/openmpi/inst_openmp185_gcc_4.9.0 sh inst_openmp185_gcc_4.9.0 #13. Install openmpi based on built-in gnu cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/openmpi/inst_openmp185_gcc sh inst_openmp185_gcc #14. Install fftw3 based on built-in gnu cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/fftw/inst_fftw334_gnu sh inst_fftw334_gnu #15. Install tuned atlast libr based on built-in gnu cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/BLAS_and_LAPACK/inst_atlas sh inst_atlas # or alternatively, just copy the existing folders of these libs into the right place, /share/apps/atlas-3-10-2/gnu. #14. Install LAMMPS based on gnu, cuda enabled. cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/inst_lammps_gnu_cuda sh inst_lammps_gnu_cuda Note**: The lib/cuda must be made (by issuing 'make') by changing gcc to version 4.9.0, or it won't work. Note**: the whole lammps that uses cuda must be compiled using gcc-4.9.0, openmpi-1.8.5_gcc, if possible. Presumable to use it also need to be use gcc-4.9.0. ##################################### ## IGNOR THE REST ##################################### #13. Install LAMMPS based on intel, cuda enabled. apt-get install python-dev apt-get install libjpeg-dev apt-get install gfortran cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/inst_lammps_intel_cuda sh inst_lammps_intel_cuda Note**: The lib/cuda must be made (by issuing 'make') by changing gcc to version 4.9.0, or it won't work. Note**: the whole lammps that uses cuda must be compiled using gcc-4.9.0, openmpi-1.8.5_intel and all intel compilers, if possible. for consistency. Presumable to use it also need to be use gcc-4.9.0,. #10. Install fftw3 based on intel cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/fftw/inst_fftw334_intel sh inst_fftw334_intel #2 apt-get install libatlas-base-dev apt-get install liblapack-dev liblapack3 apt-get install cpufrequtils sysfsutils apt-get install rcconf apt-get install gksu apt-get install aptitude ################# not confirmed to work # for atlas installation use sudo rcconf # A list will appear in the terminal window, use the arrow keys to navigate and space bar to select, de-select options. # For cpu scaling, look for "ONDEMAND" # Once at the entry, with the space bar un-check the box. # To save the configuration hit the tab key so that "OK" is highlighted then enter to save and reboot. # Alternatively, gksu gedit /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor # replace ondemand with performance. Repeat for every core (increase cpu0: cpu1, cpu2). # add the following lines #devices/system/cpu/cpu0/cpufreq/scaling_governor = performance #devices/system/cpu/cpu1/cpufreq/scaling_governor = performance #devices/system/cpu/cpu2/cpufreq/scaling_governor = performance #devices/system/cpu/cpu3/cpufreq/scaling_governor = performance ################# end of not confirmed to work #8. Install mpich2 based on intel cd /share/apps/configrepo wget http://www2.fizik.usm.my/configrepo/howto/customise_centos/mpich2/inst_mpich2_314_intel_sa sh inst_mpich2_314_intel_sa