Compiling Gromacs 5.0.x on ARCHER Phase 2
Gromacs compilation consists of two steps:
- Compiling the serial tools (for the postprocessing nodes).
- Compiling the parallel MD simulation program (for the compute nodes).
Note: Gromacs ust be built on the /work file system as it is a dynamic executable and has library files that will be required at runtime.
Build the serial tools for the PP nodes
Log into a PP node
You must build on the PP nodes to ensure the correct versions of executables are built:
ssh espp2
Set up your environment for the serial build
Switch to the GNU programming environment:
module swap PrgEnv-cray PrgEnv-gnu
and load the FFTW 3 and CMake modules:
module add fftw module add cmake
Module list for centrally installed executables:
Currently Loaded Modulefiles: 1) modules/3.2.10.2 2) eswrap/1.1.0-1.010400.915.0 3) switch/1.0-1.0501.47124.1.93.ari 4) craype-network-aries 5) craype/2.2.1 6) pbs/12.2.401.141761 7) craype-xeon 8) cray-mpich/7.1.1 9) packages-archer 10) budgets/1.1 11) checkScript/1.1 12) checkQueue/1.0 13) checkDisk/1.0 14) bolt/0.6 15) serialJobs/1.0 16) python/2.7.6 17) tkdiff/4.2 18) nano/2.2.6 19) imagemagick/6.8.8-2 20) leave_time/1.0.0 21) quickstart/1.0 22) epcc-tools/1.4 23) gcc/4.9.2 24) cray-libsci/13.0.1 25) udreg/2.3.2-1.0501.7914.1.13.ari 26) ugni/5.0-1.0501.8253.10.22.ari 27) pmi/5.0.6-1.0000.10439.140.2.ari 28) dmapp/7.0.1-1.0501.8315.8.4.ari 29) gni-headers/3.0-1.0501.8317.12.1.ari 30) xpmem/0.1-2.0501.48424.3.3.ari 31) job/1.5.5-0.1_2.0501.48066.2.43.ari 32) csa/3.0.0-1_2.0501.47112.1.91.ari 33) dvs/2.4_0.9.0-1.0501.1672.2.122.ari 34) alps/5.1.1-2.0501.8507.1.1.ari 35) rca/1.0.0-2.0501.48090.7.46.ari 36) atp/1.7.5 37) PrgEnv-gnu/5.1.29 38) fftw/3.3.4.1 39) cmake/2.8.12
Configure the single-precision build
Create a build directory in the source tree
cd gromacs-5.0.5 mkdir build cd build
Set the environment variables for the CMake build. (Note, for at least 4.6.3 and 4.6.5, FLAGS=-ffast-math results in errors and test failures.)
export CXX=g++ export CC=gcc export CMAKE_PREFIX_PATH=/opt/cray/fftw/3.3.4.1/x86_64/lib export FLAGS="-dynamic -O3 -ftree-vectorize -funroll-loops"
Use CMake to configure the build:
cmake ../ -DGMX_MPI=OFF -DGMX_OPENMP=ON -DGMX_GPU=OFF -DGMX_X11=OFF -DGMX_DOUBLE=OFF \ -DCMAKE_C_FLAGS="$FLAGS" -DCMAKE_CXX_FLAGS="$FLAGS" \ -DFFTWF_INCLUDE_DIR=/opt/cray/fftw/3.3.4.1/x86_64/include \ -DGMX_SIMD=SSE2 \ -DCMAKE_INSTALL_PREFIX=/work/y07/y07/gmx/5.0.5-phase2
Build the serial, single-precision code
make install
Configure and build the serial, double-precision code
Create a build directory in the source tree
cd gromacs-5.0.0 mkdir build_d cd build_d
Set the environment variables for the CMake build. (Note, for at least 4.6.3 and 4.6.5, FLAGS=-ffast-math results in errors and test failures.)
export CXX=g++ export CC=gcc export CMAKE_PREFIX_PATH=/opt/cray/fftw/3.3.4.1/x86_64/lib export FLAGS="-dynamic -O3 -ftree-vectorize -funroll-loops"
Use CMake to configure the build:
cmake ../ -DGMX_MPI=OFF -DGMX_OPENMP=ON -DGMX_GPU=OFF -DGMX_X11=OFF -DGMX_DOUBLE=ON \ -DCMAKE_C_FLAGS="$FLAGS" -DCMAKE_CXX_FLAGS="$FLAGS" \ -DFFTWF_INCLUDE_DIR=/opt/cray/fftw/3.3.4.1/x86_64/include \ -DGMX_SIMD=SSE2 \ -DCMAKE_INSTALL_PREFIX=/work/y07/y07/gmx/5.0.5-phase2
Build the serial, double-precision code
make install
Build the parallel simulation code for the compute nodes
Set up your environment for the parallel build
Switch to the GNU programming environment:
module swap PrgEnv-cray PrgEnv-gnu
and load the FFTW 3 and CMake modules:
module add fftw module add cmake
Module list for centrally installed parallel executables:
Currently Loaded Modulefiles: 1) modules/3.2.10.2 2) eswrap/1.1.0-1.010400.915.0 3) switch/1.0-1.0501.47124.1.93.ari 4) craype-network-aries 5) craype/2.2.1 6) pbs/12.2.401.141761 7) craype-ivybridge 8) cray-mpich/7.1.1 9) packages-archer 10) budgets/1.1 11) checkScript/1.1 12) checkQueue/1.0 13) checkDisk/1.0 14) bolt/0.6 15) serialJobs/1.0 16) python/2.7.6 17) tkdiff/4.2 18) nano/2.2.6 19) imagemagick/6.8.8-2 20) leave_time/1.0.0 21) quickstart/1.0 22) epcc-tools/1.4 23) gcc/4.9.2 24) cray-libsci/13.0.1 25) udreg/2.3.2-1.0501.7914.1.13.ari 26) ugni/5.0-1.0501.8253.10.22.ari 27) pmi/5.0.6-1.0000.10439.140.2.ari 28) dmapp/7.0.1-1.0501.8315.8.4.ari 29) gni-headers/3.0-1.0501.8317.12.1.ari 30) xpmem/0.1-2.0501.48424.3.3.ari 31) job/1.5.5-0.1_2.0501.48066.2.43.ari 32) csa/3.0.0-1_2.0501.47112.1.91.ari 33) dvs/2.4_0.9.0-1.0501.1672.2.122.ari 34) alps/5.1.1-2.0501.8507.1.1.ari 35) rca/1.0.0-2.0501.48090.7.46.ari 36) atp/1.7.5 37) PrgEnv-gnu/5.1.29 38) fftw/3.3.4.1 39) cmake/2.8.12
Configure and build the parallel, single-precision build
Create a build directory in the source tree
cd gromacs-5.0.0 mkdir build_mpi cd build_mpi
Set the environment variables for the CMake build. (Note, for at least 4.6.3 and 4.6.5, FLAGS=-ffast-math results in errors and test failures.)
export CXX=CC export CC=cc export CMAKE_PREFIX_PATH=/opt/cray/fftw/3.3.4.1/sandybridge/lib export FLAGS="-dynamic -O3 -ftree-vectorize -funroll-loops"
Use CMake to configure the build and then build and install:
cmake ../ -DGMX_MPI=ON -DGMX_OPENMP=ON -DGMX_GPU=OFF -DGMX_X11=OFF -DGMX_DOUBLE=OFF \ -DCMAKE_C_FLAGS="$FLAGS" -DCMAKE_CXX_FLAGS="$FLAGS" -DGMX_BUILD_MDRUN_ONLY=ON \ -DFFTWF_INCLUDE_DIR=/opt/cray/fftw/3.3.4.1/sandybridge/include \ -DCMAKE_INSTALL_PREFIX=/work/y07/y07/gmx/5.0.5-phase2 make install
Configure and build the parallel, double-precision build
Create a build directory in the source tree
cd gromacs-5.0.0 mkdir build_mpi_d cd build_mpi_d
Set the environment variables for the CMake build. (Note, for at least 4.6.3 and 4.6.5, FLAGS=-ffast-math results in errors and test failures.)
export CXX=CC export CC=cc export CMAKE_PREFIX_PATH=/opt/cray/fftw/3.3.4.1/sandybridge/lib export FLAGS="-dynamic -O3 -ftree-vectorize -funroll-loops"
Use CMake to configure the build and then build and install:
cmake ../ -DGMX_MPI=ON -DGMX_OPENMP=ON -DGMX_GPU=OFF -DGMX_X11=OFF -DGMX_DOUBLE=ON \ -DCMAKE_C_FLAGS="$FLAGS" -DCMAKE_CXX_FLAGS="$FLAGS" -DGMX_BUILD_MDRUN_ONLY=ON \ -DFFTWF_INCLUDE_DIR=/opt/cray/fftw/3.3.4.1/sandybridge/include \ -DCMAKE_INSTALL_PREFIX=/work/y07/y07/gmx/5.0.5-phase2 make install