Skip to content

Commit

Permalink
Update SIRIUS and dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Dr. Mathieu Taillefumier <mathieu.taillefumier@free.fr>
  • Loading branch information
mtaillefumier authored and dev-zero committed Jul 1, 2021
1 parent 11fd470 commit 2eaa699
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 48 deletions.
18 changes: 9 additions & 9 deletions src/sirius_interface.F
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ MODULE sirius_interface
sirius_create_context, sirius_create_ground_state, sirius_create_kset_from_grid, &
sirius_dump_runtime_setup, sirius_finalize, sirius_find_ground_state, &
sirius_get_band_energies, sirius_get_band_occupancies, sirius_get_energy, &
sirius_get_forces, sirius_get_kpoint_properties, sirius_get_num_bands, &
sirius_get_num_kpoints, sirius_get_num_spin_components, sirius_get_stress_tensor, &
sirius_import_parameters, sirius_initialize, sirius_initialize_context, &
sirius_option_add_string_to, sirius_option_get_length, sirius_option_get_name_and_type, &
sirius_option_set_double, sirius_option_set_int, sirius_option_set_logical, &
sirius_option_set_string, sirius_set_atom_position, sirius_set_atom_type_dion, &
sirius_set_atom_type_radial_grid, sirius_set_lattice_vectors, sirius_update_ground_state
sirius_get_forces, sirius_get_kpoint_properties, sirius_get_num_kpoints, &
sirius_get_parameters, sirius_get_stress_tensor, sirius_import_parameters, &
sirius_initialize, sirius_initialize_context, sirius_option_add_string_to, &
sirius_option_get_length, sirius_option_get_name_and_type, sirius_option_set_double, &
sirius_option_set_int, sirius_option_set_logical, sirius_option_set_string, &
sirius_set_atom_position, sirius_set_atom_type_dion, sirius_set_atom_type_radial_grid, &
sirius_set_lattice_vectors, sirius_update_ground_state
USE xc_libxc, ONLY: libxc_check_existence_in_libxc
#include "./base/base_uses.f90"

Expand Down Expand Up @@ -690,9 +690,9 @@ SUBROUTINE cp_sirius_print_results(pwdft_env, print_section)

