1.2 Prerequisites (libraries and software) you’ll need

Since FHI-aims is distributed in source code form, the first task is to compile an executable program. For this, the following mandatory prerequisites are needed:

  • A working Fortran 2003 (or later) compiler. A good example for x86 type computers is Intel’s ifort compiler. A free but significantly slower compiler for all platforms is gfortran from the GNU compiler collection (http://gcc.gnu.org/fortran) or the g95 compiler (http://www.g95.org). Do not underestimate this slowdown, though – a factor of three or so is possible.

  • A compiled version of the lapack library, and a library providing optimized basic linear algebra subroutines (BLAS). Standard commercial libraries such as Intel’s mkl or IBM’s essl provide both lapack and BLAS support. lapack can also be found at http://www.netlib.org/lapack/.
    Having an optimized BLAS library for YOUR specific computer system(s) is critical for the performance of FHI-aims. Very good free implementations include ATLAS (http://math-atlas.sourceforge.net/).

You should also have a version of GNU Make and CMake for compiling FHI-aims. If CMake is not present, it is also possible to work with just GNU Make, but it is worth the effort to obtain CMake. Typically, GNU Make will already be present on your system, either as make, or possibly as gmake. CMake should be available in the official repository of your Linux distribution.

The next two prerequisites are optional, but absolutely essential for any current use of FHI-aims: Support for parallel architectures, and (separately) support for fully parallel linear algebra. Thus, you will also need:

  • A version of MPI libraries for parallel execution, often already present on a parallel system (if not, http://www.open-mpi.org/ provides one of several free implementations). Our experience is that Intel’s MPI library is a very worthwhile investment on x86 platforms (better performance).

  • Compiled versions of the scalapack library, and basic linear algebra communication subroutines (BLACS). Capable implementations can be found at http://www.netlib.org/, but are often provided already in the numerical libraries of many vendors (e.g., Intel MKL on Linux).

Finally, the default compilation builds an executable which includes some parts of the code that are written in C and C++. This may be turned off (see below), but we highly recommend compiling with C and C++ support as it introduces a number of useful features. You need:

  • A C and C++ compiler – available on every Unix platform.

The creation of a complete, MPI-, scalapack-, and C-enabled binary is effort well spent. This should be the goal when compiling FHI-aims for any production purposes. This means that you should ultimately aim to build FHI-aims with the USE_MPI and USE_SCALAPACK CMake options enabled (see below).

To create an actually working FHI-aims build, please read sections 1.3, 1.4 and (for much more information) perhaps appendix H. Please also ask and consider helping out others by sharing settings that work on a given platform. This can be done via the FHI-aims Slack channel or via the FHI-aims GitLab server – please see Section 1.7 below for ways to reach us.