#! /bin/bash # This script installs lammps automatically in a directory /share/apps/lammps_gnu_5May15. # Execute as su ## requirement (mandatory): ## /share/apps/fftw3 ## /share/apps/estools/mpich2/3.1.4/intel/ ## /share/apps/local/lib -llapack -lblas (non-ATLAS version) ## use default gcc in rocks 6.1.1 ####### begin installation #################################################### cd /share/apps mkdir mylammps_gnu_5May15 cd mylammps_gnu_5May15 mylammpsdir=$(echo $PWD) echo mylammpsdir= $mylammpsdir wget http://www2.fizik.usm.my/configrepo/howto/mylammps/mylammps_gnu_5May15.tar.gz tar -xzvf mylammps_gnu_5May15.tar.gz mv mylammps_gnu_5May15.tar.gz configrepo mv mylammps/* . rm -rf mylammps # linalg # cd $mylammpsdir/lib/linalg rm -f *.a *.o make -f Makefile.gfortran #wget http://www2.fizik.usm.my/configrepo/howto/mylammps/lammps_tmpl_5March_12_gnu_sa/lib/linalg/Makefile.anicca . #make -f Makefile.anicca # atc # cd $mylammpsdir/lib cd atc rm -f *.a *.o ## --with-lapack=-llapack -lcblas -latlas --with-blas=-lcblas -lf77blas -latlas wget http://www2.fizik.usm.my/configrepo/howto/mylammps/gnu/Makefile.lammps.atc cp Makefile.lammps.atc Makefile.lammps.installed make -f Makefile.mpic++ # cuda # cd $mylammpsdir/lib cd cuda make # gpu # #cd $mylammpsdir/lib #cd gpu #rm -f *.a *.o #rm -f Makefile.lammps #wget http://www2.fizik.usm.my/configrepo/howto/mylammps/lammps_tmpl_5March_12_gnu_sa/lib/gpu/Makefile.lammps . #wget http://www2.fizik.usm.my/configrepo/howto/mylammps/lammps_tmpl_5March_12_gnu_sa/lib/gpu/Makefile.anicca . #make -f Makefile.anicca # meam # cd $mylammpsdir/lib cd meam rm -f *.a *.o make -f Makefile.gfortran # poems # cd $mylammpsdir/lib cd poems rm -f *.a *.o #wget http://www2.fizik.usm.my/configrepo/howto/mylammps/lammps_tmpl_5March_12_gnu_sa/lib/poems/Makefile.anicca . make -f Makefile.g++ # reax # cd $mylammpsdir/lib/reax rm -f *.a *.o #rm -f Makefile.lammps #wget http://www2.fizik.usm.my/configrepo/howto/mylammps/lammps_tmpl_5March_12_gnu_sa/lib/reax/Makefile.lammps . #wget http://www2.fizik.usm.my/configrepo/howto/mylammps/lammps_tmpl_5March_12_gnu_sa/lib/reax/Makefile.anicca . make -f Makefile.gfortran #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 make -f Makefile.gfortran cd $mylammpsdir/lib/colvars make -f Makefile.g++ cd $mylammpsdir/lib/awpmd make -f Makefile.mpicc # Now exit /lib cd $mylammpsdir/src/MAKE mv Makefile.mpi Makefile.mpi.orig wget http://www2.fizik.usm.my/configrepo/howto/mylammps/gnu/Makefile.mpi 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 mpi ### creating link cd $mylammpsdir/src rm -rf lmp_gnu ln -s lmp_mpi lmp_gnu cd /share/apps/local/bin rm -rf lmp_gnu ln -s $mylammpsdir/src/lmp_gnu .