CALL sirius_get_num_kpoints(ks_handler, cint)
nkpts = cint
CALL sirius_get_num_bands(sctx, cint)
CALL sirius_get_parameters(sctx, num_bands=cint)
nbands = cint
CALL sirius_get_num_spin_components(sctx, cint)
CALL sirius_get_parameters(sctx, num_spins=cint)
nspins = cint
e_fermi(:) = 0.0_dp
ALLOCATE (energies(nbands, nspins, nkpts))
Expand Down
2 changes: 1 addition & 1 deletion tests/SIRIUS/regtest-1/Au.inp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
CONVERGE_BY_ENERGY 1
&END ITERATIVE_SOLVER
&MIXER
TYPE broyden1
TYPE broyden2
MAX_HISTORY 8
BETA 0.6
&END MIXER
Expand Down
2 changes: 1 addition & 1 deletion tests/SIRIUS/regtest-1/Au_GTH.inp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
CONVERGE_BY_ENERGY 1
&END ITERATIVE_SOLVER
&MIXER
TYPE broyden1
TYPE broyden2
MAX_HISTORY 8
&END MIXER
&END PW_DFT
Expand Down
2 changes: 1 addition & 1 deletion tests/SIRIUS/regtest-1/Fe.inp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
&END ITERATIVE_SOLVER
&MIXER
BETA 0.7
TYPE broyden1
TYPE broyden2
MAX_HISTORY 8
&END MIXER
&END PW_DFT
Expand Down
2 changes: 1 addition & 1 deletion tests/SIRIUS/regtest-1/Fe_dos.inp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
&END ITERATIVE_SOLVER
&MIXER
BETA 0.7
TYPE broyden1
TYPE broyden2
MAX_HISTORY 8
&END MIXER
&PRINT
Expand Down
9 changes: 5 additions & 4 deletions tests/SIRIUS/regtest-1/He-full-potential.inp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
ELECTRONIC_STRUCTURE_METHOD full_potential_lapwlo
SMEARING_WIDTH 0.05
USE_SYMMETRY true
NUM_MAG_DIMS 0
VALENCE_RELATIVITY none
CORE_RELATIVITY none
NUM_FV_STATES 40
AW_CUTOFF 8.0
PW_CUTOFF 20.00
Expand All @@ -35,7 +36,7 @@
&END ITERATIVE_SOLVER
&MIXER
BETA 0.95
TYPE broyden1
TYPE anderson
MAX_HISTORY 8
&END MIXER
&END PW_DFT
Expand All @@ -44,8 +45,8 @@
&XC_FUNCTIONAL
&LDA_X
&END LDA_X
&LDA_C_PZ
&END LDA_C_PZ
&LDA_C_VWN
&END LDA_C_VWN
&END XC_FUNCTIONAL
&END XC
&END DFT
Expand Down
2 changes: 1 addition & 1 deletion tests/SIRIUS/regtest-1/LiF.inp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
&END ITERATIVE_SOLVER
&MIXER
BETA 0.75
TYPE broyden1
TYPE broyden2
MAX_HISTORY 8
&END MIXER
&END PW_DFT
Expand Down
2 changes: 1 addition & 1 deletion tests/SIRIUS/regtest-1/NiO.inp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
&END ITERATIVE_SOLVER
&MIXER
BETA 0.75
TYPE broyden1
TYPE broyden2
MAX_HISTORY 8
&END MIXER
&END PW_DFT
Expand Down
2 changes: 1 addition & 1 deletion tests/SIRIUS/regtest-1/SrVO.inp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
&END ITERATIVE_SOLVER
&MIXER
BETA 0.95
TYPE broyden1
TYPE broyden2
MAX_HISTORY 8
&END MIXER
&END PW_DFT
Expand Down
12 changes: 6 additions & 6 deletions tests/SIRIUS/regtest-1/TEST_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# testing global tree creation using single exact potential, the deterministic random number generator
# with the standard move types, check i
# fully test non colinear magnetism with spin orbit coupling
Au.inp 85 1.0E-5 -147.22556668
Fe.inp 85 1.0E-5 -253.63735188
Fe_dos.inp 85 1.0E-5 -253.63735188
He-full-potential.inp 85 1.0E-5 -2.8347354724
SrVO.inp 85 1.0E-5 -156.37672956
LiF.inp 85 1.0E-5 -36.65852944
Au.inp 85 1.0E-5 -147.227895856458247
Fe.inp 85 1.0E-5 -253.668684545290461
Fe_dos.inp 85 1.0E-5 -253.668684545287363
He-full-potential.inp 85 1.0E-5 -2.835116603331211
SrVO.inp 85 1.0E-5 -156.387115103329052
LiF.inp 85 1.0E-5 -36.658534644530739
#EOF
10 changes: 5 additions & 5 deletions tools/toolchain/install_cp2k_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ with_spla="__DONTUSE__"
with_cosma="__INSTALL__"
with_libvori="__INSTALL__"
# for MPI, we try to detect system MPI variant
with_openmpi=__SYSTEM__
with_mpich=__SYSTEM__
with_intelmpi=__SYSTEM__
with_openmpi="__SYSTEM__"
with_mpich="__SYSTEM__"
with_intelmpi="__SYSTEM__"
if (command -v mpirun >&- 2>&-); then
# check if we are dealing with openmpi, mpich or intelmpi
if (mpirun --version 2>&1 | grep -s -q "HYDRA"); then
Expand Down Expand Up @@ -729,8 +729,8 @@ if [ "$with_sirius" = "__INSTALL__" ]; then
[ "$with_fftw" = "__DONTUSE__" ] && with_fftw="__INSTALL__"
[ "$with_spglib" = "__DONTUSE__" ] && with_spglib="__INSTALL__"
[ "$with_hdf5" = "__DONTUSE__" ] && with_hdf5="__INSTALL__"
[ "$with_libvdwxc" = "__DONTUSE__" ] && with_libvdwxc="__INSTALL__"
[ "$with_cosma" = "__DONTUSE__" ] && with_cosma="__INSTALL__"
# [ "$with_libvdwxc" = "__DONTUSE__" ] && with_libvdwxc="__INSTALL__"
# [ "$with_cosma" = "__DONTUSE__" ] && with_cosma="__INSTALL__"
fi

