(written by Yanming Wang)
Before we start to compile LAMMPS, we assume the LAMMPS package was downloaded from the svn server and was unzipped into the directory Codes/LAMMPS.svn/.
LAMMPS on mc2
1. Copy Makefile.mc2 into Codes/LAMMPS.svn/src/MAKE/ directory using the following commands/
cd ~/Codes/LAMMPS.svn wget http://micro.stanford.edu/mediawiki/images/f/fb/Makefile.mc2.txt -O ./src/MAKE/Makefile.mc2
2. In any directory, type the following command
Export TARGET=mc2
3. In your home directory, make a folder named usr
mkdir ~/usr
4. Download the fftw library and unzip it using the following commands
cd ~/usr wget http://micro.stanford.edu/mediawiki/images/9/9e/Fftw.tar -O fftw.tar tar –zxvf fftw.tar
5. Make sure you have the modules for using icc and mpi complier, you can load the modules by adding the below two lines to your bash_profile file.
vi ~/.bash_profile (You can use whatever text editor to open the file and add the following lines)
module load intel/intel-11 module load mvapich/1.2rc1-intel-11-dell-gen2
Save the file and log out. Next time when you log in, the compilers should work for you.
To confirm the compiler is ready, you can inquiry the location of the compiler by typing
which icc which mpicc
This will tell you where are the compilers.
6. Go to LAMMPS.svn directory
cd ~/Codes/LAMMPS.svn make clean make
This will make lmp_mc2 in LAMMPS.svn/src directory.