Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATS-2938/XUP-169449: PKG/SPEC - expanse/0.17.3/cpu/b - User request to install dftbplus #109

Open
mkandes opened this issue Sep 27, 2023 · 2 comments

Comments

@mkandes
Copy link
Member

mkandes commented Sep 27, 2023

Note, however, the latest version of the dftbplus Spack package only supports up to dftbplus v19.1, which is quite old now. Moreover, the newer versions of dftbplus have changed their build options and dependencies quite a bit since v19.1, such as eliminating use of the dftd3 library, which this user requested, but now may have equivalent support via a new internal implementation. As such, some significant changes and/or updates to the Spack package are required to support the latest versions of dftbplus.

@mkandes
Copy link
Member Author

mkandes commented Oct 6, 2023

@mkandes
Copy link
Member Author

mkandes commented Oct 27, 2023

Even the v19.1 build from Spack was failing on the some of the features requested by the user. A custom build script was created for the user. This may serve as the starting point for an updated Spack package sometime in the future.

[mkandes@login01 dftbplus]$ pwd
/home/mkandes/software/dftbplus
[mkandes@login01 dftbplus]$ cat build-dftbplus.sh 
#!/usr/bin/env bash
#
# A build script to compile DFTB+ (on Expanse).
#
# https://dftbplus.org
# https://github.com/dftbplus
#
# https://access-ci.atlassian.net/browse/ATS-2938

#SBATCH --job-name=build-dftbplus-23.1-20231025
#SBATCH --account=use300
#SBATCH --partition=debug
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=2
#SBATCH --mem=4G
#SBATCH --time=00:30:00
#SBATCH --output=%x.o%j.%N

declare -xr COMPILER_MODULE='gcc/10.2.0'
declare -xr CMAKE_MODULE='cmake/3.21.4'
declare -xr LAPACK_MODULE='openblas/0.3.18'
declare -xr ARPACK_MODULE='arpack-ng/3.8.0'

declare -xr DFTBPLUS_VERSION='23.1'
declare -xr DFTBPLUS_ROOT_DIR="${HOME}/software/dftbplus"
declare -xr DFTBPLUS_INSTALL_DIR="${DFTBPLUS_ROOT_DIR}/${DFTBPLUS_VERSION}/${COMPILER_MODULE}/${MPI_MODULE}"

module reset
module load "${COMPILER_MODULE}"
module load "${CMAKE_MODULE}"
module load "${LAPACK_MODULE}"
module load "${ARPACK_MODULE}"
module list
printenv

mkdir -p "${DFTBPLUS_INSTALL_DIR}"
cd "${DFTBPLUS_INSTALL_DIR}"

git clone https://github.com/dftbplus/dftbplus.git
cd dftbplus
git checkout "${DFTBPLUS_VERSION}"

./utils/get_opt_externals ALL

cmake -DCMAKE_INSTALL_PREFIX="${DFTBPLUS_INSTALL_DIR}" \
  -DWITH_ARPACK='Y' \
  -DWITH_MBD='Y' \
  -DWITH_SDFTD3='Y' \
  -DWITH_OMP='Y' \
  -DWITH_MPI='N' \
  -B _build .
cmake --build _build -- -j
cmake --install _build
[mkandes@login01 dftbplus]$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant