Friday, April 3, 2009

Install CPMD

CPMD is massively parallel code. There is little point running it serially as it will literally take forever to do anything useful. I'm providing the instructions I used to compile the parallel version on our HPC facility, therefore they may need altering for your computer.

Some technical details:
  • CPMD 3.13.1
  • Intel compilers/MKL 10.1
  • openSUSE 10.3, 64-bit
cd SOURCE
./mkconfig.sh IFORT-AMD64-MPI > Makefile

# In Makefile alter
FFLAGS = -pc64 -O2 -unroll
LFLAGS = -L/opt/intel/mkl/10.0.3.020/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
CC = mpicc -cc=icc
FC = mpif90 -fc=ifort -c
LD = mpif90 -fc-ifort -i-static

Run make, hopefully it will compile happily, copy cpmd.x to somewhere on your $PATH.

It would be wise to test your binary. First download cpmd-test.tar.gz from the contrib section of the downloads (tests are not included with the source). Run as mpisub 5x2 cpmd.x inp-1 or similiar depending on your setup. This command would use 5 dual processor computers.