fab5054 Aug 14, 2018
1 contributor

Users who have contributed to this file

109 lines (86 sloc) 5.75 KB


The following are mandatory top-level prerequisites

  • C++ compiler with support for the C++14 standard. This includes the following compilers:
    • GNU C++, version 5.0 or higher
    • Clang, version 3.4 or higher
  • CMake, version 3.1 and higher
  • TiledArray, source from the master branch
  • Libint, version 2.5.0-beta.1 or higher
  • Boost libraries, any recent version should do (e.g. Travis CI tests pass with version 1.55). The following Boost components are used:
    • Boost.Algorithm -- misc algorithms
    • Boost.Filesystem -- only used if C++17 support is not enabled; N.B. this is the only Boost library used by MPQC that must be compiled (i.e. it cannot be used as a header-only library)
      • Boost.System -- this non-header-only library is a prerequisite of Boost.Filesystem, only needed if C++17 support is not available.
    • Boost.Locale -- to be replaced by the C++ Standard Library facilities
    • Boost.Math -- misc special functions
    • Boost.Optional -- to be replaced by C++17 std::optional
    • Boost.PropertyTree -- used to implement KeyVal class
    • Boost.Serialization -- class GUID registration
  • Intel Thread Building Blocks (TBB), available in a commercial or an open-source form
  • (for documentation only) Doxygen

The following are transitive dependencies of the above:

Compile TiledArray

Please refer to TiledArry Wiki for information on how to compile TiledArray.

Compile Libint

  • obtain the latest version of Libint library from here (download the library marked "standard ints only")
  • compile and install according to Libint Wiki.

Compile MPQC

  1. Configure cmake
  2. Build
  3. (optional) Validate
  4. Install

Configuring MPQC

Run cmake from a build directory in which MPQC will be built. For many reasons you should avoid building in the source directory. There is a number of variables that you may need to provide to cmake, such as the C++ compiler to use, the MPI compiler wrapper to use, etc. At a minimum, you will need to specify the installed locations of the top-level prerequisites, as shown in the example script:


export MPQC_SOURCE=/path/to/mpqc/source/code/directory
export TiledArray_INSTALL = /path/to/tiledarray/install/directory
export LIBINT2_INSTALL = /path/to/libint/install/direcotry

cmake \
    -DTiledArray_INSTALL_DIR= ${TiledArray_INSTALL} \
    -DBOOST_ROOT=/path/to/boost/install/direcotry \

In practice we recommend using one of the provided toolchain files that come with TiledArray to configure MPQC using exactly the same compiler and library combination that was used to compile TiledArray.

The most useful MPQC-specific cmake variables are listed below:

Variables Description
TiledArray_INSTALL_DIR path to TiledArray install directory
LIBINT2_INSTALL_DIR path to Libint2 install directory
BOOST_ROOT root path for Boost
TA_POLICY dense or sparse, default sparse. control which policy to use with TiledArray. Some classes may only support sparse
MPQC_VALIDATION_TEST_PRINT default off, control if print output after validation test failed

Building MPQC

For simplicity here we assume that cmake was used to generate UNIX Makefiles (which is the default). To build, validate, and install MPQC run the following commands:

  • make
  • (optional) make check
  • make install

Platform-Specific Notes


System Integrity Protection (SIP)

Intel MKL and TBB libraries on MacOS come with user-configurable RPATH. Due to the use of System Integrity Protection(SIP) on recent MacOS platforms it is not sufficient to load the appropriate mklvars/tbbvars scripts in a shell to allow MPQC find these libraries. Rather than disabling SIP, it is possible to run MPQC with SIP enabled using a script that sets the DYLD_LIBRARY_PATH environment variable before calling MPQC. Store this in an executable script, named,


source /opt/intel/mkl/bin/ intel64
source /opt/intel/tbb/bin/ intel64
export DYLD_LIBRARY_PATH=/path/to/tiledarray/install/directory/lib:$DYLD_LIBRARY_PATH


and execute MPQC as /path/to/mpqc/binary <input_file>. To use this script when validating MPQC, set environment variable MPQC_PRE_CMD to the full path to this script before executing make check.

Example: MPQC build script

A simple shell script that uses HomeBrew to install basic prerequisites.