Skip to content

Commit

Permalink
Merge branch 'develop' into fix-elpa
Browse files Browse the repository at this point in the history
  • Loading branch information
dzzz2001 authored Sep 23, 2024
2 parents 625aac7 + acb792d commit 9150cf7
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 30 deletions.
6 changes: 3 additions & 3 deletions source/module_base/sph_bessel_recursive.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define SPH_BESSEL_RECURSIVE_H

#include <vector>
#include"stddef.h"
#include<cstddef>

namespace ModuleBase
{
Expand All @@ -32,7 +32,7 @@ class Sph_Bessel_Recursive::D1

private:
std::vector<std::vector<double>> jlx; // jlx[l][x]
double dx;
double dx = 0.0;
bool finish_set_dx = false;

void cal_jlx_0( const int l_size );
Expand All @@ -56,7 +56,7 @@ class Sph_Bessel_Recursive::D2

private:
std::vector<std::vector<std::vector<double>>> jlx; // jlx[l][x1][x2]
double dx;
double dx = 0.0;
bool finish_set_dx = false;

void cal_jlx_0( const int l_size, const size_t ix1_size, const size_t ix2_size );
Expand Down
10 changes: 5 additions & 5 deletions toolchain/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The ABACUS Toolchain

Version 2024.2
Version 2024.3

## Author

Expand Down Expand Up @@ -108,13 +108,13 @@ The needed dependencies version default:

- `cmake` 3.30.0
- `gcc` 13.2.0 (which will always NOT be installed, But use system)
- `OpenMPI` 5.0.5
- `OpenMPI` 4.1.6 (5.0.5 can be used but have some problem in OpenMP parallel computation in ELPA)
- `MPICH` 4.2.2
- `OpenBLAS` 0.3.27 (Intel toolchain need `get_vars.sh` tool from it)
- `ScaLAPACK` 2.2.1
- `OpenBLAS` 0.3.28 (Intel toolchain need `get_vars.sh` tool from it)
- `ScaLAPACK` 2.2.1 (a developing version)
- `FFTW` 3.3.10
- `LibXC` 6.2.2
- `ELPA` 2024.03.001
- `ELPA` 2024.05.001
- `CEREAL` 1.3.2
- `RapidJSON` 1.1.0
And Intel-oneAPI need user or server manager to manually install from Intel.
Expand Down
4 changes: 3 additions & 1 deletion toolchain/build_abacus_gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ ELPA=$INSTALL_DIR/elpa-2024.03.001/cpu
FFTW3=$INSTALL_DIR/fftw-3.3.10
CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal
LIBXC=$INSTALL_DIR/libxc-6.2.2
RAPIDJSON=$INSTALL_DIR/rapidjson-1.1.0/
# LIBRI=$INSTALL_DIR/LibRI-0.1.1
# LIBCOMM=$INSTALL_DIR/LibComm-0.1.0
# LIBTORCH=$INSTALL_DIR/libtorch-2.1.2/share/cmake/Torch
Expand All @@ -47,7 +48,8 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
-DENABLE_LIBXC=ON \
-DUSE_OPENMP=ON \
-DUSE_ELPA=ON \
-DENABLE_RAPIDJSON=OFF \
-DENABLE_RAPIDJSON=ON \
-DRapdidJSON_DIR=$RAPIDJSON \
# -DENABLE_DEEPKS=1 \
# -DTorch_DIR=$LIBTORCH \
# -Dlibnpy_INCLUDE_DIR=$LIBNPY \
Expand Down
4 changes: 3 additions & 1 deletion toolchain/build_abacus_intel-mpich.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ PREFIX=$ABACUS_DIR
ELPA=$INSTALL_DIR/elpa-2024.03.001/cpu
CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal
LIBXC=$INSTALL_DIR/libxc-6.2.2
RAPIDJSON=$INSTALL_DIR/rapidjson-1.1.0/
# LIBTORCH=$INSTALL_DIR/libtorch-2.1.2/share/cmake/Torch
# LIBNPY=$INSTALL_DIR/libnpy-1.0.1/include
# LIBRI=$INSTALL_DIR/LibRI-0.1.1
Expand All @@ -43,7 +44,8 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
-DENABLE_LIBXC=ON \
-DUSE_OPENMP=ON \
-DUSE_ELPA=ON \
-DENABLE_RAPIDJSON=OFF \
-DENABLE_RAPIDJSON=ON \
-DRapdidJSON_DIR=$RAPIDJSON \
# -DENABLE_DEEPKS=1 \
# -DTorch_DIR=$LIBTORCH \
# -Dlibnpy_INCLUDE_DIR=$LIBNPY \
Expand Down
4 changes: 3 additions & 1 deletion toolchain/build_abacus_intel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ PREFIX=$ABACUS_DIR
ELPA=$INSTALL_DIR/elpa-2024.03.001/cpu
CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal
LIBXC=$INSTALL_DIR/libxc-6.2.2
RAPIDJSON=$INSTALL_DIR/rapidjson-1.1.0/
# LIBTORCH=$INSTALL_DIR/libtorch-2.1.2/share/cmake/Torch
# LIBNPY=$INSTALL_DIR/libnpy-1.0.1/include
# LIBRI=$INSTALL_DIR/LibRI-0.1.1
Expand All @@ -44,7 +45,8 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
-DENABLE_LIBXC=ON \
-DUSE_OPENMP=ON \
-DUSE_ELPA=ON \
-DENABLE_RAPIDJSON=OFF \
-DENABLE_RAPIDJSON=ON \
-DRapdidJSON_DIR=$RAPIDJSON \
# -DENABLE_DEEPKS=1 \
# -DTorch_DIR=$LIBTORCH \
# -Dlibnpy_INCLUDE_DIR=$LIBNPY \
Expand Down
2 changes: 1 addition & 1 deletion toolchain/scripts/VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# version file to force a rebuild of the entire toolchain
VERSION="2024.2"
VERSION="2024.3"
4 changes: 2 additions & 2 deletions toolchain/scripts/get_openblas_arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")" && pwd -P)"

