Compilation

First we have to pick a compiler: gnu, intel, pgi

QMCPACK depends on a number of libraries for:

  1. Linear Algebra
  2. Fast Fourier Transform
  3. C++ Boost Libraries
  4. XML Input Parsing: libxml2.so
  5. HDF5 Input/Output: libhdf5.so

The first two are mission critical libraries. They determine the correctness and speed of the executable you can produce. Using a GNU-compiled LAPACK with Intel compilers, for example, can result in an incorrect executable. One potentially confusing thing about Intel compilers is that they come with linear algebra (MKL) and fast Fourier transform libraries. Thus if intel compilers are chosen, no external linear algebra or FFT libraries should be specified.

The last three are easy: For boost, simple export BOOST_ROOT correctly in your environment and Cmake will find it. For XML and HDF5, as long as the libraries are in your LD_LIBRARY_PATH, they will be found by CMake.

On Taub

module load svn cmake/3.0.2
module load boost libxml2
module load intel/15.0
export BOOST_ROOT=/usr/local/boost/1.58.0/ # this will need to be updated in the future
cmake -DCMAKE_C_COMPILER=mpiicc -DCMAKE_CXX_COMPILER=mpiicpc -DQMC_CUDA=0 -DQMC_COMPLEX=0 ..

Taub’s environmental module setup is a bit delicate. intel/14.0 only has serial compilers and the MKL inlcude path is not added to environment, whereas intel/15.0 has intel mpi compilers and the MKL include path is added to the environment. This means you’ll need mvapich2/2.0b-intel-14.0 with intel/14.0 for MPI compilations, but mvapich2/2.1rc1-intel-15.0 is not required for intel/15.0. I will cover the easy option here: intel/15.0

(intel/14.0 needs export CPLUS_INCLUDE_PATH=$MKLROOT/include)

There is also no conflict setup between intel/14.0 and intel/15.0 which may cause problems, so be sure to only load one of these modules, not both.

Another gotcha is the difference between Taub and Golub, be sure to request ppn=16 when debuging so that you always request a Golub node. The two types of node have subtle incompatibilities that can drive you crazy.