I.2 Compilation options beyond the standard Makefile

The build provided by the standard Makefile in FHI-aims is designed for minimal complexity to obtain the full functionality that most users should have. Separate “basic linear algebra subroutines” (BLACS), Lapack, parallel builds (if a parallel machine is available, nowadays almost always), and scalapack support are so performance-critical that every user should spend the time to investigate them in detail before doing serious production work with FHI-aims. These dependencies of FHI-aims on external libraries are therefore kept in the main Makefile.

In addition, FHI-aims provides further functionality that can be achieved by linking to other external libraries. However, this functionality will not be needed by all users and/or could seriously complicate the build process for everyone. Such functionality is therefore available through separate, amended versions of the Makefile. We encourage everyone to try these builds (they are not so difficult after all), but they should not become stumbling blocks.

We also note that not all of these builds are routinely tested. At this time, it is not certain that all of them will still work out of the box. The information is kept here to make sure it is available. Please ask (see Section 1.7) if you encounter problems.

In particular, several optional Makefile with additional functionality exist (and could even be combined):

  • Makefile.cuba : Allows to compile in the separate “CUBA” Monte Carlo integration library, which enables the Langreth-Lundqvist van der Waals functional based on noloco as a post-processing step. See Section 3.24 for more details.

  • Makefile.meta : still experimental! Allows to interface FHI-aims to the PLUMED library for free-energy calculations for molecular dynamics.
    (see http://merlino.mi.infn.it/\~plumed/PLUMED/Home.html , the PLUMED project homepage). Currently, a copy of the PLUMED library is kept in the external directory of the FHI-aims source code, and must be compiled separately using a C compiler. Note that the token “-DFHIAIMS” must be included in the CCFLAGS (at present, this is already specified in plumed.inc). For compiling on IBM power machines, the flags -mpowerpc64 -maix64 should be included. In the future, this will be corrected by housing the respective FHI-aims plugin directly in the PLUMED library. We apologize that the linking process is not yet further documented, but if this functionality is of interest to you, please contact us.
    By selecting the correct target in Makefile.meta, the code can be compiled with lapack or scalapack libraries, or with shared memory support (see next item).

  • Makefile.ipi : Allows to interface with the i-PI path integral molecular dynamics wrapper[57]. See the use_pimd_wrapper keyword for a few more details.

  • Makefile.shm : Another example of a Makefile that cross-links C and Fortran based functionality, although the actual functionality that Makefile.shm provides – access to shared-memory arrays in the Hartree potential – is no longer needed at this point.

  • Makefile.amd64_SSE : This Makefile contains an example how to use FHI-aims together with a version of the ELPA library which is especially tuned for SSE vector instructions. Note that the GNU C compiler must be installed in order to produce running code from the specific assembler files. As the name “amd64” indicates this optimization is only reasonable on processors which support the amd64 instruction set. Note that ”ELPA_ST” is set, to use the single-threaded version of ELPA.

  • Makefile.amd64_SSE_mt : The same as Makefile.amd64_SSE, but by setting ”ELPA_MT” the hybrid MPI OpenMP version of ELPA is used.

  • Makefile.amd64_AVX : This Makefile contains an example how to use FHI-aims together with a version of the ELPA library which is especially tuned for AVX vector instructions. Note that the GNU C and C++ compiler must be installed in order to produce running code from the specific ELPA files which contain gcc intrinsic functions. As the name “amd64” indicates this optimization is only reasonable on processors which support the amd64 instruction set and which already ”understand” AVX, i.e. Intel Sandybridge or newer. Note that ”ELPA_ST” is set, to use the single-threaded version of ELPA.

  • Makefile.amd64_AVX_mt : The same as Makefile.amd64_AVX, but by setting ”ELPA_MT” the hybrid MPI OpenMP version of ELPA is used.

  • Makefile.hdf5 : The HDF5 module provides functions and routines to efficently make use of parallel writing and reading of data (mpi-io). The usual compiler options have to be set in the same way as in the normal Makefie. Additionally the path to your installation of hdf5 must be provided. If the environment variable HDF5_HOME is already set on your system nothing else has to be changed otherwise it has to be set in Makefile.hdf5.