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