openblas_ver="0.3.27" # Keep in sync with install_openblas.sh
openblas_sha256="aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897"
openblas_ver="0.3.28" # Keep in sync with install_openblas.sh
openblas_sha256="f1003466ad074e9b0c8d421a204121100b0751c96fc6fcf3d1456bd12f8a00a1"
openblas_pkg="OpenBLAS-${openblas_ver}.tar.gz"

source "${SCRIPT_DIR}"/common_vars.sh
Expand Down
9 changes: 5 additions & 4 deletions toolchain/scripts/stage0/install_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ case "${with_cmake}" in
pkg_install_dir="${INSTALLDIR}/cmake-${cmake_ver}"
#pkg_install_dir="${HOME}/apps/cmake/${cmake_ver}"
install_lock_file="$pkg_install_dir/install_successful"
cmake_pkg="cmake-${cmake_ver}-${cmake_arch}.sh"
if verify_checksums "${install_lock_file}"; then
echo "cmake-${cmake_ver} is already installed, skipping it."
else
if [ -f cmake-${cmake_ver}-${cmake_arch}.sh ]; then
echo "cmake-${cmake_ver}-${cmake_arch}.sh is found"
if [ -f $cmake_pkg ]; then
echo "$cmake_pkg is found"
else
download_pkg_from_ABACUS_org "${cmake_sha256}" "cmake-${cmake_ver}-${cmake_arch}.sh"
download_pkg_from_ABACUS_org "${cmake_sha256}" "$cmake_pkg"
fi
echo "Installing from scratch into ${pkg_install_dir}"
mkdir -p ${pkg_install_dir}
/bin/sh cmake-${cmake_ver}-${cmake_arch}.sh --prefix=${pkg_install_dir} --skip-license > install.log 2>&1 || tail -n ${LOG_LINES} install.log
/bin/sh $cmake_pkg --prefix=${pkg_install_dir} --skip-license > install.log 2>&1 || tail -n ${LOG_LINES} install.log
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage0/$(basename ${SCRIPT_NAME})"
fi
;;
Expand Down
9 changes: 5 additions & 4 deletions toolchain/scripts/stage1/install_openmpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"

