#! /bin/bash # This script installs lammps automatically in a directory $dir/lammps_intel_5May15. ### By default, dir='/share/apps' ### requirements (mandatory) fftw3, mkl and mpich2 are already in the following directories : ### icc, ifort ### $dir/fftw3 ### $dir/intel/Compiler/11.1/072/mkl ### $dir/mpich2/bin/mpic++ (preferrably compiled using intel compiler) ### Use default gcc. Note that gcc version 4.9.0 does not work for this script. ### In case fftw2,intel mkl, mpich2 are not located in the default directories (with dir='/share/apps'), modify the definition of dir below, e.g., dir='/usr/local' dir='/share/apps' #default dir='/share/apps' ### Modify the content of the following files (4 of them) to specify the paths for fftw2, mpich2, intel mkl libraries. Then place them in the corresponding directories, ### 1. http://www2.fizik.usm.my/configrepo/howto/mylammps/intel/Makefile.lammps.atc (to place in $mylammpsdir/lib/atc) ### 2. http://www2.fizik.usm.my/configrepo/howto/mylammps/intel/Makefile.mpic++.atc (to place in $mylammpsdir/lib/atc) ### 3. http://www2.fizik.usm.my/configrepo/howto/mylammps/intel/Makefile.lammps.ifort.meam (to place in $mylammpsdir/lib/meam) ### 4. http://www2.fizik.usm.my/configrepo/howto/mylammps/intel/Makefile.ytl (to place in $mylammpsdir/src/MAKE) ### Then execute this script ####### begin installation #################################################### cd $dir mkdir mylammps_intel_5May15 cd mylammps_intel_5May15 mylammpsdir=$(echo $PWD) echo mylammpsdir= $mylammpsdir wget http://www2.fizik.usm.my/configrepo/howto/mylammps/mylammps_5May15.tar.gz tar -xzvf mylammps_5May15.tar.gz mv mylammps/* . rm -rf mylammps # linalg # cd $mylammpsdir/lib/linalg rm -f *.a *.o make -f Makefile.gfortran # atc # cd $mylammpsdir/lib/atc rm -f *.a *.o wget http://www2.fizik.usm.my/configrepo/howto/mylammps/intel/Makefile.lammps.atc cp Makefile.lammps.atc Makefile.lammps.installed wget http://www2.fizik.usm.my/configrepo/howto/mylammps/intel/Makefile.mpic++.atc mv Makefile.mpic++.atc Makefile.mpic++ make -f Makefile.mpic++ # meam # cd $mylammpsdir/lib/meam rm -f *.a *.o mv Makefile.lammps.ifort Makefile.lammps.ifort.orig wget http://www2.fizik.usm.my/configrepo/howto/mylammps/intel/Makefile.lammps.ifort.meam cp Makefile.lammps.ifort.meam Makefile.lammps.ifort make -f Makefile.ifort # poems # cd $mylammpsdir/lib/poems rm -f *.a *.o make -f Makefile.icc # cuda # cd $mylammpsdir/lib/cuda make # reax # cd $mylammpsdir/lib/reax rm -f *.a *.o make -f Makefile.ifort #cd $mylammpsdir/lib/voronoi #ln -s voro++-0.4.6/src /share/apps/voro++-0.4.6/include #ln -s voro++-0.4.6/src /share/apps/voro++-0.4.6/include cd $mylammpsdir/lib/qmmm rm -f *.a *.o make -f Makefile.gfortran cd $mylammpsdir/lib/colvars rm -f *.a *.o make -f Makefile.g++ #cd $mylammpsdir/lib/awpmd #make -f Makefile.mpicc # Now exit /lib cd $mylammpsdir/src/MAKE wget http://www2.fizik.usm.my/configrepo/howto/mylammps/intel/Makefile.ytl cd ../ rm -f *.a *.o make yes-all make no-user-quip make no-user-cuda make no-gpu make no-user-awpmd make no-kim make no-voronoi make no-user-colvars #make no-user-qmmm make no-kokkos make no-user-intel make no-user-molfile make ytl ### creating link cd $mylammpsdir/src rm -rf lmp_ytl ln -s lmp_ytl lmp_intel #cd /share/apps/local/bin #rm -rf lmp_intel #ln -s $mylammpsdir/src/lmp_intel .