Skip to content

Commit 320226d

Browse files
author
Kai Luo (罗凯)
authored
Toolchain intel update to fix issue #6190 (#6451)
* Update LibRI version, apply patch to cereal to fix issue 6190. * Enables libri and libcomm by default in the script
1 parent d226739 commit 320226d

File tree

5 files changed

+58
-11
lines changed

5 files changed

+58
-11
lines changed

toolchain/build_abacus_intel.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ LIBXC=$INSTALL_DIR/libxc-7.0.0
2929
RAPIDJSON=$INSTALL_DIR/rapidjson-master/
3030
# LIBTORCH=$INSTALL_DIR/libtorch-2.1.2/share/cmake/Torch
3131
# LIBNPY=$INSTALL_DIR/libnpy-1.0.1/include
32-
# LIBRI=$INSTALL_DIR/LibRI-0.2.1.0
33-
# LIBCOMM=$INSTALL_DIR/LibComm-master
32+
LIBRI=$INSTALL_DIR/LibRI-0.2.1.1
33+
LIBCOMM=$INSTALL_DIR/LibComm-master
3434
# DEEPMD=$HOME/apps/anaconda3/envs/deepmd # v3.0 might have problem
3535

3636
# Notice: if you are compiling with AMD-CPU or GPU-version ABACUS, then `icpc` and `mpiicpc` compilers are recommended
@@ -47,13 +47,13 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
4747
-DUSE_ELPA=ON \
4848
-DENABLE_RAPIDJSON=ON \
4949
-DRapidJSON_DIR=$RAPIDJSON \
50+
-DLIBRI_DIR=$LIBRI \
51+
-DLIBCOMM_DIR=$LIBCOMM \
5052
# -DENABLE_DEEPKS=1 \
5153
# -DTorch_DIR=$LIBTORCH \
5254
# -Dlibnpy_INCLUDE_DIR=$LIBNPY \
53-
# -DENABLE_LIBRI=ON \
54-
# -DLIBRI_DIR=$LIBRI \
55-
# -DLIBCOMM_DIR=$LIBCOMM \
56-
# -DDeePMD_DIR=$DEEPMD \
55+
# -DENABLE_LIBRI=ON \
56+
# -DDeePMD_DIR=$DEEPMD \
5757
# -DUSE_CUDA=ON \
5858
# -DENABLE_CUSOLVERMP=ON \
5959
# -D CAL_CUSOLVERMP_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/2x.xx/math_libs/1x.x/targets/x86_64-linux/lib
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From 409db5e910279224bd7e78f8188450c7e7d34d87 Mon Sep 17 00:00:00 2001
2+
From: Khem Raj <[email protected]>
3+
Date: Tue, 10 Sep 2024 18:11:40 -0700
4+
Subject: [PATCH] Fix instances of
5+
-Wmissing-template-arg-list-after-template-kw.
6+
7+
Clang has a new warning that requires a template argument list after using
8+
the template keyword. Remove uses of the template keyword when we're not
9+
specifying types.
10+
11+
See https://github.com/llvm/llvm-project/issues/94194 for the upstream
12+
clang changes
13+
14+
Signed-off-by: Khem Raj <[email protected]>
15+
---
16+
include/cereal/types/tuple.hpp | 4 ++--
17+
1 file changed, 2 insertions(+), 2 deletions(-)
18+
19+
diff --git a/include/cereal/types/tuple.hpp b/include/cereal/types/tuple.hpp
20+
index 80c68075..5c79eca9 100644
21+
--- a/include/cereal/types/tuple.hpp
22+
+++ b/include/cereal/types/tuple.hpp
23+
@@ -95,7 +95,7 @@ namespace cereal
24+
template <class Archive, class ... Types> inline
25+
static void apply( Archive & ar, std::tuple<Types...> & tuple )
26+
{
27+
- serialize<Height - 1>::template apply( ar, tuple );
28+
+ serialize<Height - 1>::apply( ar, tuple );
29+
ar( CEREAL_NVP_(tuple_element_name<Height - 1>::c_str(),
30+
std::get<Height - 1>( tuple )) );
31+
}
32+
@@ -116,7 +116,7 @@ namespace cereal
33+
template <class Archive, class ... Types> inline
34+
void CEREAL_SERIALIZE_FUNCTION_NAME( Archive & ar, std::tuple<Types...> & tuple )
35+
{
36+
- tuple_detail::serialize<std::tuple_size<std::tuple<Types...>>::value>::template apply( ar, tuple );
37+
+ tuple_detail::serialize<std::tuple_size<std::tuple<Types...>>::value>::apply( ar, tuple );
38+
}
39+
} // namespace cereal
40+
41+

toolchain/scripts/stage4/install_cereal.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ case "$with_cereal" in
5050
[ -d $dirname ] && rm -rf $dirname
5151
tar -xzf $filename
5252
#unzip -q $filename
53+
# apply patch files for libri installation in issue #6190, Kai Luo
54+
# echo ${SCRIPT_DIR}
55+
cd $dirname && pwd && patch -p1 < ${SCRIPT_DIR}/patches/6190.patch
56+
cd "${BUILDDIR}"
57+
#
5358
mkdir -p "${pkg_install_dir}"
5459
cp -r $dirname/* "${pkg_install_dir}/"
5560
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage4/$(basename ${SCRIPT_NAME})"

toolchain/scripts/stage4/install_libri.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"
1414
# libri 0.2.0 and above need to be used in newer ABACUS
1515
# libri_ver="master"
1616
# libri_sha256="--no-checksum"
17-
libri_ver=0.2.1.0
18-
libri_sha256="66a5540daba36effdad6ce2fe5e8368b96ddd4a7e148af90894ef21dc20ff29f"
17+
libri_ver=0.2.1.1
18+
libri_sha256="cd33fd5428400ea696b82c9132878c07bf785847b3f56b1979e25a3a5fc0b311"
19+
# libri_sha256="66a5540daba36effdad6ce2fe5e8368b96ddd4a7e148af90894ef21dc20ff29f"
1920
source "${SCRIPT_DIR}"/common_vars.sh
2021
source "${SCRIPT_DIR}"/tool_kit.sh
2122
source "${SCRIPT_DIR}"/signal_trap.sh

toolchain/toolchain_intel.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
--with-rapidjson=install \
3030
--with-libtorch=no \
3131
--with-libnpy=no \
32-
--with-libri=no \
33-
--with-libcomm=no \
32+
--with-libri=install \
33+
--with-libcomm=install \
3434
--with-intel-classic=no \
3535
| tee compile.log
3636
# for using AMD-CPU or GPU-version: set --with-intel-classic=yes
3737
# to enable gpu-lcao, add the following lines:
3838
# --enable-cuda \
3939
# --gpu-ver=75 \
4040
# one should check your gpu compute capability number
41-
# and use it in --gpu-ver
41+
# and use it in --gpu-ver

0 commit comments

Comments
 (0)