Compiling CPMD-3.17.1 with Intel- and iMPI-14.0.2

To get the source code from CPMD, please go to

Step 1: From the CPMD Directory

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

Step 2: Prepare the initialization

source /usr/local/intel_2013sp1/composerxe/mkl/bin/ intel64
source /usr/local/intel_2013sp1/composerxe/bin/ intel64
source /usr/local/intel_2013sp1/impi/ intel64
source /usr/local/intel_2013sp1/composerxe/tbb/bin/ intel64
source /usr/local/intel_2013sp1/itac/

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/ -L/usr/local/intel_2013sp1/impi/
LFLAGS = -L${MKLPATH} -I${MKLINCLUDE} -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread
CPP = /lib/cpp -P -C -traditional
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