Installing CPMD on a 64-bit AMD Opteron Cluster running CentOS 5 Linux
CPMD, Car-Parrinello Molecular Dynamics, is an ab initio Electronic Structure and Molecular Dynamics Program and is copyrighted jointly by IBM Corp and by Max Planck Institute, Stuttgart, but distributed free of charge (with source) to non-profit organizations.
Yet another website that uses frames. For god's sake people give it up! Open up a real page and let's start. First you'll need to get a license file and assuming all is well, you'll get to download the tarball (
cpmd3.13_2.tar.gz) and engage in the familiar process of extraction (
tar xvf cpmd3.13_2.tar.gz). Change into the directory have a look at the README file; you may also wish to read the manual at the same time. Note the hardware requirements;
"As a consequence the requirements to network performance are very high. A gigabit ethernet interconnect will scale only to a small number of nodes. For good scaling a network technology like InfiniBand, Myrinet, Quadrics, Dolphin/SCI or a like is needed, and the best scaling is achieved on special parallel hardware with lightweight kernels like IBM BlueGene class or Cray XT$ x$ type machines."
CPMD has a shell script to create an initial Makefile for a number of given platforms, in our case
/usr/local/src/CPMD/CPMD-3.13.2/SOURCE/CONFIGURE. If you run the shell script mkconfig.sh without any options it will tell you what platforms are available, run with a -i option to get some relevant information. In our case;
./mkconfig.sh -i LINUX-x86_64-FEDORA-MPI which will mention what packages are required. Based on this load the appropriate modules (
module load openmpi-gcc/1.3.3,
module load fftw/2.1.5-gcc-openmpi).
To compile the effective executable
cpmd.x in a different directory than the source files, use
mkconfig.sh -DEST=destdir SUN > destdir/Makefile which leads us to the truly ugly command
./mkconfig.sh -DEST=/usr/local/cpmd/3.13.2 LINUX-x86_64-FEDORA-MPI > /usr/local/cpmd/3.13.2/Makefile, after one has created the destination directory (
mkdir -p /usr/local/cpmd/3.13.2/. Then change to said directory and run
make. After this create a module file .base, create a symbolic link to the current version
ln -s .base 3.13.2 and modify the .version file to the most recent.
When compiling with newer versions of GCC the following error message will result:
"Error: Dummy argument 'r_qm' of procedure 'fm_optimize_allcovalent' at (1) has an attribute that requires an explicit interface for this procedure"
Newer versions of gfortran conduct a more accurate checks on F90/F95 syntax (compared to previous versions):
"a calling program unit must have an _explicit interface_ to a procedure if it is to use advanced fortran features or attributes"
Specifically, r_qm in fm_optimize_allcovalent is defined with a target attribute.
The cpmd2cube.x creates a pdb file and a gaussian cube file from a density/wannier file as produced by CPMD.
Download the source files with authorisation as above. Extract in the relevant src directory (e.g.,
mv cpmd2cube.tar.gz /usr/local/src/CPMD/CPMD-3.13.2/ \n tar xvf cpmd2cube.tar.gz)
Change to cpmd2cube directory and check the README file. Like CPMD itself, this also requires compilation. Load some necessary modules;
module load openmpi-gcc/1.4.1 fftw/2.1.5-gcc-openmpi
Run the following
./Configure Linux-PC-GFORTRAN-FFTW -m
This will create a Makefile. Run
make and hopefully this will generate a cpmd2cube.x, a trimcube and a cutcube.x file. Copy these (e.g.,
cp cpmd2cube.x /usr/local/cpmd/3.13.2/) to the appropriate directory.