System requirements
You'll need the following build tools to compile BDF:
autoconf 2.59 or later (Unix only) libtool 2.1 or later (Unix only) python 2.6 or later certain linux distros need to install development packages for python (python-dev), zlib, (zlib1g-dev on Ubuntu, zlib-devel on OpenSUSE) lxml 2.3 or later (http://codespeak.net/lxml/index.html#download) a reasonable C compiler (gcc, icc, etc.) a reasonable Fortran compiler (gfortran, ifort, etc.)
Configure and compile BDF-STO package
The simplest way to compile this package is:
- 1.'cd' to the directory containing the package's source code and type
./autogen.sh
to automatically generate Makefile.in and configure script if they do not exist.
- 2.Using following codes to configure and compile:
mkdir build && cd build ../configure --enable-mkspec=YOUR-MKSPEC --prefix=/PATH/TO/INSTALL make install
Here YOUR-MKSPEC is the name of mkspec which match your OS and compiler configuration. For all supported configurations, please see those subdirectory names (except 'common') under the directory 'mkspecs', e.g. 'linux-intel-cxe2015'.
If compile and test successfully, the bdf binary will be installed under the directory '/PATH/TO/INSTALL/bin'. There are some sample jobs under the directory 'testsuit/testjobs'. They will be installed under '/PATH/TO/INSTALL/share/bdf/testjobs'
You can use following commands to run samples
/path/to/install/bin/bdf testsuit/testjobs/h2o_dks.job
Using XCFun in BDF-STO
All the following things should be done after autogen.sh 1.XCFun installation:
git clone https://github.com/dftlibs/xcfun.git cd xcfun git checkout 355f42497a9cd17d16ae91da1f1aaaf93756ae8b cd .. && tar czf xcfun.tar.gz xcfun cd xcfun mkdir build && cd build cmake -DCMAKE_C_COMPILER=icc _DCMAKE_CXX_COMPILER=icpc -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=1 -DXC_MAX_ORDER=3 -DXCFUN_ENABLE_TESTS=0 -DCMAKE_INSTALL_PREFIX:PATH=/opt -DCMAKE_INSTALL_LIBDIR:PATH=lib .. make && make install
2.Change the configure:
ac_cv_fc_libs="$FCLIBS -lxcfun_f90_bindings -lxcfun" # Let the user override the test.
in line 7251.Add the dynamic link to configure,so configure will generate the makefile,which contains the "-lxcfun_f90_bindings -lxcfun" .
3.Change the src/nmr/Makefile.am:
- For example,
-I/home/pzc/xcfun/include
should be added to AM_FCFLAGS and AM_FFLAGS
4.Configure and compile:
mkdir build && cd build ../configure --enable-mkspec=YOUR-MKSPEC --prefix=/PATH/TO/INSTALL make install