DFTB+ 23.1 (OpenMP)

ウェブページ

https://dftbplus.org/

バージョン

23.1

ビルド環境

  • Intel oneAPI Compiler Classic 2023.1.0
  • Intel MKL 2023.1.0
  • CUDA 12.0

必要なファイル

  • magma-2.7.1.tar.gz
  • plumed-src-2.9.0.tgz
  • dftbplus-23.1.tar.xz

ビルド手順

MAGMA

#!/bin/sh
MAGMA_VERSION=2.7.1
MAGMA_DIRNAME=magma-${MAGMA_VERSION}
PARALLEL=64
COMPILER=intel2023.1.0
BASEDIR=${HOME}/Software/magma/${MAGMA_VERSION}
MAGMA_TARBALL=${BASEDIR}/magma-${MAGMA_VERSION}.tar.gz
WORKDIR=/gwork/users/${USER}
INSTALLDIR=/apl/magma/${MAGMA_VERSION}
#-------------------------------------------------------------------------------
cd $WORKDIR

if [ ! -d $MAGMA_DIRNAME ]; then
    tar xzf ${MAGMA_TARBALL}
fi

cd $MAGMA_DIRNAME
if [ ! -d build ]; then
    mkdir build
fi

if [ -f build/CMakeCache.txt ]; then
    rm -rf build/*
fi

cd build
module -s purge
module -s load mkl/2023.1.0
module -s load cuda/12.0

FC=ifort CC=icc CXX=icpc cmake -DCMAKE_INSTALL_PREFIX=${INSTALLDIR} -DBUILD_SHARED_LIBS=on ..

make lib
make testing
make sparse-lib
make sparse-testing
make install

PLUMED(非MPI版)

#!/bin/sh
PLUMED_VERSION=2.9.0
PLUMED_DIRNAME=plumed-${PLUMED_VERSION}
PARALLEL=64
COMPILER=intel2023.1.0
BASEDIR=${HOME}/Software/plumed/${PLUMED_VERSION}
PLUMED_TARBALL=${BASEDIR}/plumed-src-${PLUMED_VERSION}.tgz
WORKDIR=/gwork/users/${USER}
INSTALLDIR=/apl/plumed/${PLUMED_VERSION}/${COMPILER}/non-mpi
#-------------------------------------------------------------------------------
cd $WORKDIR
if [ ! -d $PLUMED_DIRNAME ]; then
    tar xzf ${PLUMED_TARBALL}
fi

cd $PLUMED_DIRNAME
module -s purge
module -s load mkl/2023.1.0

FC=ifort CC=icc CXX=icpc ./configure --prefix=${INSTALLDIR} --enable-mpi=no --enable-libsearch=no LIBS="-lstdc++ -qmkl"  CXXFLAGS="-O3  -fopenmp -diag-disable=10441"

make -j ${PARALLEL}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${WORKDIR}/${PLUMED_DIRNAME}/src/lib
make test
make install

DFTB+

#!/bin/sh
DFTBPLUS_VERSION=23.1
DFTBPLUS_DIRNAME=dftbplus-${DFTBPLUS_VERSION}
PARALLEL=64
BASEDIR=${HOME}/Software/dftbplus/${DFTBPLUS_VERSION}
DFTBPLUS_TARBALL=${BASEDIR}/${DFTBPLUS_DIRNAME}.tar.xz
WORKDIR=/gwork/users/${USER}
INSTALLDIR=/apl/dftb+/${DFTBPLUS_VERSION}/non-ompi
PLUMED_DIR=/apl/plumed/2.9.0/intel2023.1.0/non-mpi
MAGMA_DIR=/apl/magma/2.7.1
LIBMBD=${HOME}/libmbd/libmbd
#-------------------------------------------------------------------------------
cd $WORKDIR
if [ ! -d $DFTBPLUS_DIRNAME ]; then
    tar xJf ${DFTBPLUS_TARBALL}
fi

cd $DFTBPLUS_DIRNAME
if [ ! -d _build ]; then
    mkdir _build
fi

module -s purge
module -s load mkl/2023.1.0
module -s load cuda/12.0

if [ -f _build/CMakeCache.txt ]; then
   rm -rf _build/*
fi

rm -rf external/mbd/origin 
cp -a ${LIBMBD} external/mbd/origin

FC=ifort CC=icc CMAKE_PREFIX_PATH="${LD_LIBRARY_PATH}:${ELSI_DIR}:${PLUMED_DIR}" cmake -DCMAKE_INSTALL_PREFIX=${INSTALLDIR} -DWITH_OMP=TRUE -DWITH_MPI=FALSE -DWITH_GPU=TRUE -DWITH_ELSI=FALSE -DWITH_TRANSPORT=TRUE -DWITH_TBLITE=TRUE -DWITH_SOCKETS=TRUE -DWITH_SDFTD3=TRUE -DWITH_MBD=TRUE -DWITH_PLUMED=TRUE -DWITH_CHIMES=TRUE -DWITH_ARPACK=TRUE  -B _build .

cmake --build _build -- -j ${PARALLEL}

# Test
 ulimit -s unlimited
 ./utils/get_opt_externals
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PLUMED_DIR}/lib
 pushd _build; ctest -j${PARALLEL}; popd

# Install
cmake --install _build

メモ

  • 特筆すべき事項無し