if [ "$with_plumed" = "__INSTALL__" ]; then
Expand Down
17 changes: 8 additions & 9 deletions tools/toolchain/scripts/stage8/install_sirius.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"

sirius_ver="7.0.2"
sirius_sha256="ee613607ce3be0b2c3f69b560b2415ce1b0e015179002aa90739430dbfaa0389"
sirius_ver="7.2.5"
sirius_sha256="794e03d4da91025f77542d3d593d87a8c74e980394f658a0210a4fd91c011f22"

source "${SCRIPT_DIR}"/common_vars.sh
source "${SCRIPT_DIR}"/tool_kit.sh
Expand Down Expand Up @@ -135,8 +135,7 @@ case "$with_sirius" in
COMPILATION_OPTIONS="-DUSE_MKL=ON -DUSE_SCALAPACK=ON $COMPILATION_OPTIONS"
fi

CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${SPFFT_ROOT}/lib/cmake:${SPFFT_ROOT}/lib64/cmake" \
cmake -DCMAKE_INSTALL_PREFIX=${pkg_install_dir} \
cmake -DCMAKE_INSTALL_PREFIX="${pkg_install_dir}" \
-DCMAKE_CXXFLAGS_RELEASE="${SIRIUS_OPT}" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="${SIRIUS_DBG}" \
-DCMAKE_CXX_COMPILER="${MPICXX}" \
Expand All @@ -147,11 +146,11 @@ case "$with_sirius" in

make -j $(get_nprocs) -C src >> compile.log 2>&1

