Install BigDFT
Configure script
BigDFT build system is based on standard GNU autotools. The end
user does not need to have the Autotools package installed on his
computer, the configure script provided in BigDFT package
will to the job to create the Makefile and set the
options, like the optimisation level, the associated libraries to link
with...
After the package has been untared, the sources should be configured, depending on the system we want to run on. Thanks to the Autotools, it is possible to generate several builds from the same source tree. It is adviced to create a compilation directory, either inside or outside the source tree. Lets call this directory compile-gfortran for instance. One starts the configure from there 'source tree path'/configure.
General description of the options
All possible options at compile time are available using: ./configure --help.
The following modularities during compilation are available:
-
--disable-mpi: force not to use MPI during build. By default the configure will try to detect if the compiler has some native MPI capabilities. If not MPI will be automatically disabled. -
--enable-cuda-gpu/--enable-opencl: compile the CUDA parts to run on NVidia GPUs or OpenCL parts. These options require to add some others to find the CUDA/OpenCL environnement, see the--withoptions later.
One can tune the compilation environnement using the following options:
--with-cuda-path: give the path to the NVidia Cuda tools (default is/usr/local/cuda).--with-cuda-cflags: specify the flags for the NVidia Cuda Compiler.--with-ocl-path: give the path to the OpenCL installation (default is/usr).--with-ext-linalg: Give the name of the libraries replacing Blas and Lapack (default = none specified). Use the -l before the name(s).--with-ext-linalg-path: Give the path of the other linear algebra libraries (default =-L/usr/lib). Use the -L before the path(es).--with-etsf-io: link with ETSF_IO library for I/O (based on NetCDF).--with-etsf-io-path: Give the path of the ETSF_IO installation.FC: Specify the compiler.FC_FLAGS: Specify the flags, like the optimisation flags, to pass to the compiler (default are-g -O2for GNU compilers).--prefix=DIR: Specify your installation directory (/usr/localis default).
There are some other less important options to customize BigDFT more
precisely, see configure --help for a extensive list.
At the end of the configure script a summary is printed. It looks like that:
~/bigdft-trunk/tmp-gfortran$ ../configure \
FC=mpif90.openmpi \
FCFLAGS="-fbounds-check -O2 -Wall"
[...]
Basics:
Fortran90 compiler: mpif90.openmpi
Fortran90 compiler name:
Fortran90 flags: -fbounds-check -O2 -Wall
Fortran77 compiler: gfortran
Fortran77 flags: -g -O2
Linker flags: -L$(top_builddir)/libXC/src -L$(top_builddir)/libABINIT/src
Linked libraries: -labinit -lxc -llapack -lblas
Build:
Library ABINIT: yes
Library PSolver: yes
Library BigDFT: yes
Main binaries (cluster...):yes
Minima hopping binary: no
atom and pseudo binaries: no
User documentation: yes
Devel. documentation: yes / no
Options:
Debug version: no
With MPI: yes
| Include dir.:
| Linker flags:
| Linked libraries:
| MPI2 support: yes
With optimised conv.: yes
With Cuda GPU conv.: no
| NVidia Cuda Compiler:
| Cuda flags:
With OpenCL support: no
With dgemmsy support: no
With libXC: yes
| internal built: yes
| include dir.: -I$(top_builddir)/libXC/src
With libABINIT: yes
| internal built: yes
| include dir.: -I$(top_builddir)/libABINIT/src
With libS_GPU: no
| internal built: no
| include dir.:
With ETSF_IO: no
| include dir.:
Installation paths:
Source code location: ..
Prefix: /usr/local
Exec prefix: ${prefix}
Binaries: ${exec_prefix}/bin
Static libraries: ${exec_prefix}/lib
Fortran modules: ${prefix}/include/
Documentation: ${datarootdir}/doc/${PACKAGE_TARNAME}
Now, let's look at some most common cases...
Use Intel MKL libraries
The Intel compiler is usually provided with native Lapack and Blas
implementations, called the MKL libraries. To use them, the option to
pass to configure is --with-ext-linalg.
../configure --with-ext-linalg="-lmkl_ia32 -lmkl_lapack" --with-ext-linalg-path="-L/opt/intel/mkl72/lib/32" --prefix=/home/caliste/usr FC=ifort
In this example, the --prefix option is provided also
to specify the destination directory for installation.
MPI compilation
MPI detection is enable by default and the current Fortran compiler is tested with respect to MPI capabilities. MPI and MPI2 are supported. If MPI2 is not available a fallback has been implemented.
If the Fortran compiler does not support MPI, a warning message is
output by configure script. To remove this message, one needs to
specify not to detect MPI capabilities with --disable-mpi
option.
One can also pass all the options for the MPI link proceeding using
the options --with-mpi-include, --with-mpi-ldflags
and --with-mpi-libs.
OpenCL compilation
Here is a example using the Intel
Fortran compiler and OpenCL installed in /applications/cuda-3.2:
../../sources/bigdft-1.5.1/configure FC=ifort --enable-opencl --with-ocl-path=/applications/cuda-3.2
CUDA compilation
The compilation with CUDA currently required to compile the code
with "second underscore". It is for the compiler to know how to link C
and Fortran sources together. Here is a example using the Intel
Fortran compiler and CUDA installed in /applications/cuda-2.2:
../../sources/bigdft-1.3.0-dev/configure FC=ifort FCFLAGS="-O2 -assume 2underscores" CC=icc CXX=icc CXXFLAGS="-O2 -I/applications/cuda-2.2/include/" CFLAGS="-O2 -I/applications/cuda-2.2/include/" --enable-cuda-gpu --with-cuda-path=/applications/cuda-2.2
NetCDF I/O
Here is a example using the Intel
Fortran compiler, NetCDF installed in /applications/netcdf-3.6.3 and ETSF_IO compiled in a home directory:
../../sources/bigdft-1.5.1/configure FC=ifort --with-etsf-io --with-etsf-io-path=$HOME/usr --with-netcdf-path=/applications/netcdf-3.6.3
Run the tests
BigDFT is provided with several test cases (that can also be
studied as examples). They are located in the tests
directory. To run the tests, after compilation, issue make
check in this directory.
To run tests with MPI support, use the environment variable 'run_parallel' as:
export run_parallel='mpirun -np 2'
To run tests with OCL support, use the environment variable 'run_ocl' as:
export run_ocl='on'
The following tests are available:
BigDFT2Wannier: not documented yet.DFT/: tests the ground-state calculation capabilities.AgBulk[posinp.xyz, input.perf, input.dft, input.dft.~1~, input.mix, input.kpt]: Tests bulk Silver periodic boundary conditions, with an example for mixing and k-pointsC[posinp.xyz, input.dft, input.occ]: tests non-local pseudo-potential for isolated systemCa2[posinp.xyz, input.dft]: tests adaptive mesh (by checking symmetry)Davidson-SiH4[posinp.xyz, input.perf, input.dft]: tests Kohn-Sham eigenvalue calculationsElectField[posinp.xyz, input.dft]: tests the calculation when electric filed is applied in an arbitrary direction.FeHyb[posinp.xyz, input.occup, input.dft]: tests the hybrid functionalGPU[posinp.xyz, input.perf, input.dft]: tests GPU code (CUDA).Graphene[posinp.ascii, input.dft, input.kpt]: tests surface with k-points for a graphene sheetH[posinp.xyz, input.dft]: tests the hydrogen in a periodic boxH2-spin[posinp.xyz, input.dft]: uses the spin in the calculation of hydrogen atomH2O-CP2K[posinp.xyz, input.dft]: tests import wavefunctions from a gaussian basis setLi+[posinp.xyz, input.dft]: calculates an isolated charged systemLinear[posinp.xyz, input.perf, input.lin, input.dft]: not documented yet.Locreg[posinp.ascii, input.perf, input.lin, input.dft]: not documented yet.Mn2[posinp.xyz, input.dft]: tests non-collinear spinNaCl[posinp.xyz, input.perf, input.geopt, input.dft]: tests non-local pseudo-potential and adaptive meshO2-Spin[posinp.xyz, input.dft, input.mix]: not documented yet.OCL[posinp.xyz, input.perf, input.dft]: tests GPU code (OpenCL)SIC[]: not documented yet.SiBulk[posinp.xyz, input.perf, input.dft]: tests bulk silicon in periodic boundary conditionsSiH4[posinp.ascii, input.geopt, input.dft]: tests the geometry relaxation for the silane molecule. Use the ASCII file format instead of the XYZ oneTDDFT[posinp.xyz, input.dft, input.tddft]: not documented yet.TiMix[posinp.xyz, input.occup, input.dft, input.mix]: tests the diagonalisation and mixing scheme using a Pulay algorithm on densityTiSmear[posinp.xyz, input.dft, input.mix]: tests a different smearing method: Marzari'c cold amearing (could be changed for other methos as well)
libs/: not documented yet.CUDA[]: tests the convolutions with CUDAIO-wf[posinp.xyz, input.kpt]: tests writing and reading wavefunctions with NetCDF file formatOP2P[]: not documented yet.OpenCL[]: tests the convolutions with OpenCLPSolver[]: tests for the Poisson solver package.fft[]: Performs some tests on FFT library in serial.ftypes[posinp.ascii]: not documented yet.psp[]: not documented yet.xc[]: not documented yet.
overDFT/: not documented yet.BigDFT2Wannier[posinp.xyz, input.inter, input.dft]: not documented yet.GEOPT-BFGS[posinp.xyz, input.geopt, input.dft]: not documented yet.GEOPT-LBFGS[posinp.xyz, input.geopt, input.dft]: not documented yet.H2-freq[posinp.xyz, input.perf, input.dft, input.freq]: computes the vibration properties of the water molecule using finite differencesH2O-slab[posinp.xyz, input.geopt, input.dft]: tests the calculation of dipolar surfacesMINHOP[, input.perf, input.geopt, input.dft]: example to use the minima hopping method.NEB[, input.dft, input]: runs NEB calculationsNH3[posinp.ascii, input.geopt, input.dft]: shows the DIIS geometry relaxation to obtain saddle pointsSPLSAD[posinp.xyz, input.dft, input.splsad]: not documented yet.XabsCG[]: not documented yet.XabsCheb[]: tests XANES calculationsXabsLanc[]: not documented yet.Xabsb2B[]: not documented yet.
The executables
BigDFT provides the following executables:
bigdft(previously calledcluster): run DFT ground state calculations with or without geometry relaxations.memguess: read BigDFT inputs and provide an accurate estimation of memory requirement (for each CPU in case of MPI run). It can also do some simple jobs:Usage: ./memguess <nproc> [option] Indicate the number of processes after the executable [option] can be the following: "y": grid to be plotted with V_Sim "o" rotate the molecule such that the volume of the simulation box is optimised "GPUtest <nrep>" case of a CUDAGPU calculation, to test the speed of 3d operators <nrep> is the number of repeats "ugrade" ugrades input files older than 1.2 into actual format "convert <from.[cube,etsf]> <to.[cube,etsf]>" converts file "from" to file "to" using the given formats "atwf <ng>" calculates the atomic wavefunctions of the first atom in the gatom basis and write their expression in the "gatom-wfn.dat" file <ng> is the number of gaussians used for the gatom calculation.NEB: run a NEB path search (requires to provide also NEB_driver.sh and NEB_include.sh).frequencies: run a finite difference calculation to find vibrations for a molecule.MDanaysis: browse the 'posout' files generated during a molecular dynamic to compute several quantities, like the radial distribution g(r).bart: EXPERIMENTAL, ART implementation using BigDFT for the force calculation.abscalc: EXPERIMENTAL, compute XANES spectrum.