1. Installation

The Spex source code cannot be downloaded directly. Please contact c.friedrich@fz-juelich.de

1.1. Prerequisite software

For compiling the source you need:

  • a modern FORTRAN compiler,
  • the BLAS, LAPACK, FFTW, and HDF5 libraries as well as the Wannier90 library if you need Wannier support,
  • an implementation of the MPI-3 standard if you intend to compile the parallel version.

1.2. Compilation

Once you have obtained the code (“spexVERSION.tgz”) unpack it and change to the “spexVERSION” directory, where “VERSION” is the version number, e.g. “05.00”. There, you find a configure shell script that helps to generate a Makefile for your system. Consult the file “INSTALL” for a description of the compilation process. In short, if all necessary libraries are in standard directories, ./configure and make should suffice to create working executables. Special options can be given to the configure script:

  • --enable-mpi: Build parallel version (requires an MPI-3 compiler).
  • --enable-load: Load wavefunctions from harddisc when needed (otherwise stored in memory).
  • --with-wan: Build with Wannier-function support (Wannier-function support requires the Wannier90 library, whose location can be specified with --with-wan=DIR).
  • --with-dft=PROG: Build with an interface to the DFT program “PROG” instead of the default, which is fleur.v0.26b (2019.02); currently, only “fleur” (FLEUR MaX Release 3 v0.27) is available as an alternative.
  • --prefix=PREF: Executables will be installed in directory “PREF” (/usr/local is default).

Enter ./configure -h for a full list of configuration options.

Note

If the configuration fails, the file “config.log” should be consulted for more details about the failure. In most cases, the compiler does not find a required library or an include file, in which case the corresponding directories must be specified with the environment variables LDFLAGS and FCFLAGS, respectively. (Consult your Unix or Linux manual.) Also see Section 9.1 for common problems in the configuration step.

The compilation creates the executables

“spex.inv”
for systems with inversion symmetry and without spin-orbit coupling,
“spex.noinv”
for systems without inversion symmetry or with spin-orbit coupling,
“spex.extr”
data extraction utility,

The reason for having two executables, one for systems with inversion symmetry and the other for systems without, is that many quantities (such as the Coulomb matrix, the screened interaction on the imaginary axis, the exchange self-energy, etc.) can be declared in the code as real-valued instead of complex-valued arrays in the case of inversion symmetry, which speeds up the computation considerably. (The floating-point multiplication of complex numbers are about eight times slower than the multiplication of real numbers.) For the sake of code clarity, it is then advantageous to have two executables.

The user can call “spex.inv” or “spex.noinv” directly or use the Spex launcher script “spex”, which executes the proper executable according to the DFT data in the current directory.

The executables and shell scripts may be installed with make install. Installation is optional. See the file “INSTALL” for details. If the directory “PREF/bin” (see –prefix option) is in the PATH environment variable, Spex can be called from the command line simply by “spex”.