The project consist of Fortran and C source codes. Moreover, common scientific libraries (FFTW, BLAS and LAPACK) are used. The compilation is done with make utility. Machine dependent settings are collected in a file (architecture file). The Makefiles (which control make utility execution) are created automatically with a python script The script supports an out of source compilation (i.e. in a user-specified directory, which can be different to the source-code directory). The architecture file must be put to the same directory where the Makefiles are generated. Examples of architecture files can be found in examples/arch/ sub directory. One can start the compilation by creating a compilation sub directory

Installation from GitLab guide

mkdir build

After, we step inside the compilation directory

cd build

and generate Makefiles

python <path/to/source>/ -C <path/to/source>

As soon as Makefiles are generated, one can copy an example file from trunk/examples/arch/ subdirectory to the build directory and adjust it to your machine. As soon as is adjusted to your particular machine, the compilation can be started by typing


By default several executables are build. The names of these executables are printed after compilation.
Each executable has its own Makefile. For instance, the executable tddft is build according to Makefile.tddft; only given set of modules is compiled for each executable. To keep track on module's dependencies, there is include file (generated together with other Makefiles).

Tips and tricks concerning compilation phase can be found in section Compilation.

Inner design of Makefile system is described in section Makefiles design.

Short FAQ:
Q: I have almost compiled on my Mac, but I get errors during linking stage
A: Maybe there is not fortran bindings in the fftw-3 library? Try

port install fftw-3 +gfortran

Q: I have compiled tddft on my Mac, but I get segmentation fault while running the program
A: Maybe you forgot to use -DUSE_OWN_CZDOT option in ?

Q: I got strange errors during compilation with g95
Reading module parallel at line 2 column 780: Unexpected EOF
While reading module 'm_precision' found module version 0, expected 8.
A: This could happen if one has .mod files from other compiler laying in one directory with source (normally in trunk/). The cure would be to clean source directory and avoid using 'in source' builds. There is no option in g95 to override its default behaviour to search .mod files first in the source directory. This problem does not affect ifort or gfortran compilers.

Q: I got an error message saying that cputime.c cannot be compiled.
A: Maybe you need to install the development headers. On recent Ubuntu/Debian distributions it would be done with a command
apt-get install g++-multilib

Q: During linking any libraries could be found.
A: The package depends on lapack, and fftw3 libraries. On recent Ubuntu/Debian distributions it would be solved with a command
apt-get install libopenblas-dev libfftw3-dev

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License