A fast and precise DFT wavelet code — 1.6.0 (2012-02-07)

Quick links:

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:

One can tune the compilation environnement using the following options:

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:

The executables

BigDFT provides the following executables: