Compile BDF-GTO by using Cmake

Requirements

Cmake -- 3.15 or newer.

Configure and compiling BDF

Linux, MKL and ifort

You may use the shell script bootstrap to configure BDF. The configuration script bootstrap has such contains:

# Configure for different platform
#TARGET = $1

export FC=ifort
export CC=gcc
export CXX=g++

./setup --fc=${FC} --cc=${CC} --cxx=${CXX} --int64 --mkl sequential $1

You just need to use the following commands to configure, build and install BDF.

./bootstrap build
cd build
make -j8
make install

The command "bootstrap" will configure BDF in the first step. The python script setup is invoked, parameters in setup are set and pass to cmake. The cmake is executed by the setup command automatically to build BDF in the directory build. Then, you will enter in the directory and compile BDF via the command "make -j8". The parallel compiling is evoked. Finally, you will use the command "make install" to install BDF in the directory "build/bdf-pkg-full" or "build/bdf-pkg-pro".

Precompiled BLAS and Lapack from netlib

You may use the shell script bootstrap to configure BDF. You just need to use the command

./bootstrap build
cd build
make -j8
make install

The contents of bootstrap are

export FC=gfortran
export CC=gcc
export CXX=g++

export LIBMATH="-L/Users/bsuo/Library/mathlib/lapack-3.8.0 -llapack -lblas -lcblas -llapacke"
export INCMATH="-I/Users/bsuo/Library/mathlib/lapack-3.8.0/LAPACKE/include -I/Users/bsuo/Library/mathlib/lapack-3.8.0/CBLAS/include"

./setup --debug --int64 --mathinclude-flags="${INCMATH}" --mathlib-flags="${LIBMATH}" $1

Here, Fortran, C, and C++ compilers are set first. Then, the link flags for blas and lapack libraries are set as LIBMATH. The directory of the lapacke head files is set as INCMATH. If you use MKL, you just need to set the proper parameters to variables LIBMATH and INCMATH. Here is an example to compile BDF with ifort, gcc, g++, and MKL.