Sunday, January 14, 2018

Compiling Lammps/11Aug17 with Intel 11.0, OpenMPI 1.6.2 and FFTW 3.3.2 (CAN user)

Step 1:
Step 2:  Load modules
 module load   intel/intel-11.1
 module load   intel/mkl-10.2.2
 module load   mpi/intel/openmpi-1.6.2
 module load   fftw/3.3.2/intel-11.1/parallel/openmpi-1.6.2/double
 module load   fftw/3.3.2/intel-11.1/parallel/openmpi-1.6.2/single
check 
 module list
Step 3: Compiling LAMMPS
tar -xvf lammps-stable.tar.gz

Prepare libraries for lammps....
...........
..........
Step 4: Compile required the packages. Go to src directory
......
.......make no-python
Step 5: Edit makefile
Copy file src/MAKE/Makefile.mpi
to  src/MAKE/MINE/Makefile.CANf3mpi   and then edit file Makefile.CANf3mpi

5a # compiler/linker settings:


CCFLAGS = -O3 -fno-alias -restrict -ip -unroll0 -shared-intel
LINKFLAGS = -O -L/opt/intel/composer_xe_2013_sp1.3.174/mkl/lib/intel64
LIB = -lstdc++ -lpthread -lmkl_sequential -lmkl_intel_lp64 -lmkl_core 

5b MPI Library
MPI_INC =   -I/opt/mpi/intel/openmpi-1.6.2/include -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1
MPI_PATH =    
MPI_LIB =  -L/opt/mpi/intel/openmpi-1.6.2/lib
 5c FFT library
FFT_INC =   -I/opt/fftw/3.3.2/intel-11.1/openmpi-1.6.2/double/include/fftw3
FFT_PATH = 
FFT_LIB =   /opt/fftw/3.3.2/intel-11.1/openmpi-1.6.2/double/lib/libfftw3.a

Step 6: Compile LAMMPS
Check make options. Go to src
# make
# make f3mpi
Step 7: Create a home/thang/local/lammps/11Aug17fep and copy libraries. Go to lammps' Source directory
 cp -Rv  bench   /home/thang/local/lammps/11Aug17fep/bench 
 cp -Rv  doc      /home/thang/local/lammps/11Aug17fep/doc
 cp -Rv  examples    /home/thang/local/lammps/11Aug17fep/examples
 cp -Rv  potentials   /home/thang/local/lammps/11Aug17fep/potentials
 cp README   /home/thang/local/lammps/11Aug17fep
 cp -Rv tools   /home/thang/local/lammps/11Aug17fep/tools
 cp -Rv lib     /home/thang/local/lammps/11Aug17fep/lib

 cd src
 cp lmp_CANf3mpi /home/thang/local/lammps/11Aug17fep/bin

cd /home/thang/local/lammps/11Aug17fep/bin
cp -p  lmp_CANf3mpi  lmp_mpi 


Step 8. Create a Modulefile
create modulefile:  lammps/11Aug17fep

No comments:

Post a Comment