Installation of BigDFT
From version 1.8.0, that can be downloaded either from the provided tarball or by having a launchpad account, via
bzr branch lp:bigdft
the build system of BigDFT has been modified. Instead of building the code with one single configure line, the code is now built as a suite of different packages.
In this scheme we might see how the BigDFT code is separated. This was also the same compiling procedure that has been used for the 1.7.x versions of the code. The figure describes the interdependencies among these packages. Let us describe each of the packages which are depicted here:
- libyaml: this library is used to parse the yaml Markup language, that is used in the BigDFT input files;
- PyYaml: this is a Python module which makes possible to convert Yaml into python objects. This part is mainly used for postprocessing purposes as BigDFT logfile also comes in yaml format;
- futile: this is a library handling most common FORTRAN low-level operations, like memory managment, profiling routines, I/O operations. It also supports yaml output and parsing for fortran programs. It also provides wrappers routines to MPI and linear algebra operations. This library is intensively used in BigDFT packages;
- CheSS: A module for performing Fermi Operator Expansions via Chebyshev Polynomials, released as a separate project on Launchpad
- psolver: a flexible real-space Poisson Solver based on Interpolating Scaling Functions. It constitutes a fundamental building block of BigDFT code, and it can also be used separately and linked to other codes. It also internally uses the futile library for the I/O.
- libXC: this library handles most of the XC functionals that can be invoked from BigDFT runs;
- libABINIT: this is a subsection of files coming from ABINIT software package, to which BigDFT has been coupled since the early days. It handles different parts like symmetries, ewald corrections, PAW routines, density and potential mixing routines and some MD minimizers. Also some XC functionals, initially natively implemented in the ABINIT code, are also coded in this library. Also this library uses the futile code, through the (experimental) PAW section.
- GaIn: this library handles analytic integrals of common operators between Gaussian Functions. It does not perform low-level operations and can be linked separately;
- BigDFT: the core routines of this package
- spred: a library for structure prediction tools, that is compiled on top of BigDFT routines.
In the previous versions, all these different packages were compiled with the same configuration instructions (see Installation page). With the present version, each of the code sections described above can be considered as a separate package (some more are upcoming), which improves modularity between code sections and reduces side-effects. In addition, each package can now be compiled with different installation instructions.
We have used a building suite tool based on the Jhbuild, which is regularly used by developers of gnome project. We have re-adapted/added some of the functionality of the jhbuild package to meet the needs of our package. Let us now present how the installation should work. We have prepared a script, called Installer.py, which should take care on the main actions related to BigDFT suite compilation and installation. Let us investigate how it works.
Installing the Bigdft suite from a configure line
As written above, packages were already configured and compiled with a previous BigDFT version. Therefore we have prepared a compilation method to compile the 1.8.x build system from a configure line. See in the examples page some of the configure lines which were already tested on different machines.
The principle of this installer is to execute, instead of the configure script, the following command:
<path_to_sources>/Installer.py build -c <old_configure_line>
Let us consider the example of the pilipili machine (internal L_Sim lab machine). Clearly, environment modules still have to be loaded:
module load intel/13.0.1 impi/4.1.0.024
Then the installer script can be used with the following command:
<path_to_sources>/Installer.py build -c 'FCFLAGS=-O2 -openmp' '--with-ext-linalg=-L/opt/intel/composer_xe_2013.1.117/mkl/lib/intel64 -lmkl_rt -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64 -liomp5 -lm' '--enable-opencl' 'CC=mpicc' 'CXX=mpicxx' 'FC=mpifc' 'F77=mpif77' 'FCLIBS= '
The following message dialog will appear:
Configuration chosen for the Installer: Hostname: pilipili Source directory: /home/athelas/genovese/work/BigDFT/1.8 Compiling from a branch: True Build directory: /local/genovese/binaries/1.8-ocl Action chosen: build Verbose: False Jhbuild baseline: <path_to_sources>/jhbuild.py Configuration options: Source: Environment variable 'BIGDFT_CONFIGURE_FLAGS' Value: '"FCFLAGS=-O2 -openmp" "--with-ext-linalg=-L/opt/intel/composer_xe_2013.1.117/mkl/lib/intel64 -lmkl_rt -lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64 -liomp5 -lm" "--enable-opencl" "CC=mpicc" "CXX=mpicxx" "FC=mpifc" "F77=mpif77" "FCLIBS= " ' Do you want to continue (Y/n)?
The Installer script has detected the different compilation options. It has filled the environment variable BIGDFT_CONFIGURE_FLAGS with the options passed after the -c option in the command line. By typing Y the bigdft bundle will build.
As we did not specified the -d option (type ./Installer.py help for the available commands and options), the code will be built in silent mode (this would correspond to the tinderbox option of JhBuild. You should the following information in the output:
List of modules to be treated: ['libyaml', 'futile', 'psolver', 'libxc', 'libABINIT', 'GaIn', 'bigdft', 'spred'] libyaml : ['checkout', 'configure', 'build', 'install'] futile : ['checkout', 'configure', 'build', 'install'] psolver : ['checkout', 'configure', 'build', 'install'] libxc : ['checkout', 'configure', 'build', 'install'] libABINIT : ['checkout', 'configure', 'build', 'install'] GaIn : ['checkout', 'configure', 'build', 'install'] bigdft : ['checkout', 'configure', 'build', 'install'] spred : ['checkout', 'configure', 'build', 'install']
Then in the directory named build of the build tree you might find the index.html file that contains the status of the compilation.
<to be continued>
Building the executables
There are some practicle examples of compilations on different architectures where you might find useful information on how the code has been compiled on different platforms and for different options.
Linking external software with BigDFT packages
From version 1.8.0 on the build system of BigDFT is "generic" in the sense that it does not only allow the compilation of the main BigDFT software, but also of various sub-packages. This is useful if one is only interested in some of the packages distributed with BigDFT.
As an example we will show the compilation of the CheSS package, which itself depends on futile. It can be downloaded here:  After downloading the tar.gz execute the following steps:
tar -xzvf CheSS-0.1.1.tar.gz cd CheSS-0.1.1 mkdir Build cd Build ../Installer.py build chess -d -c FC=<Fortran compiler> CC=<C compiler> FCFLAGS=<Fortran compiler flags> --with-ext-linalg=<link to BLAS/LAPACK libraries>
A dialogue similar to this one should appear:
Configuration chosen for the Installer: Hostname: stephan-Latitude-E7450 Source directory: /home/stephan/Documents/BigDFT/stablebranch Compiling from a branch: True Build directory: /home/stephan/Documents/BigDFT/stablebranch/Build-gnu_debug Action chosen: dist Verbose: True Jhbuild baseline: ../jhbuild.py -f buildrc Configuration options: Source: Configuration file '/home/stephan/Documents/BigDFT/stablebranch/Build-gnu_debug/buildrc' Do you want to continue (Y/n)?
Confirm and wait until the compilation in complete. In order to link now another software with CheSS, run the command
../Installer.py link chess
which should give you an output similar to this one:
--------- Linking line to build with package "chess": -I/home/stephan/Downloads/CheSS-0.1.1/Build/install/include-L/home/stephan/Downloads/CheSS-0.1.1/Build/install/lib -lCheSS-1 -lfutile-1 -lblacs-openmpi -lblacsF77init-openmpi -llapack -lblas -lyaml -lrt -lfutile-1 -lblacs-openmpi -lblacsF77init-openmpi -llapack -lblas -lyaml -lrt --------------------------------------------------
This is the link line that you can now use in your other software to link with CheSS.