Compiling LAMMPS 28Mar12 on HECToR Phase 3 (Cray XE6, Interlagos)

This page contains the compilation instructions for compiling LAMMPS 28Mar12 version of LAMMPS on HECToR Phase 3 (Cray XE6, Interlagos).

Download/unpack the source code

Download the latest version of LAMMPS from http://lammps.sandia.gov/download.html unpack it:

gunzip lammps.tar.gz
tar xvf lammps.tar
cd lammps-28Mar12/src

Setup the build environment

Switch to the GNU compiler Suite. Since January 2011 LAMMPS has had serious issues building with the PGI compiler so use GNU instead.

module swap PrgEnv-cray PrgEnv-gnu 

Load the FFTW 3 module:

module load fftw

Edit the existing Makefile.xe6 supplied under src/MAKE/Makefile.xe6. The following flags were used to compile LAMMPS:

 CC =            CC
 CCFLAGS =       -O3
 DEPFLAGS =      -M
 LINK =          CC
 LINKFLAGS =     -O3
 LIB =           -lstdc++
 ARCHIVE =       ar
 ARFLAGS =       -rc
 SIZE =          size

If FFTW is required then the paths to this must also be specified in the Makefile:
 FFT_INC =       -DFFT_FFTW3 -I$FFTW_INC
 FFT_PATH =      -L$FFTW_DIR
 FFT_LIB =       -lfftw3

Build the code

Build the parallel version with:

 make makelist
 make xe6

Modules loaded for the centrally installed build were:

  1) modules/3.2.6.6
  2) nodestat/2.2-1.0400.29866.4.3.gem
  3) sdb/1.0-1.0400.30000.6.18.gem
  4) MySQL/5.0.64-1.0000.4667.20.1
  5) lustre-cray_gem_s/1.8.4_2.6.32.45_0.3.2_1.0400.6221.1.1-1.0400.30252.1.29
  6) udreg/2.3.1-1.0400.3911.5.6.gem
  7) ugni/2.3-1.0400.3912.4.29.gem
  8) gni-headers/2.1-1.0400.3906.5.1.gem
  9) dmapp/3.2.1-1.0400.3965.10.12.gem
 10) xpmem/0.1-2.0400.29883.4.6.gem
 11) hss-llm/6.0.0
 12) Base-opts/1.0.2-1.0400.29823.8.1.gem
 13) xtpe-network-gemini
 14) PrgEnv-gnu/4.0.30
 15) xt-mpich2/5.4.3
 16) atp/1.3.0
 17) xt-asyncpe/5.07
 18) pmi/3.0.0-1.0000.8661.28.2807.gem
 19) xt-libsci/11.0.05
 20) xt-totalview/8.9.2
 21) totalview-support/1.1.2
 22) gcc/4.6.2
 23) pbs/10.2.2.113537
 24) packages-phase3
 25) budgets/1.0
 26) xtpe-interlagos
 27) java/jdk1.7.0_02
 28) globus/5.0.3
 29) fftw/3.3.0.0
 

Additional instructions for building the serial version of LAMMPS

To build the serial version of LAMMPS you first need to swap to the frontend processor architecture and build the MPI STUBS library:

module swap xtpe-interlagos xtpe-istanbul
cd STUBS
cp Makefile Makefile.orig

Edit Makefile and set

 CC =            CC
 CCFLAGS =       -O3

Make the MPI STUBS library with

make 

The suppled Makefile.serial can be used as a starting point. Edit serial makefile to include the STUBS library, flags used:

 CC =            CC
 CCFLAGS =       -O3
 DEPFLAGS =      -M
 LINK =          CC
 LINKFLAGS =     -O3
 LIB =           -lstdc++
 ARCHIVE =       ar
 ARFLAGS =       -rc
 SIZE =          size

If FFTW is required the paths to FFTW must also be set in Makefile.serial

 FFT_INC =       -DFFT_FFTW3 -I$FFTW_INC
 FFT_PATH =      -L$FFTW_DIR
 FFT_LIB =       -lfftw3

Build serial LAMMPS

cd ../
gmake serial 

Modules loaded for the centrally installed build were:

Currently Loaded Modulefiles:
  1) modules/3.2.6.6
  2) nodestat/2.2-1.0400.29866.4.3.gem
  3) sdb/1.0-1.0400.30000.6.18.gem
  4) MySQL/5.0.64-1.0000.4667.20.1
  5) lustre-cray_gem_s/1.8.4_2.6.32.45_0.3.2_1.0400.6221.1.1-1.0400.30252.1.29
  6) udreg/2.3.1-1.0400.3911.5.6.gem
  7) ugni/2.3-1.0400.3912.4.29.gem
  8) gni-headers/2.1-1.0400.3906.5.1.gem
  9) dmapp/3.2.1-1.0400.3965.10.12.gem
 10) xpmem/0.1-2.0400.29883.4.6.gem
 11) hss-llm/6.0.0
 12) Base-opts/1.0.2-1.0400.29823.8.1.gem
 13) xtpe-network-gemini
 14) PrgEnv-gnu/4.0.30
 15) xt-mpich2/5.4.3
 16) atp/1.3.0
 17) xt-asyncpe/5.07
 18) pmi/3.0.0-1.0000.8661.28.2807.gem
 19) xt-libsci/11.0.05
 20) xt-totalview/8.9.2
 21) totalview-support/1.1.2
 22) gcc/4.6.2
 23) pbs/10.2.2.113537
 24) packages-phase3
 25) budgets/1.0
 26) xtpe-istanbul
 27) java/jdk1.7.0_02
 28) globus/5.0.3
 29) fftw/3.3.0.0