#! /bin/bash # This script installs mylammps automatically in an invidual user's home directory. It is specially designed to work for CENTOS 6.3. ## It is assumed that fftw and mpich2 are already properly installed # This script will create a folder mylamps in ~/ (home directory of current user). # Choose either scp from www2 (not current version) or git (current/latest version) or wget. By default, wget is used. # Make sure you have git installed, or yum install git.x86_64 as root, if you wish to download with git clone (instead of scp) ######### begin downloading ########################### cd ~/ # Use either Option 1 or Option 2, but not both to download the mylammps. By default, Option 2 is used. Option 2 is faster but it does not contains the lastest version of mylammps. Option 1 is slower but it downloads directly the latest version from the source in the web. ## Option 1. Uncomment if want to use this option. # git clone http://git.icms.temple.edu/lammps-ro.git mylammps ## End of Option 1 ## Option 2. Default option. wget -r -l1 --no-parent -A.tar.gz http://www2.fizik.usm.my/configrepo/howto/mylammps/ cp www2.fizik.usm.my/configrepo/howto/mylammps/*.tar.gz . mv *.tar.gz lammps-icms.tar.gz tar -zxvf lammps-icms.tar.gz rm -rf www2.fizik.usm.my lammps-icms.tar.gz #mkdir mylammps mv lammps-* mylammps ## End of Option 2 ####### begin installation #################################################### # atc # cd ~/mylammps cd lib cd atc wget http://www2.fizik.usm.my/configrepo/howto/mylammps/Makefile.g++.mylammps.atc.fedora13 mv Makefile.g++ Makefile.g++.bk cp Makefile.g++.mylammps.atc.fedora13 Makefile.g++ make -f Makefile.g++ # linalg # cd ~/mylammps/lib cd linalg make -f Makefile.gfortran # mean # cd ~/mylammps/lib cd meam wget http://www2.fizik.usm.my/configrepo/howto/mylammps/Makefile.lammps.CENTOS6 mv Makefile.lammps Makefile.lammps.orig mv Makefile.lammps.CENTOS6 Makefile.lammps make -f Makefile.gfortran # reax # cd ~/mylammps/lib cd reax wget http://www2.fizik.usm.my/configrepo/howto/mylammps/Makefile.lammps.CENTOS6 mv Makefile.lammps Makefile.lammps.orig mv Makefile.lammps.CENTOS6 Makefile.lammps make -f Makefile.gfortran # peom # cd ~/mylammps/lib cd poems make -f Makefile.g++ # Now exit /lib cd ~/mylammps/src/MAKE wget http://www2.fizik.usm.my/configrepo/howto/mylammps/Makefile.g++.CENTOS6 cp Makefile.g++ Makefile.g++.bk cp Makefile.g++.CENTOS6 Makefile.g++ cd ~/mylammps/src/ make yes-all make no-user-cuda make no-gpu make no-user-awpmd make no-kim make g++ ### Post-installation #### # To run an mylammps calclation, you must prepare an input file named as 'in.XXXX'. For example, to run the calculation 'colloid', which is kept in the folder ~/mylammps/examples/in.colloid, issue the command: # 'mpiexec -f ~/hosts -np NP ~/mylammps/src/lmp_g++ < ~/mylammps/examples/colloid/in.colloid' # where NP = number of processors, NP = 1, 2, 3, ... # Note also that to run lammps in mpi mode, a ~/hosts file must be created. It should contain the list of nodes to be used to run a lammps calculation, e.g., #anicca.usm.my #compute-0-0 #compute-0-1 #compute-0-2 # ... # Alternatively, you can also specify the node's using their private IP addresses, e.g., # 10.1.1.1 # 10.1.255.245 # 10.1.255.246 # 10.1.255.247 # ... # To check the private IP address of the nodes, just issue the command '/sbin/ifconfig'