openmpi_ver="5.0.5"
openmpi_sha256="6588d57c0a4bd299a24103f4e196051b29e8b55fbda49e11d5b3d32030a32776"
# openmpi_ver="4.1.6"
# openmpi_sha256="f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415"
#openmpi_ver="5.0.5"
#openmpi_sha256="6588d57c0a4bd299a24103f4e196051b29e8b55fbda49e11d5b3d32030a32776"
openmpi_ver="4.1.6"
openmpi_sha256="f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415"
openmpi_pkg="openmpi-${openmpi_ver}.tar.bz2"

source "${SCRIPT_DIR}"/common_vars.sh
Expand Down Expand Up @@ -64,6 +64,7 @@ case "${with_openmpi}" in
# OpenMPI 5.0 only supports PMIx
# PMI support is required for Slurm, but not for other schedulers
# default not use
# for OpenMPI 4.1 with pmi slurm, we can open this setting manually
# if [ $(command -v srun) ]; then
# echo "Slurm installation found. OpenMPI will be configured with --with-pmi."
# EXTRA_CONFIGURE_FLAGS="--with-pmi"
Expand Down
4 changes: 2 additions & 2 deletions toolchain/scripts/stage2/install_openblas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"

openblas_ver="0.3.27" # Keep in sync with get_openblas_arch.sh
openblas_sha256="aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897"
openblas_ver="0.3.28" # Keep in sync with get_openblas_arch.sh
openblas_sha256="f1003466ad074e9b0c8d421a204121100b0751c96fc6fcf3d1456bd12f8a00a1"
openblas_pkg="OpenBLAS-${openblas_ver}.tar.gz"

source "${SCRIPT_DIR}"/common_vars.sh
Expand Down
14 changes: 8 additions & 6 deletions toolchain/scripts/stage3/install_elpa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"

# From https://elpa.mpcdf.mpg.de/software/tarball-archive/ELPA_TARBALL_ARCHIVE.html
elpa_ver="2024.03.001"
elpa_sha256="41c6cbf56d2dac26443faaba8a77307d261bf511682a64b96e24def77c813622"
elpa_ver="2024.05.001"
elpa_sha256="9caf41a3e600e2f6f4ce1931bd54185179dade9c171556d0c9b41bbc6940f2f6"


source "${SCRIPT_DIR}"/common_vars.sh
Expand Down Expand Up @@ -59,13 +59,15 @@ case "$with_elpa" in
echo "elpa-${elpa_ver} is already installed, skipping it."
else
require_env MATH_LIBS
if [ -f elpa-${elpa_ver}.tar.gz ]; then
echo "elpa-${elpa_ver}.tar.gz is found"
elpa_pkg="elpa-${elpa_ver}.tar.gz"
url=f"https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/${elpa_ver}/${elpa_pkg}"
if [ -f ${elpa_pkg} ]; then
echo "${elpa_pkg} is found"
else
download_pkg_from_ABACUS_org "${elpa_sha256}" "elpa-${elpa_ver}.tar.gz"
download_pkg_from_url "${elpa_sha256}" "${elpa_pkg}" "${url}"
fi
[ -d elpa-${elpa_ver} ] && rm -rf elpa-${elpa_ver}
tar -xzf elpa-${elpa_ver}.tar.gz
tar -xzf ${elpa_pkg}

# elpa expect FC to be an mpi fortran compiler that is happy
# with long lines, and that a bunch of libs can be found
Expand Down
2 changes: 2 additions & 0 deletions toolchain/scripts/stage4/install_rapidjson.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ case "$with_rapidjson" in
tar -xzf $filename
mkdir -p "${pkg_install_dir}"
cp -r $dirname/* "${pkg_install_dir}/"
# for CMake to find rapidjson
cp ${pkg_install_dir}/RapidJSONConfig.cmake.in ${pkg_install_dir}/RapidJSONConfig.cmake
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage4/$(basename ${SCRIPT_NAME})"
fi
;;
Expand Down

0 comments on commit 9150cf7

Please sign in to comment.