Compiling Relion with Intel Compilers-15.0.6 and Intel MPI-5.0.3

Step 1: Download Relion

Relion Download site

Step 2: Source Intel Compilers and MPI

# vim .bashrc
source /usr/local/intel_2015/impi/5.0.3.049/bin64/mpivars.sh intel64
source /usr/local/intel_2015/composerxe/bin/compilervars.sh intel64
source /usr/local/intel_2015/mkl/bin/mklvars.sh intel64

export CC=icc
export CXX=icpc
export F77=ifort
export MPICC=mpicc
export MPICXX=mpiicpc
export CFLAGS="-O3 -xHost -fno-alias -align"
export FFLAGS="-O3 -xHost -fno-alias -align"
export CXXFLAGS="-O3 -xHost -fno-alias -align"

Step 3: Build the Relion for Intel Xeon Processor

# tar -xvf relion-1.4.tar
# cd relion-1.4
# ./INSTALL.sh

References:

  1. Recipe: RELION for Intel® Xeon Phi™ 7250 processor

Compiling CPMD-3.17.1 with Intel-13.0.1.117 and iMPI-14.0.2

To get the source code from CPMD, please go to http://www.cpmd.org/

Step 1: From the CPMD Directory

$ tar -zxvf cpmd-v3_17_1.tar.gz
$ cd ~/CPMD-3.17.1/CONFIGURE
$ ./mkconfig.sh IFORT-AMD64-MPI > Makefile

Step 2: Prepare the initialization

source /usr/local/intel_2013sp1/composerxe/mkl/bin/mklvars.sh intel64
source /usr/local/intel_2013sp1/composerxe/bin/compilervars.sh intel64
source /usr/local/intel_2013sp1/impi/4.1.3.048/intel64/bin/mpivars.sh intel64
source /usr/local/intel_2013sp1/composerxe/tbb/bin/tbbvars.sh intel64
source /usr/local/intel_2013sp1/itac/8.1.4.045/intel64/bin/itacvars.sh

Step 3:  I’m using MKL for the Mathematical Libraries

#--------------- Default Configuration for IFORT-AMD64-MPI ---------------
SRC  = .
DEST = .
BIN  = .
MKLPATH = /usr/local/intel_2013sp1/mkl/lib/intel64
MKLINCLUDE = /usr/local/intel_2013sp1/mkl/include
FFLAGS = -I/usr/local/intel_2013sp1/impi/4.1.3.048/include64 -L/usr/local/intel_2013sp1/impi/4.1.3.048/lib64
LFLAGS = -L${MKLPATH} -I${MKLINCLUDE} -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread
CFLAGS =
CPP = /lib/cpp -P -C -traditional
CPPFLAGS = -DPOINTER8 -DFFT_DEFAULT -DPARALLEL=parallel -DMAIA-x86_64-INTEL-IMPI -DINTEL_MKL -D__Linux
NOOPT_FLAG =
CC = mpicc
FC = mpiifort -c
LD = mpiifort -static-intel
AR = ar
#----------------------------------------------------------------------------

Step 4: Compile CPMD

$ make

If the compilation succeed, it should generate a cpmd.x executable.

Step 5: Pathing
Make sure your $PATH reflect the path of the executable cpmd.x. It is also important to ensure that you check that the libraries are properly linked to the executable

# ldd cpmd.x

Adding non-root users to administer Platform LSF

Step 1.    On the master host, change directory to $LSF_ENVDIR

# cd $LSF_ENVDIR

Step 2.   Modify the “lsf.cluster.<clustername>” file:

# vim lsf.cluster.<clustername>

Step 3.    Edit the following section in the file to add your non-root user as LSF administrator, e.g. adding user1 as administrator:

Begin   ClusterAdmins
Administrators = phpcadmin user1
End    ClusterAdmins

Note: By default, “phpcadmin” is the administrator for Platform HPC at time of installation. Do not remove it.

4.    Execute the following command on the master host for new changes to take effect. You need to perform it as “root” user or “phpcadmin”:

# lsadmin reconfig
# badmin mbdrestart

Compiling OpenMPI-1.8.8 with Intel Compiler and CUDA

Configuration parameters for Compiling OpenMPI-1.8.8 with Intel Compiler and CUDA can be found here.

# ./configure --prefix=/usr/local/openmpi-1.8.8-gpu_intel-15.0.7 CC=icc CXX=icpc F77=ifort FC=ifort --with-devel-headers --enable-binaries --with-cuda=/usr/local/cuda/
# make -j 16
# make all

References:

  1. Compiling OpenMPI 1.6.5 with Intel 12.1.5 on CentOS 6
  2. Building OpenMPI Libraries for 64-bit integers

Compiling NAMD-2.11 with Intel 2013-SP1 and iMPI 4.1.3 and FFTW-2.1.5

Step 1: Prepare for Environment Setup

source /usr/local/intel_2013sp1/composerxe/mkl/bin/mklvars.sh intel64
source /usr/local/intel_2013sp1/composerxe/bin/compilervars.sh intel64
source /usr/local/intel_2013sp1/impi/4.1.3.048/intel64/bin/mpivars.sh intel64
source /usr/local/intel_2013sp1/composerxe/tbb/bin/tbbvars.sh intel64
source /usr/local/intel_2013sp1/itac/8.1.4.045/intel64/bin/itacvars.sh

export CC=icc
export CXX=icpc
export F77=ifort
export F90=ifort

Step 2: Building FFTW-2.1.5 with Intel

$ wget http://www.fftw.org/fftw-2.1.5.tar.gz
$ tar -zxvf fftw-2.1.5.tar.gz
$ cd fftw-2.1.5
$ ./configure F77=ifort CC=icc CFLAGS=-O3 FFLAGS=-O3 --enable-threads --enable-float --enable-type-prefix --prefix=/usr/local/fftw-2.1.5_intel-4.1.3
$ make -j 16
$ make install

Step 3: Building CHARM-6.7.0

$ tar -zxvf NAMD_2.11_Source.tar.gz
$ export $NAMD_SRC=$PWD/NAMD_2.11_Source
$ cd $NAMD_SRC
$ tar -xvf charm-6.7.0.tar
$ MPICXX=mpiicpc CXX=icpc ./build charm++  mpi-linux-x86_64 mpicxx ifort --with-production --no-shared -O3 -DCMK_OPTIMIZE=1
$ cd $NAMD_SRC

Step 4: Building TCL-8.5.9

$ wget http://www.ks.uiuc.edu/Research/namd/libraries/tcl8.5.9-linux-x86_64.tar.gz
$ wget http://www.ks.uiuc.edu/Research/namd/libraries/tcl8.5.9-linux-x86_64-threaded.tar.gz
$ tar xzf tcl8.5.9-linux-x86_64.tar.gz
$ tar xzf tcl8.5.9-linux-x86_64-threaded.tar.gz
$ mv tcl8.5.9-linux-x86_64 tcl-8.5.9
$ mv tcl8.5.9-linux-x86_64-threaded tcl-8.5.9-threaded

Step 5: Setup the CHARMBASE in $NAMD_SRC for Make.charm

# Set CHARMBASE to the top level charm directory.
# The config script will override this setting if there is a directory
# called charm-6.7.0 or charm in the NAMD base directory.
CHARMBASE = /home/user1/NAMD/NAMD_2.11_Source/charm-6.7.0

Step 6: Setup the FFTW architecture files in $NAMD_SRC/arch

$ vim $NAMD_SRC/arch/Linux-x86_64.fftw
FFTDIR=/usr/local/fftw-2.1.5_intel-14.0.2
FFTINCL=-I$(FFTDIR)/include
FFTLIB=-L$(FFTDIR)/lib -lsrfftw -lsfftw
FFTFLAGS=-DNAMD_FFTW
FFT=$(FFTINCL) $(FFTFLAGS)

Step 7: Setup the TCL architecture files in $NAMD_SRC/arch

 $ vim $NAMD_SRC/arch/Linux-x86_64.tcl
TCLDIR=/usr/local/tcl8.5.9-threaded
TCLINCL=-I$(TCLDIR)/include
TCLLIB=-L$(TCLDIR)/lib -ltcl8.5 -ldl -lpthread
TCLFLAGS=-DNAMD_TCL
TCL=$(TCLINCL) $(TCLFLAGS)

Step 8: Setup the $NAMD_SRC/Linux-x86_64-ics-2013.arch

$ vim Linux-x86_64-ics-2013.arch
NAMD_ARCH = Linux-x86_64
CHARMARCH = mpi-linux-x86_64-ifort-mpicxx
FLOATOPTS = -O2
CXX = icpc -std=c++11
CXXOPTS = -static-intel -O2 $(FLOATOPTS)
CXXNOALIASOPTS = -O3 -fno-alias $(FLOATOPTS)
CC = icc
COPTS = -static-intel -O2 $(FLOATOPTS)

Step 9: Compile the Code.

$ ./config Linux-x86_64-ics-2013 --charm-base ./charm-6.7.0 --charm-arch mpi-linux-x86_64-ifort-mpicxx
$ cd Linux-x86_64-ics-2013
$ make -j 16

You should see the namd2 executable

Step 10: mpirun

$ mpirun -np 32 -machinefile $MACHINEFILE namd2  something.conf > job$LSB_JOBID.log

References:

  1. How to install NAMD 2.9 with Intel Cluster Studio 2013 on Intel Sandy Bridge architecture and IB support
  2. Compiling NAMD
  3. Namd-old
  4. How To Compile and Run NAMD (MPI Version)

List of mkl_solver* libraries are deprecated libraries since version 10.2 Update 2

Taken from mkl_solver* libraries are deprecated libraries since version 10.2 Update 2

Since version 10.2 update 2 of Intel® MKL,

all components of Direct Solver (Pardiso and DSS), Trust-Region (TR) Solver, Iterative Sparse Solver (ISS) and GNU Multiple Precision (GMP) were moved to standard MKL libraries.

So now solver ( e.g: mkl_solver.lib and mkl_solver_sequential.lib for IA32 ) libraries are

empty (for backward compatibility).

The list of deprecated libraries are the following:

Intel® MKL for Linux:

lib/32/libmkl_solver.a
lib/32/libmkl_solver_sequential.a
lib/em64t/libmkl_solver_ilp64.a
lib/em64t/libmkl_solver_ilp64_sequential.a
lib/em64t/libmkl_solver_lp64.a
lib/em64t/libmkl_solver_lp64_sequential.a
lib/ia64/libmkl_solver_ilp64.a
lib/ia64/libmkl_solver_ilp64_sequential.a
lib/ia64/libmkl_solver_lp64.a
lib/ia64/libmkl_solver_lp64_sequential.a

Therefore, the updated linking line will look like:

Linking on Intel®64:

static linking:

ifort pardiso.f -L$MKLPATH -I$MKLINCLUDE \
-Wl,–start-group \
$MKLPATH/libmkl_intel_lp64.a $MKLPATH/libmkl_intel_thread.a $MKLPATH/libmkl_core.a \
-Wl,–end-group -liomp5 -lpthread

dynamic linking:

ifort pardiso.f -L$MKLPATH -I$MKLINCLUDE \
-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread

where:
In these examples,

MKLPATH=$MKLROOT/lib/em64t
MKLINCLUDE=$MKLROOT/include.