# Installation

## Installation of pre-compiled binaries

After registration at the Mrcc homepage pre-built, statically-complied binaries are available in the download area. To install these executables Linux operating system and the 2.5 or later version of the GNU C Library (glibc) is required. The binaries are provided in a gzipped tar file, mrcc.YYYY-MM-DD.binary.tar.gz, where YYYY-MM-DD is the release date of the program. Note that you will find several program versions on the homepage. Unless there are overriding reasons not to do so, please always download the last version. To unpack the file type

tar xvzf mrcc*.binary.tar.gz

Please do not forget to add the name of the directory where the executables are placed to your PATH environmental variable.

## Installation from source code

To install Mrcc from source code some version of the Unix operating system, Fortran 90 and C++ compilers as well as BLAS (basic linear algebra subprograms) and LAPACK (linear algebra package) libraries are required. Optionally, Mrcc can also be linked with the Libxc library of density functionals [92, 59]. Please be sure that the directories where the compilers are located are included in your PATH environmental variable. Please also check your LD_LIBRARY_PATH environmental variable, which must include the directories containing the BLAS and LAPACK libraries.

After registration at the Mrcc homepage the program can be downloaded as a gzipped tar file, mrcc.YYYY-MM-DD.tar.gz, where YYYY-MM-DD is the release date of the program. Note that you will find several program versions on the homepage. Unless there are overriding reasons not to do so, please always download the last version. To unpack the file type

tar xvzf mrcc*.tar.gz

To install Mrcc run the build.mrcc script as

build.mrcc [$<$compiler$>$] [-i$<$option1$>$] [-p$<$option2$>$] [-g] [-d] [-f$<$folder$>$] [-l$<$library$>$]

$<$compiler$>$ specifies the compiler to be used. Currently the supported compiler systems are:

 Intel Intel compiler GNU GNU compiler (g77 or gfortran) PGF Portland Group Fortran compiler G95 G95 Fortran 95 compiler PATH Pathscale compiler HP HP Fortran Compiler DEC Compaq Fortran Compiler (DEC machines) XLF XL Fortran Compiler (IBM machines) Solaris10 Sun Solaris10 and Studio10 Fortran Compiler (AMD64)

If the build.mrcc script is invoked without specifying the $<$compiler$>$ variable, a help message is displayed.

Optional arguments:

-i

specifies if 32- or 64-bit integer variables are used. Accordingly, $<$option1$>$ can take the value of 32 or 64. The 32-bit integer version is not supported any more.
Default: 64 for 64-bit machines, 32 otherwise.

-p

generates parallel code using message passing interface (MPI) or OpenMP technologies. Accordingly, $<$option2$>$ can take the MPI or OMP values. MPI parallelization is available with the PGF, Intel, GNU, and Solaris10 compilers, while OpenMP parallelization has been tested with PGF, Intel, GNU, and HP compilers. Please note that currently the two parallelization schemes cannot be combined.
Default: no parallelization.

-g

source codes are compiled with debugging option (use this for development purposes)
Default: no debugging option.

-d

source codes are compiled for development, no optimization is performed (use this for development purposes)
Default: codes are compiled with highest level optimization.

-f

specifies the installation folder. Executables, basis set libraries, and test jobs will be copied to directory $<$folder$>$. If this flag is not used, you will find the executables, etc. in the directory where you perform the installation.

-l

Mrcc is linked with an external library, currently the only option for $<$library$>$ is libxc, which requires the installation of the Libxc library, see notes below.

Notes:

1. 1.

After the installation please do not forget to add the directory where the Mrcc executables are located to your PATH environmental variable. This is the $<$folder$>$ directory if you used the -f flag at the installation, otherwise the directory where you executed the build.mrcc script.

2. 2.

The build.mrcc script has been tested on several platforms with several versions of the supported compilers and libraries. Nevertheless you may need to customize the compiler flags, names of libraries, etc. These data can be found in the build.mrcc.config file, please edit this file if necessary. Please do not change build.mrcc.

3. 3.

To ensure the best performance of the software the use of Intel compiler is recommended.

4. 4.

If you use Mrcc together with Molpro, you can also use the Molpro installer to install Mrcc, please follow the instructions in the Molpro manual (www.molpro.net).

5. 5.

If Mrcc is linked with the Libxc library, Libxc must be installed before starting the installation of Mrcc. Note that you must compile Libxc with the same Fortran compiler as used for the installation of Mrcc. At the installation of Libxc it is recommended to set the installation path of Libxc (--prefix option of configure) to the directory where the installation of Mrcc is carried out, otherwise please set the LIBS_LIBXC environmental variable to the installation path of Libxc before running build.mrcc. See the manual for the Libxc project for details [59], as well as the examples below. The current release of Mrcc has been tested with the 4.0.3 version of Libxc.

Examples:

1. 1.

Compile Mrcc for OpenMP parallel execution with the Intel compiler (recommended):
build.mrcc Intel -pOMP

2. 2.

Compile Mrcc for OpenMP parallel execution with the Intel compiler and install it to the /prog/mrcc directory (recommended):
build.mrcc Intel -pOMP -f/prog/mrcc

3. 3.

Compile Mrcc for OpenMP parallel execution with the Intel compiler and link with the Libxc library supposing that Mrcc is compiled in the /prog/mrcc directory (recommended):
Download the Libxc library (libxc*.tar.gz) from the homepage of the Libxc project [59].
tar xvzf libxc*.tar.gz
cd libxc*
./configure --prefix=/prog/mrcc/ FC=ifort
make
make install
cd /prog/mrcc
build.mrcc Intel -pOMP -llibxc

4. 4.

Compile Mrcc for serial execution with the Intel compiler:
build.mrcc Intel

5. 5.

Compile Mrcc for parallel execution using MPI environment with the Intel compiler for 32-bit machines:
build.mrcc Intel -i32 -pMPI

## Installation under Windows

Under the Windows operating system the pre-built binaries cannot be directly executed, and the direct compilation of the source code has not been attempted so far. For Windows users we recommend the use of virtualization software packages, such as VirtualBox, which allow Linux as a guest operating system. In that environment Mrcc can be installed in the normal way as described in the previous subsections.