Skip to content

Commit eaf27f8

Browse files
Toolchain 202402 (#4945)
* basic toolchain update - remove ACML support - update dependence version - try to update scalapack for gcc-14 - tag libri 0.2.0 - enable rapidjson in build scripts (but not as default) * Update README.md * Version 2024.2 tag * Update install_elpa.sh * enable rapidjson as default in toolchain usage * fix #4601 for scalapack * modify export * reverse gcc default version to 13.2.0 * remove redundant option * update libtorch version and downloading * Update README.md * formatting * update database version * update v3 database link
1 parent e614606 commit eaf27f8

25 files changed

Lines changed: 116 additions & 173 deletions

toolchain/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The ABACUS Toolchain
2-
Version 2024.1
2+
Version 2024.2
33

44
## Author
55
[QuantumMisaka](https://github.com/QuantumMisaka)
@@ -19,7 +19,7 @@ and give setup files that you can use to compile ABACUS.
1919
## Todo
2020

2121
- [x] `gnu-openblas` toolchain support for `openmpi` and `mpich`.
22-
- [x] `intel-mkl-mpi` toolchain support using `icc` or `icx`. (`icx` version of ABACUS have some problem now, please be cautious)
22+
- [x] `intel-mkl-mpi` toolchain support using `icc`/`icpc`/`ifort` or `icx`/`icpx`/`ifort`. (`icx` as default, but will have problem for ELPA in AMD machine, one can specify `--with-intel-classic=yes` to use `icc`),
2323
- [x] `intel-mkl-mpich` toolchain support.
2424
- [x] Automatic installation of [CEREAL](https://github.com/USCiLab/cereal) and [LIBNPY](https://github.com/llohse/libnpy) (by github.com)
2525
- [x] Support for [LibRI](https://github.com/abacusmodeling/LibRI) by submodule or automatic installation from github.com (but installed LibRI via `wget` seems to have some problem, please be cautious)
@@ -75,14 +75,14 @@ Notice: These packages will be downloaded by `wget` from `github.com`, which is
7575

7676
Instead of github.com, we offer other package station, you can use it by:
7777
```shell
78-
wget https://bohrium-api.dp.tech/ds-dl/abacus-deps-93wi-v2 -O abacus-deps-v2.zip
78+
wget https://bohrium-api.dp.tech/ds-dl/abacus-deps-93wi-v3 -O abacus-deps-v3.zip
7979
```
8080
`unzip` it ,and you can do offline installation of these packages above after rename. The above station will be updated handly but one should notice that the version will always lower than github repo.
8181

8282
If one want to install ABACUS by toolchain OFFLINE,
8383
one can manually download all the packages from [cp2k-static/download](https://www.cp2k.org/static/downloads) or official website
8484
and put them in *build* directory by formatted name
85-
like *fftw-3.3.10.tar.gz*, or *openmpi-4.1.5.tar.gz*,
85+
like *fftw-3.3.10.tar.gz*, or *openmpi-5.0.3.tar.gz*,
8686
then run this toolchain.
8787
All package will be detected and installed automatically.
8888
Also, one can install parts of packages OFFLINE and parts of packages ONLINE
@@ -96,22 +96,22 @@ just by using this toolchain
9696
```
9797

9898
The needed dependencies version default:
99-
- `cmake` 3.28.1
99+
- `cmake` 3.30.0
100100
- `gcc` 13.2.0 (which will always NOT be installed, But use system)
101-
- `OpenMPI` 5.0.0
101+
- `OpenMPI` 5.0.3
102102
- `MPICH` 4.1.2
103-
- `OpenBLAS` 0.3.25 (Intel toolchain need `get_vars.sh` tool from it)
103+
- `OpenBLAS` 0.3.27 (Intel toolchain need `get_vars.sh` tool from it)
104104
- `ScaLAPACK` 2.2.1
105105
- `FFTW` 3.3.10
106106
- `LibXC` 6.2.2
107-
- `ELPA` 2023.05.001
107+
- `ELPA` 2024.03.001
108108
- `CEREAL` 1.3.2
109109
- `RapidJSON` 1.1.0
110110
And Intel-oneAPI need user or server manager to manually install from Intel.
111111
[Intel-oneAPI](https://www.intel.cn/content/www/cn/zh/developer/tools/oneapi/toolkits.html)
112112

113113
Dependencies below are optional, which is NOT installed by default:
114-
- `LibTorch` 2.0.1
114+
- `LibTorch` 2.1.2
115115
- `Libnpy` 1.0.1
116116
- `LibRI` 0.1.1
117117
- `LibComm` 0.1.0

toolchain/build_abacus_gnu.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ BUILD_DIR=build_abacus_gnu
2222
rm -rf $BUILD_DIR
2323

2424
PREFIX=$ABACUS_DIR
25-
LAPACK=$INSTALL_DIR/openblas-0.3.25/lib
25+
LAPACK=$INSTALL_DIR/openblas-0.3.27/lib
2626
SCALAPACK=$INSTALL_DIR/scalapack-2.2.1/lib
27-
ELPA=$INSTALL_DIR/elpa-2023.05.001/cpu
27+
ELPA=$INSTALL_DIR/elpa-2024.03.001/cpu
2828
FFTW3=$INSTALL_DIR/fftw-3.3.10
2929
CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal
3030
LIBXC=$INSTALL_DIR/libxc-6.2.2
3131
# LIBRI=$INSTALL_DIR/LibRI-0.1.1
3232
# LIBCOMM=$INSTALL_DIR/LibComm-0.1.0
33-
# LIBTORCH=$INSTALL_DIR/libtorch-2.0.1/share/cmake/Torch
33+
# LIBTORCH=$INSTALL_DIR/libtorch-2.1.2/share/cmake/Torch
3434
# LIBNPY=$INSTALL_DIR/libnpy-1.0.1/include
3535
# DEEPMD=$HOME/apps/anaconda3/envs/deepmd
3636

@@ -47,6 +47,7 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
4747
-DENABLE_LIBXC=ON \
4848
-DUSE_OPENMP=ON \
4949
-DUSE_ELPA=ON \
50+
-DENABLE_RAPIDJSON=ON \
5051
# -DENABLE_DEEPKS=1 \
5152
# -DTorch_DIR=$LIBTORCH \
5253
# -Dlibnpy_INCLUDE_DIR=$LIBNPY \
@@ -55,7 +56,7 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
5556
# -DLIBCOMM_DIR=$LIBCOMM \
5657
# -DDeePMD_DIR=$DEEPMD \
5758
# -DTensorFlow_DIR=$DEEPMD \
58-
# -DENABLE_RAPIDJSON=ON \
59+
5960

6061
# # add mkl env for libtorch to link
6162
# if one want to install libtorch, mkl should be load in build process

toolchain/build_abacus_intel-mpich.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ BUILD_DIR=build_abacus_intel-mpich
2323
rm -rf $BUILD_DIR
2424

2525
PREFIX=$ABACUS_DIR
26-
ELPA=$INSTALL_DIR/elpa-2023.05.001/cpu
26+
ELPA=$INSTALL_DIR/elpa-2024.03.001/cpu
2727
CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal
2828
LIBXC=$INSTALL_DIR/libxc-6.2.2
29-
# LIBTORCH=$INSTALL_DIR/libtorch-2.0.1/share/cmake/Torch
29+
# LIBTORCH=$INSTALL_DIR/libtorch-2.1.2/share/cmake/Torch
3030
# LIBNPY=$INSTALL_DIR/libnpy-1.0.1/include
3131
# LIBRI=$INSTALL_DIR/LibRI-0.1.1
3232
# LIBCOMM=$INSTALL_DIR/LibComm-0.1.0
@@ -43,15 +43,16 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
4343
-DENABLE_LIBXC=ON \
4444
-DUSE_OPENMP=ON \
4545
-DUSE_ELPA=ON \
46-
# -DENABLE_DEEPKS=1 \
47-
# -DTorch_DIR=$LIBTORCH \
48-
# -Dlibnpy_INCLUDE_DIR=$LIBNPY \
49-
# -DENABLE_LIBRI=ON \
50-
# -DLIBRI_DIR=$LIBRI \
51-
# -DLIBCOMM_DIR=$LIBCOMM \
52-
# -DDeePMD_DIR=$DEEPMD \
53-
# -DTensorFlow_DIR=$DEEPMD \
54-
# -DENABLE_RAPIDJSON=ON \
46+
-DENABLE_RAPIDJSON=ON \
47+
# -DENABLE_DEEPKS=1 \
48+
# -DTorch_DIR=$LIBTORCH \
49+
# -Dlibnpy_INCLUDE_DIR=$LIBNPY \
50+
# -DENABLE_LIBRI=ON \
51+
# -DLIBRI_DIR=$LIBRI \
52+
# -DLIBCOMM_DIR=$LIBCOMM \
53+
# -DDeePMD_DIR=$DEEPMD \
54+
# -DTensorFlow_DIR=$DEEPMD \
55+
5556

5657
# if one want's to include deepmd, your gcc version should be >= 11.3.0
5758

toolchain/build_abacus_intel.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ BUILD_DIR=build_abacus_intel
2323
rm -rf $BUILD_DIR
2424

2525
PREFIX=$ABACUS_DIR
26-
ELPA=$INSTALL_DIR/elpa-2023.05.001/cpu
26+
ELPA=$INSTALL_DIR/elpa-2024.03.001/cpu
2727
CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal
2828
LIBXC=$INSTALL_DIR/libxc-6.2.2
29-
# LIBTORCH=$INSTALL_DIR/libtorch-2.0.1/share/cmake/Torch
29+
# LIBTORCH=$INSTALL_DIR/libtorch-2.1.2/share/cmake/Torch
3030
# LIBNPY=$INSTALL_DIR/libnpy-1.0.1/include
3131
# LIBRI=$INSTALL_DIR/LibRI-0.1.1
3232
# LIBCOMM=$INSTALL_DIR/LibComm-0.1.0
@@ -44,6 +44,7 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
4444
-DENABLE_LIBXC=ON \
4545
-DUSE_OPENMP=ON \
4646
-DUSE_ELPA=ON \
47+
-DENABLE_RAPIDJSON=ON \
4748
# -DENABLE_DEEPKS=1 \
4849
# -DTorch_DIR=$LIBTORCH \
4950
# -Dlibnpy_INCLUDE_DIR=$LIBNPY \
@@ -52,7 +53,7 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
5253
# -DLIBCOMM_DIR=$LIBCOMM \
5354
# -DDeePMD_DIR=$DEEPMD \
5455
# -DTensorFlow_DIR=$DEEPMD \
55-
# -DENABLE_RAPIDJSON=ON \
56+
5657

5758
cmake --build $BUILD_DIR -j `nproc`
5859
cmake --install $BUILD_DIR 2>/dev/null

toolchain/install_abacus_toolchain.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ The --with-PKG options follow the rules:
171171
Default = install
172172
--with-fftw FFTW3, library for fast fourier transform
173173
Default = install
174-
--with-acml AMD core maths library, which provides LAPACK and BLAS
175-
Default = system
176174
--with-mkl Intel Math Kernel Library, which provides LAPACK, and BLAS.
177175
If MKL's FFTW3 interface is suitable (no FFTW-MPI support),
178176
it replaces the FFTW library. If the ScaLAPACK component is

toolchain/scripts/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# version file to force a rebuild of the entire toolchain
2-
VERSION="2024.1"
2+
VERSION="2024.2"

toolchain/scripts/get_openblas_arch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
# TODO: Review and if possible fix shellcheck errors.
44
# shellcheck disable=all
55

6-
# Last Update in 2024-0219
6+
# Last Update in 2024-0811
77

88
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
99
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")" && pwd -P)"
1010

11-
openblas_ver="0.3.25" # Keep in sync with install_openblas.sh
12-
openblas_sha256="4c25cb30c4bb23eddca05d7d0a85997b8db6144f5464ba7f8c09ce91e2f35543"
11+
openblas_ver="0.3.27" # Keep in sync with install_openblas.sh
12+
openblas_sha256="aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897"
1313
openblas_pkg="OpenBLAS-${openblas_ver}.tar.gz"
1414

1515
source "${SCRIPT_DIR}"/common_vars.sh

toolchain/scripts/stage0/install_cmake.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# TODO: Review and if possible fix shellcheck errors.
44
# shellcheck disable=all
55

6-
# Last Update in 2024-0219
6+
# Last Update in 2024-0811
77

88
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
99
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"
@@ -21,13 +21,13 @@ cd "${BUILDDIR}"
2121
case "${with_cmake}" in
2222
__INSTALL__)
2323
echo "==================== Installing CMake ===================="
24-
cmake_ver="3.28.1"
24+
cmake_ver="3.30.0"
2525
if [ "${OPENBLAS_ARCH}" = "arm64" ]; then
2626
cmake_arch="linux-aarch64"
27-
cmake_sha256="4ecba78ef9499a973d012a83feab5f888e86fc5388e9a768037ab4f7232cab16"
27+
cmake_sha256="daa89552fd9102fb70399b31b5605c4f61125023bbbed947757a7b53ce36c4d0"
2828
elif [ "${OPENBLAS_ARCH}" = "x86_64" ]; then
2929
cmake_arch="linux-x86_64"
30-
cmake_sha256="ada6a46be9da5f8cbeb00b9523ffe45ee6b36172eb81aaa5bdc6a2a8231b677c"
30+
cmake_sha256="1a5969fe81fea6e5220d053d9d3e3754cbc85be07d2d428bebdcfe87137971a9"
3131
else
3232
report_error ${LINENO} \
3333
"cmake installation for ARCH=${ARCH} is not supported. You can try to use the system installation using the flag --with-cmake=system instead."
@@ -67,7 +67,7 @@ if [ "${with_cmake}" != "__DONTUSE__" ]; then
6767
if [ "${with_cmake}" != "__SYSTEM__" ]; then
6868
cat << EOF > "${BUILDDIR}/setup_cmake"
6969
prepend_path PATH "${pkg_install_dir}/bin"
70-
export PATH="${pkg_install_dir}/bin:":\${PATH}
70+
export PATH="${pkg_install_dir}/bin":\${PATH}
7171
EOF
7272
cat "${BUILDDIR}/setup_cmake" >> $SETUPFILE
7373
fi

toolchain/scripts/stage0/install_gcc.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
# TODO: Review and if possible fix shellcheck errors.
44
# shellcheck disable=all
55

6-
# Last Update in 2023-1111
6+
# Last Update in 2024-0811
77

88
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
99
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"
10-
10+
# gcc 13 is good
1111
gcc_ver="13.2.0"
1212
gcc_sha256="8cb4be3796651976f94b9356fa08d833524f62420d6292c5033a9a26af315078"
13+
# use gcc 14 with caution
14+
#gcc_ver="14.1.0"
15+
#gcc_sha256="a0be066c02775002a0fa65ad3c65fb56a8bfd923d072a26ed148c0439ecdb68f"
1316

1417
source "${SCRIPT_DIR}"/common_vars.sh
1518
source "${SCRIPT_DIR}"/tool_kit.sh
@@ -61,7 +64,7 @@ case "${with_gcc}" in
6164
# TODO: Unfortunately, we can not simply use --disable-shared, because
6265
# it would break OpenBLAS build and probably others too.
6366
COMMON_FLAGS="-O2 -fPIC -fno-omit-frame-pointer -fopenmp -g"
64-
CFLAGS="${COMMON_FLAGS} -std=gnu99"
67+
CFLAGS="${COMMON_FLAGS}"
6568
CXXFLAGS="${CFLAGS}"
6669
FCFLAGS="${COMMON_FLAGS} -fbacktrace"
6770
${GCCROOT}/configure --prefix="${pkg_install_dir}" \

toolchain/scripts/stage0/install_intel.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# TODO: Review and if possible fix shellcheck errors.
44
# shellcheck disable=all
55

6-
# Last Update in 2023-0901
6+
# Last Update in 2024-0811
77

88
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=${0}
99
SCRIPT_DIR="$(cd "$(dirname "${SCRIPT_NAME}")/.." && pwd -P)"
@@ -56,10 +56,10 @@ case "${with_intel}" in
5656
check_command ${pkg_install_dir}/bin/icpc "intel" && CXX="${pkg_install_dir}/bin/icpc" || exit 1
5757
check_command ${pkg_install_dir}/bin/ifort "intel" && FC="${pkg_install_dir}/bin/ifort" || exit 1
5858
else
59-
# abacus do not need icx, the key is mkl
6059
check_command ${pkg_install_dir}/bin/icx "intel" && CC="${pkg_install_dir}/bin/icx" || exit 1
6160
check_command ${pkg_install_dir}/bin/icpx "intel" && CXX="${pkg_install_dir}/bin/icpx" || exit 1
6261
check_command ${pkg_install_dir}/bin/ifort "intel" && FC="${pkg_install_dir}/bin/ifort" || exit 1
62+
# is ifx needed ?
6363
fi
6464
F90="${FC}"
6565
F77="${FC}"

0 commit comments

Comments
 (0)