MPQC  3.0.0-alpha

Obtaining the code

The latest version of the source code is available from Github. Public stable releases of MPQC have not occured since 2006. Therefore it is recommended that the users obtain the latest source code directly from the code repository.


MPQC is a complex piece of software and can be customized extensively. For example, to use MPQC on a parallel machine an MPI library (see below) may be needed. While the basic subset of MPQC features will work on all platforms, advanced features of MPQC will require additional prerequisites.

The following programs are necessary to compile even a bare-bones version of MPQC. Most are available on any modern computer system.

  • Code building is performed by CMake, version 2.8.8 or higher, and GNU Make.
  • Compilers for the C, C++, and FORTRAN languages are needed. The compilers listed below are known to work. Other ISO C++ compilers should work as well.
    • GCC 4.8 and later, available from
    • The Intel C/C++ compilers version 12 and later.
    • The C/C++ compiler frontend to LLVM (clang/clang++).
  • The Basic Linear Algebra Subprograms (BLAS) and the Linear Algebra Package (LAPACK) 3.0 are required. It is preferable to use vendor-provided optimized libraries, such as Intel Math Kernel Library (MKL) or Apple's Accelerate framework. A reference copy of LAPACK+BLAS is included and can be automatically built by cmake.
  • (optional) perl: This is used to generate and check the validation suite etc.
  • (developers-only) If you modify the scanner source file, then a lexical analyzer generator is required to generate code to read input files. The flex program is used for this purpose.
  • (developers-only) If you modify a parser source file, then GNU bison (version 1.24 or greater) is needed. This is a parser generator used to generate code to read input files.

Advanced Prerequisites

Certain advanced features of MPQC require additional packages.

  • A Message Passing Interface (MPI) is required to use MPQC in parallel on distributed memory machines. A thread-safe version of MPI is recommended.
  • A C++ compiler with support for the C++11 standard. Most recent versions of gcc, clang, and Intel C/C++ compiler are sufficient.
  • Libint (version 2.1.0(beta) or higher): This is a machine-generated library that can be used for evaluation of certain molecular integrals. Explicitly-correlated methods in MPQC require Libint. The library is freely available under GNU Public License (GPL) from Github. A copy of Libint is bundled in ./external/libint*.tgz and will be built if requested. NOTE you may require custom version of Libint for some functionaility, such as interfacing with GAMESS.
  • TiledArray is a block-sparse parallel tensor framework. TiledArray must be compiled manually, preferably with support for Elemental.
  • Eigen is a modern C++ library for linear algebra. A recent version is bundled in ./external/eigen.tar.gz; it will be unpacked if needed (this library is headers-only and does not need to be compiled).
  • Boost is a collection of modern C++ libraries. A recent version is bundled in ./external/boost*.tar.bz2; it will be built regardless of whether there is one is installed, since usability of Boost depends heavily on compiler.
  • Psi3 is the old generation of Psi code. Psi3 is bundled in ./external/psi3.tar.gz and will be compiled if needed. NOTE: Psi4 does not work with MPQC.
  • HDF5 is a high-performance data format library. It will be downloaded and built only if not found on the system.


You can build MPQC in the source code directory or you can make a companion target directory which will be used to hold all of the files generated by the compilation. You may name this directory anything you want. Typically, this directory is named to indicate the architecture (e.g. mpqc.i686-linux) and will be referred to as the target directory below.

A configure script is used to prepare MPQC for compilation. In the target directory execute the configure command which is located in the source directory. Use the absolute pathname to the configure script. This command should build a hierarchy of target directories and the necessary makefiles. Do a configure –help to see a list of options. Options are specified with an equals sign, as in configure –prefix=/usr/local. Some options, such as all the enable and disable options, do not require an argument. The most useful options to configure include:


Specifies the installation directory. The default is /usr/local/mpqc/version-number


Options for debugging will be given to the compiler.


Enables compilations of all advanced features of MPQC, hence most, if not all, prerequisites will be checked and built, if needed.

If you would like to further customize your target directory, you can edit src/lib/mpqc_config.h to suit your needs. The next time you run configure, this files and all the makefiles will be overwritten.



To compile with GNU compilers:

./configure CXX=g++

We are not aware of any significant issues with the GNU compilers.


To compile with Intel compilers, set appropriate CXX (and optionally C and FC):

./configure CXX=icpc

C++11 support is incomplete as of version 13. See C++11 Features Supported by IntelĀ® C++ Compiler

Compiling Eigen generates lots of warnings #2536 and #2196.
Those can be disabled with -wd switch, eg:

./configure CXX=icpc CXXFLAGS="-wd2536,2196"

Using for range loops and openmp causes Intel compilers (at least version 13.0.1) to segfault, internal error: assertion failed at: "shared/cfe/edgcpfe/checkdir.c", line 5406<\tt>. As a workaround in production code use foreach macro.


BLAS/LAPACK Math Libraries

CMake will try to find BLAS/LAPACK automatically. If it fails, a Netlib Lapack will be built and used (this is NOT recommended). You can also specify BLAS/LAPACK libraries with –lapack option.

BLAS/LAPACK libraries have INTEGER types that do not necessarily map to default C/C++ int type. The default is to assume that INTEGER type is 4-bytes. In case the BLAS/LAPACK library uses 8-byte types add –integer8 flag:

./configure --integer8

To use MKL (with GNU gfortran, GNU OpenMP, and 8-byte integers):

./configure --integer8 \
--lapack="-Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_gf_ilp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_gnu_thread.a -Wl,--end-group -ldl -lpthread -lm"

To use MKL with Intel compiler:

./configure --lapack="-mkl"


Now you are ready to build the libraries and executables. Do this by typing make in your target directory. If you are running on a symmetric multi-processor, you can use GNU make to parallelize the compilation. To compile four files at a time, type make -j4.

You can install the executables and data files with make install. Starting with version 3, this will also install the libraries and header files needed for development.

Checking the Compilation

See Validating MPQC for instructions for checking your compilation.

Generated at Sun Jan 26 2020 23:24:02 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.