In this tutorial we discuss the basic steps needed to obtain and install FLEUR. Not all aspect can be covered, but the basic steps are decribed. Additional details can be found in the FLEUR docu: https://www.flapw.de/rel/documentation/installation/
Here we will discuss the three basic steps:
While the FLEUR download page at (https://www.flapw.de/rel/downloads/) offers several possible ways to obtain FLEUR, we will demonstrate here the use of a simple clone of the FLEUR git repository as it will ensure you work with a recent version and is rather simple as well.
You start by cloning the FLEUR repository by
git -c http.sslVerify=false clone https://iffgit.fz-juelich.de/fleur/fleur.git
This will create a subdirectory called "fleur" with a copy of the git repository. Further command will have to be issued in this subdirectory. The "-c http.sslVerify=false" part is only needed because it is not guaranteed that the docker image of this tutorial uses up-to-date certificates. Normally, one would not switch off this verification.
cd fleur
By default you will now work with the most recent developers version of the code. As a non-developer we would recommend to use the official releases of FLEUR that are available in the 'release' branch. Hence you should do
git checkout -t origin/release
Please refer to the gitlab page of FLEUR (https://iffgit.fz-juelich.de/fleur/fleur) for more details on available branches and tags.
There are a couple of external dependencies in the build process of Fleur.
Required are:
Optional:
Fleur can benefit significantly if the following further software components are available.
The configure.sh
script found in the main Fleur source directory can (and should) be used to start the configuration of FLEUR.
The most used options are:
Check out!
More options are available. Please check the output of configure.sh -h
. You might find options to include
dependencies into the build useful.
The configure.sh
script performs the following steps:
If you specify -d as argument of configure.sh, the string "debug" will be added to LABEL and a debugging version of FLEUR will be build, i.e. the corresponding compiler switches will be set.
More options for the configure script can be seen by using the -h
flag.
./configure.sh -h
In the docker-image we are using for this tutorial only a rather minimal software stack is included and the configure script can be executed without further options.
./configure.sh
If the configuration succeeded, the script will have created a directory called 'build' or 'build.
While this simple call to configure might work in many situations you have to provide more hints and details about the system.
For example to change the compiler we might want to set the FC
environment variable. By additionally specifying a detailed linker string and an include directory we can for example include the HDF5 library in the build process.
FC=mpif90 ./configure.sh -includedir /usr/include/hdf5/serial -link "-L/usr/lib/x86_64-linux-gnu/ -lhdf5_serial_fortran -lhdf5_serial"
The actual build is performed by using make
. You can also perform the build using several processes for example by using make -j 2
. This process will take some time and you might want to have a look at the more extensive documentation at https://www.flapw.de/rel/documentation/installation/ on how to customize your build.
cd build ; make -j2
After compilation it might be a good idea to test your build. This can be achieved using the ./run_tests.sh
command. These tests will take some time to run. You might want to continue and come back later to check the results.
Note: In the current setup many tests will fail. This is because we compiled a parallelized Fleur version but did not link to SCALAPACK. The tests will by default be run with a parallelization that in some tests is inompatible to this setup. In such a case Fleur stops with some error message explaining the problem and you typically have to choose a different parallelization scheme. You can either run the tests with the default parallelization to get a feeling on which tests fail in such a situation or define the environment variable juDFT_MPI="mpirun -np 1"
. In the latter case most tests will pass, besides a few tests on hybrid functionals where the parallelization cannot be changed. You also need the python package pytest to run the tests. If this is not already available on your system you can install it with the respective pip command.
export juDFT_MPI="mpirun -np 1"
pip install pytest ; ./run_tests.sh
There are two executables created in the build process:
inpgen
itself. The generated Fleur input file features unit-cell-adapted default parameters.If you have an MPI installation and the ./configure.sh
script found the corresponding setting, you will build a parallel version of Fleur able to run on multiple nodes using MPI. In this case the FLEUR executable we be named fleur_MPI. In general this is the executable to aim for since it can also be started in a serial way without the respective MPI command.
Within this tutorial inpgen
and fleur_MPI
have been preinstalled in the \bin
directory, so you can directly use the versions. We also included some more features for these binaries so some example will rely on them.
As mentioned, the installation can become pretty complex depending on your system and your need to specify details of libaries and other dependencies. For details please consult the FLEUR documentation and the corresponding discussions on the Forum.