Micro and Nano Mechanics Group
(Difference between revisions)

Revision as of 17:58, 22 September 2008

In this document, we describe how to compile QBOX program on wcr.stanford.edu (Linux parallel cluster). We then give an example of how to use QBOX to compute the bulk modulus of Au.


First step is to get the source code from Qbox download page and decompress it.

wget http://fpmd.ucdavis.edu/software/qbox/qbox-1.45.0.tgz
tar -zxvf qbox-1.45.0.tgz

and

cd qbox-1.45.0/src 

Based on the Qbox build instructions page we will give some additional details. The difficult part of the installation is to correctly build the dependence libraries. In particular

  1. BLACS http://www.netlib.org/blacs
  2. ScaLAPACK http://www.netlib.org/scalapack
  3. FFTW 2.1.5 http://www.fftw.org
  4. Apache Xerces-C http://xerces.apache.org/xerces-c

these libraries will have to be installed in your local directory. To achieve this I use to create a directory called usr where libraries and header files will stay:

 mk $HOME/usr

I also use to download software package at ~/soft. This will make easier to establish absolute compilation paths for BLACS and Scalapack which have a non-standard installation procedure.

 mk $HOME/soft

I will assume that

  1. BLAS (or ATLAS) http://www.netlib.org or http://math-atlas.sourceforge.net
  2. LAPACK http://www.netlib.org/lapack

are installed system wide already (as they are currently in wcr.stanford).

The easiest library to install is FFTW 2.1.5 (FFTW3 is available but to the best of my knowledge incompatible with FFTW2). Simple download it from the FFTW download page and decompress it:

 cd ~/soft
 wget http://www.fftw.org/fftw-2.1.5.tar.gz
 tar -zxvf fftw-2.1.5.tar.gz
 cd fftw-2.1.5

The we do the configure and make install procedure, also indicating that we want a private installation in our ~/usr directory

 ./configure --prefix=$HOME/usr
 make
 make install

This will install the FFTW2 libraries in ~/usr/include and ~/usr/lib.

Next download and untar BLACS from BLACS papers page:

 cd ~/soft
 wget http://www.netlib.org/blacs/mpiblacs.tgz
 tar -zxvf mpiblacs.tgz
 cd BLACS

We have to have our own version of a file called Bmake.inc in the ~/soft/BLACS directory. The following file will serve for media:BLACS_Bmake.inc.txt_BLACS/Bmake.inc.txt BLACS/Bmake.inc

 wget http://micro/mediawiki-1.11.0/images/Bmake.inc.txt -o Bmake.inc

The file is just the same as BMAKES/Bmake.MPI-LINUX with the following changes in the variables definition:

 < BTOPdir = $(HOME)/soft/BLACS
 < MPIdir = /opt/mpich/gnu

Then change to the source directory and make, then copy the compiled libraries to ~/usr/lib/

 cd SRC/MPI
 make
 cp ~/soft/BLACS/LIB/*.a ~/usr/lib

Now it is the turn for Scalapack, get it from the Scalapack home page, untar it and

 cd ~/soft
 wget http://www.netlib.org/scalapack/scalapack-1.8.0.tgz
 tar -zxvf scalapack-1.8.0
 cd scalapack

Put this compilation input file media:scalapack_SLmake.inc.txt scalapack/SLmake.inc in the directory