forked from deepmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoolchain_gcc-mkl.sh
More file actions
executable file
·114 lines (98 loc) · 3.88 KB
/
Copy pathtoolchain_gcc-mkl.sh
File metadata and controls
executable file
·114 lines (98 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/bash
#SBATCH -J install
#SBATCH -N 1
#SBATCH -n 16
#SBATCH -o compile.log
#SBATCH -e compile.err
# Users can easily modify these parameters to customize the build
# Before running this script, ensure you have loaded your system packages
# Compiler Configuration
TOOLCHAIN_COMPILER="gcc-mkl"
WITH_GCC="system"
WITH_AMD="no"
WITH_INTEL="no"
# Math Libraries (Intel MKL recommended)
MATH_MODE="mkl"
WITH_MKL="system"
# MPI Implementation (OpenMPI recommended)
MPI_MODE="openmpi"
WITH_OPENMPI="install"
WITH_4TH_OPENMPI="no" # Set to "yes" for OpenMPI v4, deprecated
WITH_MPICH="no"
# Core Dependencies
WITH_CMAKE="install"
WITH_SCALAPACK="system" # MKL provides ScaLAPACK
WITH_FFTW="system" # MKL provides FFTW
WITH_LIBXC="install"
WITH_ELPA="install"
# Utility Libraries
WITH_CEREAL="install"
WITH_RAPIDJSON="install"
# Advanced Features (EXX calculations)
WITH_LIBRI="install"
WITH_LIBCOMM="install"
# Optional Features (MLALGO support)
WITH_LIBTORCH="no"
WITH_LIBNPY="no"
WITH_NEP="no"
# ELPA-GPU Support (uncomment and modify as needed)
# ENABLE_CUDA="yes"
# GPU_VERSION="75" # Check your GPU compute capability
# export CUDA_PATH="/usr/local/cuda"
# ============================================================================
# Execution Mode Control
# ============================================================================
# Dry-run mode: Show what would be done without actually executing
DRY_RUN_MODE="no" # Set to "yes" to enable dry-run mode
# Pack-run mode: Only check and install required packages
PACK_RUN_MODE="no" # Set to "yes" to enable pack-run mode
# ============================================================================
# Package Version Selection (main/alt versions)
# ============================================================================
# Choose between main (latest stable) and alt (alternative/legacy) versions
# Refer to scripts/package_versions.sh for specific version numbers
CMAKE_VERSION="main" # main=3.31.7, alt=3.30.5
OPENMPI_VERSION="main" # main=5.0.8, alt=4.1.6
ELPA_VERSION="main" # main=2025.06.001, alt=2024.05.001
LIBXC_VERSION="main" # main=7.0.0, alt=6.2.2
# Optional Libraries
LIBTORCH_VERSION="main" # main=2.1.2, alt=1.12.1 (use alt for older GLIBC)
# Note: main(2.1.2) version of LibTorch need glibc > 2.27
# Note: alt(1.12.1) version of LibTorch cannot support DeePMD-Torch for DPA
# Note: GCC-MKL toolchain uses MKL for math libraries (FFTW, ScaLAPACK)
# so OpenBLAS and ScaLAPACK version selections are not applicable
# ============================================================================
# Execute Installation (DO NOT MODIFY BELOW THIS LINE)
# ============================================================================
# Call the main installation script with configured parameters
exec ./install_abacus_toolchain_new.sh \
--with-gcc="$WITH_GCC" \
--math-mode="$MATH_MODE" \
--mpi-mode="$MPI_MODE" \
--with-mkl="$WITH_MKL" \
--with-openmpi="$WITH_OPENMPI" \
--with-mpich="$WITH_MPICH" \
--with-cmake="$WITH_CMAKE" \
--with-scalapack="$WITH_SCALAPACK" \
--with-libxc="$WITH_LIBXC" \
--with-fftw="$WITH_FFTW" \
--with-elpa="$WITH_ELPA" \
--with-cereal="$WITH_CEREAL" \
--with-rapidjson="$WITH_RAPIDJSON" \
--with-libtorch="$WITH_LIBTORCH" \
--with-nep="$WITH_NEP" \
--with-libnpy="$WITH_LIBNPY" \
--with-libri="$WITH_LIBRI" \
--with-libcomm="$WITH_LIBCOMM" \
--with-4th-openmpi="$WITH_4TH_OPENMPI" \
--package-version cmake:"$CMAKE_VERSION" \
--package-version openmpi:"$OPENMPI_VERSION" \
--package-version elpa:"$ELPA_VERSION" \
--package-version libxc:"$LIBXC_VERSION" \
--package-version libtorch:"$LIBTORCH_VERSION" \
${DRY_RUN_MODE:+$([ "$DRY_RUN_MODE" = "yes" ] && echo "--dry-run")} \
${PACK_RUN_MODE:+$([ "$PACK_RUN_MODE" = "yes" ] && echo "--pack-run")} \
${ENABLE_CUDA:+--enable-cuda} \
${GPU_VERSION:+--gpu-ver="$GPU_VERSION"} \
"$@" \
| tee compile.log