install -d ${pkg_install_dir}/include >> install.log 2>&1
install -d ${pkg_install_dir}/lib >> install.log 2>&1
cp -R ../src/* ${pkg_install_dir}/include >> install.log 2>&1
install -m 644 src/*.a ${pkg_install_dir}/lib >> install.log 2>&1
install -m 644 src/mod_files/*.mod ${pkg_install_dir}/include >> install.log 2>&1
install -d "${pkg_install_dir}/include" >> install.log 2>&1
install -d "${pkg_install_dir}/lib" >> install.log 2>&1
cp -R ../src/* "${pkg_install_dir}/include" >> install.log 2>&1
install -m 644 src/*.a "${pkg_install_dir}/lib" >> install.log 2>&1
install -m 644 src/mod_files/*.mod "${pkg_install_dir}/include" >> install.log 2>&1
cd ..

# now do we have cuda as well
Expand Down
13 changes: 9 additions & 4 deletions tools/toolchain/scripts/stage8/install_spfft.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"

spfft_ver="0.9.13"
spfft_sha256="621543658991782dd184948082c7eea474b6759140f796bb55da2e2f654d3558"
spfft_ver="1.0.3"
spfft_sha256="b74ee66f766580d613bbcae91301cad545711e32c0a3e46860e0200b70915399"
source "${SCRIPT_DIR}"/common_vars.sh
source "${SCRIPT_DIR}"/tool_kit.sh
source "${SCRIPT_DIR}"/signal_trap.sh
Expand Down Expand Up @@ -55,6 +55,7 @@ case "$with_spfft" in
.. > cmake.log 2>&1
make -j $(get_nprocs) > make.log 2>&1
make -j $(get_nprocs) install > install.log 2>&1

cd ..

if [ "$ENABLE_CUDA" = "__TRUE__" ]; then
Expand All @@ -76,6 +77,10 @@ case "$with_spfft" in
[ -f src/libspfft.a ] && install -m 644 src/*.a ${pkg_install_dir}/lib/cuda >> install.log 2>&1
[ -f src/libspfft.so ] && install -m 644 src/*.so ${pkg_install_dir}/lib/cuda >> install.log 2>&1
fi

# workaround for https://github.com/eth-cscs/SpFFT/issues/46
[ -d "${pkg_install_dir}/lib/cmake/spfft/modules" ] && mv "${pkg_install_dir}/lib/cmake/spfft/modules" "${pkg_install_dir}/lib/cmake/SpFFT/modules"

write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage8/$(basename ${SCRIPT_NAME})"
fi
SPFFT_ROOT="${pkg_install_dir}"
Expand Down Expand Up @@ -116,7 +121,8 @@ prepend_path CPATH "$pkg_install_dir/include"
export SPFFT_INCLUDE_DIR="$pkg_install_dir/include"
export SPFFT_LIBS="-lspfft"
export SPFFT_ROOT="${pkg_install_dir}"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$pkg_install_dir/lib64/pkgconfig:$pkg_install_dir/lib/pkgconfig"
prepend_path PKG_CONFIG_PATH "${pkg_install_dir}/lib/pkgconfig"
prepend_path CMAKE_PREFIX_PATH "${pkg_install_dir}/lib/cmake/SpFFT"
EOF
fi
cat << EOF >> "${BUILDDIR}/setup_spfft"
Expand All @@ -129,7 +135,6 @@ export CP_LDFLAGS="\${CP_LDFLAGS} IF_CUDA(${SPFFT_CUDA_LDFLAGS}|${SPFFT_LDFLAGS}
export SPFFT_LIBRARY="-lspfft"
export SPFFT_ROOT="$pkg_install_dir"
export SPFFT_INCLUDE_DIR="$pkg_install_dir/include"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$pkg_install_dir/lib64/pkgconfig:$pkg_install_dir/lib/pkgconfig"
export SPFFT_VERSION=${spfft-ver}
export CP_LIBS="IF_MPI(${SPFFT_LIBS}|) \${CP_LIBS}"
EOF
Expand Down
12 changes: 8 additions & 4 deletions tools/toolchain/scripts/stage8/install_spla.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"

spla_ver="1.2.1"
spla_sha256="4d7237f752dc6257778c84ee19c9635072b1cb8ce8d9ab6e34a047f63a736b29"
spla_ver="1.4.0"
spla_sha256="364a9fe759fddec8a0839cf79f1cf0619fc36f4d4c15f1c2b1f437249d7840c6"
source "${SCRIPT_DIR}"/common_vars.sh
source "${SCRIPT_DIR}"/tool_kit.sh
source "${SCRIPT_DIR}"/signal_trap.sh
Expand Down Expand Up @@ -76,6 +76,10 @@ case "$with_spla" in
[ -f src/libspla.a ] && install -m 644 src/*.a ${pkg_install_dir}/lib/cuda >> install.log 2>&1
[ -f src/libspla.so ] && install -m 644 src/*.so ${pkg_install_dir}/lib/cuda >> install.log 2>&1
fi

# https://github.com/eth-cscs/spla/issues/17
[ -d "${pkg_install_dir}/lib/cmake/spla/modules" ] && mv "${pkg_install_dir}/lib/cmake/spla/modules" "${pkg_install_dir}/lib/cmake/SPLA/modules"

write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage8/$(basename ${SCRIPT_NAME})"
fi
SPLA_ROOT="${pkg_install_dir}"
Expand Down Expand Up @@ -116,7 +120,8 @@ prepend_path CPATH "$pkg_install_dir/include"
export SPLA_INCLUDE_DIR="$pkg_install_dir/include"
export SPLA_LIBS="-lspla"
export SPLA_ROOT="${pkg_install_dir}"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$pkg_install_dir/lib64/pkgconfig:$pkg_install_dir/lib/pkgconfig"
prepend_path CMAKE_PREFIX_PATH "${pkg_install_dir}/lib/cmake"
prepend_path PKG_CONFIG_PATH "${pkg_install_dir}/lib/pkgconfig"
EOF
fi
cat << EOF >> "${BUILDDIR}/setup_spla"
Expand All @@ -129,7 +134,6 @@ export CP_LDFLAGS="\${CP_LDFLAGS} IF_CUDA(${SPLA_CUDA_LDFLAGS}|${SPLA_LDFLAGS})"
export SPLA_LIBRARY="-lspla"
export SPLA_ROOT="$pkg_install_dir"
export SPLA_INCLUDE_DIR="$pkg_install_dir/include"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$pkg_install_dir/lib64/pkgconfig:$pkg_install_dir/lib/pkgconfig"
export SPLA_VERSION=${spla-ver}
export CP_LIBS="IF_MPI(${SPLA_LIBS}|) \${CP_LIBS}"
EOF
Expand Down

0 comments on commit 2eaa699

Please sign in to comment.