Skip to content

Commit 1be7425

Browse files
QuantumMisakadyzheng
authored andcommitted
[Toolchain] pack-run and package url (#6051)
* implement pack-run function * add dry-run and pack-run readme * give back testing option * make added global var uppercase * update downloading url * add pack-run in intel/amd * fix link of github packages
1 parent 93c9578 commit 1be7425

23 files changed

+180
-92
lines changed

toolchain/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,11 @@ by running these scripts after loading `gcc` or `intel-mkl-mpi`
148148
environment.
149149

150150
The toolchain installation process can be interrupted at anytime.
151-
just re-run *toolchain_\*.sh*, toolchain itself may fix it
151+
just re-run *toolchain_\*.sh*, toolchain itself may fix it. If you encouter some problem, you can always remove some package in the interrupted points and re-run the toolchain.
152+
153+
Some useful options:
154+
- `--dry-run`: just run the main install scripts for environment setting, without any package downloading or installation.
155+
- `--pack-run`: just run the install scripts without any package building, which helps user to download and check the packages, paticularly for offline installation to a server.
152156

153157
If compliation is successful, a message will be shown like this:
154158

toolchain/install_abacus_toolchain.sh

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,14 @@ OPTIONS:
115115
--target-cpu Compile for the specified target CPU (e.g. haswell or generic), i.e.
116116
do not optimize for the actual host system which is the default (native)
117117
--dry-run Write only config files, but don't actually build packages.
118+
--pack-run Only check and install required packages without actually unpack and build packages
118119
119120
The --enable-FEATURE options follow the rules:
120121
--enable-FEATURE=yes Enable this particular feature
121122
--enable-FEATURE=no Disable this particular feature
122123
--enable-FEATURE The option keyword alone is equivalent to
123124
--enable-FEATURE=yes
124-
===== NOTICE: THESE FEATURE AER NOT INCLUDED IN ABACUS =====
125+
===== NOTICE: THESE GPU FEATURE IS ON TESTING =====
125126
--enable-cuda Turn on GPU (CUDA) support (can be combined
126127
with --enable-opencl).
127128
Default = no
@@ -329,10 +330,11 @@ export intel_classic="no"
329330
# but icx is recommended by intel compiler
330331
# option: --with-intel-classic can change it to yes/no
331332
# QuantumMisaka by 2023.08
332-
export intelmpi_classic="no"
333-
export with_ifx="yes" # whether ifx is used in oneapi
334-
export with_flang="no" # whether flang is used in aocc
335-
export openmpi_4th="no" # whether openmpi downgrade
333+
export PACK_RUN="__FALSE__"
334+
export INTELMPI_CLASSIC="no"
335+
export WITH_IFX="yes" # whether ifx is used in oneapi
336+
export WITH_FLANG="no" # whether flang is used in aocc
337+
export OPENMPI_4TH="no" # whether openmpi downgrade
336338
export GPUVER="no"
337339
export MPICH_DEVICE="ch4"
338340
export TARGET_CPU="native"
@@ -461,6 +463,9 @@ while [ $# -ge 1 ]; do
461463
--dry-run)
462464
dry_run="__TRUE__"
463465
;;
466+
--pack-run)
467+
PACK_RUN="__TRUE__"
468+
;;
464469
--enable-tsan*)
465470
enable_tsan=$(read_enable $1)
466471
if [ "${enable_tsan}" = "__INVALID__" ]; then
@@ -514,7 +519,7 @@ while [ $# -ge 1 ]; do
514519
fi
515520
;;
516521
--with-4th-openmpi*)
517-
openmpi_4th=$(read_with "${1}" "no") # default new openmpi
522+
OPENMPI_4TH=$(read_with "${1}" "no") # default new openmpi
518523
;;
519524
--with-openmpi*)
520525
with_openmpi=$(read_with "${1}")
@@ -532,19 +537,19 @@ while [ $# -ge 1 ]; do
532537
intel_classic=$(read_with "${1}" "no") # default new intel compiler
533538
;;
534539
--with-intel-mpi-clas*)
535-
intelmpi_classic=$(read_with "${1}" "no") # default new intel mpi compiler
540+
INTELMPI_CLASSIC=$(read_with "${1}" "no") # default new intel mpi compiler
536541
;;
537542
--with-intel*) # must be read after items above
538543
with_intel=$(read_with "${1}" "__SYSTEM__")
539544
;;
540545
--with-ifx*)
541-
with_ifx=$(read_with "${1}" "yes") # default yes
546+
WITH_IFX=$(read_with "${1}" "yes") # default yes
542547
;;
543548
--with-amd*)
544549
with_amd=$(read_with "${1}" "__SYSTEM__")
545550
;;
546551
--with-flang*)
547-
with_flang=$(read_with "${1}" "no")
552+
WITH_FLANG=$(read_with "${1}" "no")
548553
;;
549554
--with-aocl*)
550555
with_aocl=$(read_with "${1}" "__SYSTEM__")
@@ -840,7 +845,6 @@ else
840845
./scripts/stage2/install_stage2.sh
841846
./scripts/stage3/install_stage3.sh
842847
./scripts/stage4/install_stage4.sh
843-
fi
844848

845849
cat << EOF
846850
========================== usage =========================
@@ -858,5 +862,6 @@ or you can modify the builder scripts to suit your needs.
858862
"""
859863
EOF
860864

865+
fi
861866

862867
#EOF

toolchain/scripts/stage0/install_amd.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,24 @@ case "${with_amd}" in
2727
__INSTALL__)
2828
echo "==================== Installing the AMD compiler ======================"
2929
echo "__INSTALL__ is not supported; please install the AMD compiler manually"
30-
exit 1
30+
if [ "${PACK_RUN}" != "__TRUE__" ]; then
31+
exit 1
32+
fi
3133
;;
3234
__SYSTEM__)
3335
echo "==================== Finding AMD compiler from system paths ===================="
36+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
37+
echo "--pack-run mode specified, skip system check"
38+
else
3439
check_command clang "amd" && CC="$(realpath $(command -v clang))" || exit 1
3540
check_command clang++ "amd" && CXX="$(realpath $(command -v clang++))" || exit 1
36-
if [ "${with_flang}" = "yes" ]; then
41+
if [ "${WITH_FLANG}" = "yes" ]; then
3742
check_command flang "amd" && FC="$(realpath $(command -v flang))" || exit 1
3843
else
3944
check_command gfortran "gcc" && FC="gfortran" || exit 1
4045
add_lib_from_paths GCC_LDFLAGS "libgfortran.*" ${LIB_PATHS}
4146
fi
47+
fi
4248
F90="${FC}"
4349
F77="${FC}"
4450
;;
@@ -53,7 +59,7 @@ case "${with_amd}" in
5359
check_dir "${pkg_install_dir}/include"
5460
check_command ${pkg_install_dir}/bin/clang "amd" && CC="${pkg_install_dir}/bin/clang" || exit 1
5561
check_command ${pkg_install_dir}/bin/clang++ "amd" && CXX="${pkg_install_dir}/bin/clang++" || exit 1
56-
if [ "${with_flang}" = "yes" ]; then
62+
if [ "${WITH_FLANG}" = "yes" ]; then
5763
check_command ${pkg_install_dir}/bin/flang "amd" && FC="${pkg_install_dir}/bin/flang" || exit 1
5864
else
5965
check_command gfortran "gcc" && FC="$(command -v gfortran)" || exit 1
@@ -70,7 +76,7 @@ if [ "${with_amd}" != "__DONTUSE__" ]; then
7076
echo "CXX is ${CXX}"
7177
[ $(realpath $(command -v clang++) | grep -e aocc-compiler) ] || echo "Check the AMD C++ compiler path"
7278
echo "FC is ${FC}"
73-
if [ "${with_flang}" = "yes" ]; then
79+
if [ "${WITH_FLANG}" = "yes" ]; then
7480
[ $(realpath $(command -v flang) | grep -e aocc-compiler) ] || echo "Check the AMD Fortran compiler path"
7581
else
7682
[ $(realpath $(command -v gfortran) | grep -e aocc-compiler) ] || echo "Check the GNU Fortran compiler path"

toolchain/scripts/stage0/install_cmake.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,18 @@ case "${with_cmake}" in
4343
if [ -f $cmake_pkg ]; then
4444
echo "$cmake_pkg is found"
4545
else
46-
download_pkg_from_ABACUS_org "${cmake_sha256}" "$cmake_pkg"
46+
#download_pkg_from_ABACUS_org "${cmake_sha256}" "$cmake_pkg"
47+
url="https://cmake.org/files/v${cmake_ver%.*}/${cmake_pkg}"
48+
download_pkg_from_url "${cmake_sha256}" "${cmake_pkg}" "${url}"
49+
fi
50+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
51+
echo "--pack-run mode specified, skip installation"
52+
else
53+
echo "Installing from scratch into ${pkg_install_dir}"
54+
mkdir -p ${pkg_install_dir}
55+
/bin/sh $cmake_pkg --prefix=${pkg_install_dir} --skip-license > install.log 2>&1 || tail -n ${LOG_LINES} install.log
56+
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage0/$(basename ${SCRIPT_NAME})"
4757
fi
48-
echo "Installing from scratch into ${pkg_install_dir}"
49-
mkdir -p ${pkg_install_dir}
50-
/bin/sh $cmake_pkg --prefix=${pkg_install_dir} --skip-license > install.log 2>&1 || tail -n ${LOG_LINES} install.log
51-
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage0/$(basename ${SCRIPT_NAME})"
5258
fi
5359
;;
5460
__SYSTEM__)

toolchain/scripts/stage0/install_gcc.sh

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,13 @@ case "${with_gcc}" in
4040
if [ -f gcc-${gcc_ver}.tar.gz ]; then
4141
echo "gcc-${gcc_ver}.tar.gz is found"
4242
else
43-
download_pkg_from_ABACUS_org "${gcc_sha256}" "gcc-${gcc_ver}.tar.gz"
43+
#download_pkg_from_ABACUS_org "${gcc_sha256}" "gcc-${gcc_ver}.tar.gz"
44+
url=https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-${gcc_ver}/gcc-${gcc_ver}.tar.gz
45+
download_pkg_from_url "${gcc_sha256}" "gcc-${gcc_ver}.tar.gz" "${url}"
4446
fi
47+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
48+
echo "--pack-run mode specified, skip installation"
49+
else
4550
[ -d gcc-${gcc_ver} ] && rm -rf gcc-${gcc_ver}
4651
tar -xzf gcc-${gcc_ver}.tar.gz
4752

@@ -115,13 +120,18 @@ case "${with_gcc}" in
115120
cd ../..
116121
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage0/$(basename ${SCRIPT_NAME})"
117122
fi
118-
check_install ${pkg_install_dir}/bin/gcc "gcc" && CC="${pkg_install_dir}/bin/gcc" || exit 1
119-
check_install ${pkg_install_dir}/bin/g++ "gcc" && CXX="${pkg_install_dir}/bin/g++" || exit 1
120-
check_install ${pkg_install_dir}/bin/gfortran "gcc" && FC="${pkg_install_dir}/bin/gfortran" || exit 1
121-
F90="${FC}"
122-
F77="${FC}"
123-
GCC_CFLAGS="-I'${pkg_install_dir}/include'"
124-
GCC_LDFLAGS="-L'${pkg_install_dir}/lib64' -L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib64' -Wl,-rpath,'${pkg_install_dir}/lib64'"
123+
fi
124+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
125+
echo "--pack-run mode specified, skip system check"
126+
else
127+
check_install ${pkg_install_dir}/bin/gcc "gcc" && CC="${pkg_install_dir}/bin/gcc" || exit 1
128+
check_install ${pkg_install_dir}/bin/g++ "gcc" && CXX="${pkg_install_dir}/bin/g++" || exit 1
129+
check_install ${pkg_install_dir}/bin/gfortran "gcc" && FC="${pkg_install_dir}/bin/gfortran" || exit 1
130+
F90="${FC}"
131+
F77="${FC}"
132+
GCC_CFLAGS="-I'${pkg_install_dir}/include'"
133+
GCC_LDFLAGS="-L'${pkg_install_dir}/lib64' -L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib64' -Wl,-rpath,'${pkg_install_dir}/lib64'"
134+
fi
125135
;;
126136
__SYSTEM__)
127137
echo "==================== Finding GCC from system paths ===================="

toolchain/scripts/stage0/install_intel.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,30 @@ case "${with_intel}" in
2626
__INSTALL__)
2727
echo "==================== Installing the Intel compiler ===================="
2828
echo "__INSTALL__ is not supported; please install the Intel compiler manually"
29+
if [ "${PACK_RUN}" != "__TRUE__" ]; then
30+
exit 1
31+
fi
2932
exit 1
3033
;;
3134
__SYSTEM__)
3235
echo "==================== Finding Intel compiler from system paths ===================="
36+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
37+
echo "--pack-run mode specified, skip system check"
38+
else
3339
if [ "${intel_classic}" = "yes" ]; then
3440
check_command icc "intel" && CC="$(realpath $(command -v icc))" || exit 1
3541
check_command icpc "intel" && CXX="$(realpath $(command -v icpc))" || exit 1
3642
check_command ifort "intel" && FC="$(realpath $(command -v ifort))" || exit 1
3743
else
3844
check_command icx "intel" && CC="$(realpath $(command -v icx))" || exit 1
3945
check_command icpx "intel" && CXX="$(realpath $(command -v icpx))" || exit 1
40-
if [ "${with_ifx}" = "yes" ]; then
46+
if [ "${WITH_IFX}" = "yes" ]; then
4147
check_command ifx "intel" && FC="$(realpath $(command -v ifx))" || exit 1
4248
else
4349
check_command ifort "intel" && FC="$(realpath $(command -v ifort))" || exit 1
4450
fi
4551
fi
52+
fi
4653
F90="${FC}"
4754
F77="${FC}"
4855
;;
@@ -62,7 +69,7 @@ case "${with_intel}" in
6269
else
6370
check_command ${pkg_install_dir}/bin/icx "intel" && CC="${pkg_install_dir}/bin/icx" || exit 1
6471
check_command ${pkg_install_dir}/bin/icpx "intel" && CXX="${pkg_install_dir}/bin/icpx" || exit 1
65-
if [ "${with_ifx}" = "yes" ]; then
72+
if [ "${WITH_IFX}" = "yes" ]; then
6673
check_command ${pkg_install_dir}/bin/ifx "intel" && FC="${pkg_install_dir}/bin/ifx" || exit 1
6774
else
6875
check_command ${pkg_install_dir}/bin/ifort "intel" && FC="${pkg_install_dir}/bin/ifort" || exit 1

toolchain/scripts/stage1/install_intelmpi.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,29 @@ case "${with_intelmpi}" in
2727
__INSTALL__)
2828
echo "==================== Installing Intel MPI ===================="
2929
echo '__INSTALL__ is not supported; please manually install Intel MPI'
30-
exit 1
30+
if [ "${PACK_RUN}" != "__TRUE__" ]; then
31+
exit 1
32+
fi
3133
;;
3234
__SYSTEM__)
3335
echo "==================== Finding Intel MPI from system paths ===================="
36+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
37+
echo "--pack-run mode specified, skip system check"
38+
else
3439
check_command mpiexec "intelmpi" && MPIRUN="$(realpath $(command -v mpiexec))"
3540
if [ "${intel_classic}" = "yes" ]; then
3641
# if intel compiler used as classic, so as intelmpi
37-
export intelmpi_classic="yes"
42+
export INTELMPI_CLASSIC="yes"
3843
fi
3944
if [ "${with_intel}" != "__DONTUSE__" ]; then
40-
if [ "${intelmpi_classic}" = "yes" ]; then
45+
if [ "${INTELMPI_CLASSIC}" = "yes" ]; then
4146
check_command mpiicc "intelmpi" && MPICC="$(realpath $(command -v mpiicc))" || exit 1
4247
check_command mpiicpc "intelmpi" && MPICXX="$(realpath $(command -v mpiicpc))" || exit 1
4348
check_command mpiifort "intelmpi" && MPIFC="$(realpath $(command -v mpiifort))" || exit 1
4449
else
4550
check_command mpiicx "intelmpi" && MPICC="$(realpath $(command -v mpiicx))" || exit 1
4651
check_command mpiicpx "intelmpi" && MPICXX="$(realpath $(command -v mpiicpx))" || exit 1
47-
if [ "${with_ifx}" == "yes" ]; then
52+
if [ "${WITH_IFX}" == "yes" ]; then
4853
check_command mpiifx "intelmpi" && MPIFC="$(realpath $(command -v mpiifx))" || exit 1
4954
else
5055
check_command mpiifort "intelmpi" && MPIFC="$(realpath $(command -v mpiifort))" || exit 1
@@ -61,6 +66,7 @@ case "${with_intelmpi}" in
6166
add_lib_from_paths INTELMPI_LDFLAGS "libmpi.*" $LIB_PATHS
6267
check_lib -lmpi "intelmpi"
6368
check_lib -lmpicxx "intelmpi"
69+
fi
6470
;;
6571
__DONTUSE__)
6672
# Nothing to do
@@ -73,14 +79,14 @@ case "${with_intelmpi}" in
7379
check_dir "${pkg_install_dir}/include"
7480
check_command ${pkg_install_dir}/bin/mpiexec "intel" && MPIRUN="${pkg_install_dir}/bin/mpiexec" || exit 1
7581
if [ "${with_intel}" != "__DONTUSE__" ]; then
76-
if [ "${intelmpi_classic}" = "yes" ]; then
82+
if [ "${INTELMPI_CLASSIC}" = "yes" ]; then
7783
check_command ${pkg_install_dir}/bin/mpiicc "intel" && MPICC="${pkg_install_dir}/bin/mpiicc" || exit 1
7884
check_command ${pkg_install_dir}/bin/mpiicpc "intel" && MPICXX="${pkg_install_dir}/bin/mpiicpc" || exit 1
7985
check_command ${pkg_install_dir}/bin/mpiifort "intel" && MPIFC="${pkg_install_dir}/bin/mpiifort" || exit 1
8086
else
8187
check_command ${pkg_install_dir}/bin/mpiicx "intel" && MPICC="${pkg_install_dir}/bin/mpiicx" || exit 1
8288
check_command ${pkg_install_dir}/bin/mpiicpx "intel" && MPICXX="${pkg_install_dir}/bin/mpiicpx" || exit 1
83-
if [ "${with_ifx}" = "yes" ]; then
89+
if [ "${WITH_IFX}" = "yes" ]; then
8490
check_command ${pkg_install_dir}/bin/mpiifx "intel" && MPIFC="${pkg_install_dir}/bin/mpiifx" || exit 1
8591
else
8692
check_command ${pkg_install_dir}/bin/mpiifort "intel" && MPIFC="${pkg_install_dir}/bin/mpiifort" || exit 1
@@ -105,7 +111,7 @@ if [ "${with_intelmpi}" != "__DONTUSE__" ]; then
105111
else
106112
I_MPI_CXX="icpx"
107113
I_MPI_CC="icx"
108-
if [ "${with_ifx}" = "yes" ]; then
114+
if [ "${WITH_IFX}" = "yes" ]; then
109115
I_MPI_FC="ifx"
110116
else
111117
I_MPI_FC="ifort"

toolchain/scripts/stage1/install_mpich.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ case "${with_mpich}" in
4747
#download_pkg_from_ABACUS_org "${mpich_sha256}" "${mpich_pkg}"
4848
download_pkg_from_url "${mpich_sha256}" "${mpich_pkg}" "${url}"
4949
fi
50+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
51+
echo "--pack-run mode specified, skip installation"
52+
else
5053
echo "Installing from scratch into ${pkg_install_dir} for MPICH device ${MPICH_DEVICE}"
5154
[ -d mpich-${mpich_ver} ] && rm -rf mpich-${mpich_ver}
5255
tar -xzf ${mpich_pkg}
@@ -72,6 +75,10 @@ case "${with_mpich}" in
7275
cd ..
7376
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage1/$(basename ${SCRIPT_NAME})"
7477
fi
78+
fi
79+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
80+
echo "--pack-run mode specified, skip system check"
81+
else
7582
check_dir "${pkg_install_dir}/bin"
7683
check_dir "${pkg_install_dir}/lib"
7784
check_dir "${pkg_install_dir}/include"
@@ -83,6 +90,7 @@ case "${with_mpich}" in
8390
MPIF77="${MPIFC}"
8491
MPICH_CFLAGS="-I'${pkg_install_dir}/include'"
8592
MPICH_LDFLAGS="-L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib'"
93+
fi
8694
;;
8795
__SYSTEM__)
8896
echo "==================== Finding MPICH from system paths ===================="

toolchain/scripts/stage1/install_openmpi.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
1111
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")/.." && pwd -P)"
1212

13-
if [ "${openmpi_4th}" = "yes" ]; then
13+
if [ "${OPENMPI_4TH}" = "yes" ]; then
1414
openmpi_ver="4.1.6"
1515
openmpi_sha256="f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415"
1616
else
@@ -40,7 +40,7 @@ case "${with_openmpi}" in
4040
pkg_install_dir="${INSTALLDIR}/openmpi-${openmpi_ver}"
4141
#pkg_install_dir="${HOME}/apps/openmpi/${openmpi_ver}-gcc8"
4242
install_lock_file="$pkg_install_dir/install_successful"
43-
url="https://download.open-mpi.org/release/open-mpi/v${openmpi_ver:0:3}/${openmpi_pkg}"
43+
url="https://download.open-mpi.org/release/open-mpi/v${openmpi_ver%.*}/${openmpi_pkg}"
4444
if verify_checksums "${install_lock_file}"; then
4545
echo "openmpi-${openmpi_ver} is already installed, skipping it."
4646
else
@@ -49,6 +49,9 @@ case "${with_openmpi}" in
4949
else
5050
download_pkg_from_url "${openmpi_sha256}" "${openmpi_pkg}" "${url}"
5151
fi
52+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
53+
echo "--pack-run mode specified, skip installation"
54+
else
5255
echo "Installing from scratch into ${pkg_install_dir}"
5356
[ -d openmpi-${openmpi_ver} ] && rm -rf openmpi-${openmpi_ver}
5457
tar -xjf ${openmpi_pkg}
@@ -87,6 +90,10 @@ case "${with_openmpi}" in
8790
cd ..
8891
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage1/$(basename ${SCRIPT_NAME})"
8992
fi
93+
fi
94+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
95+
echo "--pack-run mode specified, skip system check"
96+
else
9097
check_dir "${pkg_install_dir}/bin"
9198
check_dir "${pkg_install_dir}/lib"
9299
check_dir "${pkg_install_dir}/include"
@@ -98,6 +105,7 @@ case "${with_openmpi}" in
98105
MPIF77="${MPIFC}"
99106
OPENMPI_CFLAGS="-I'${pkg_install_dir}/include'"
100107
OPENMPI_LDFLAGS="-L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib'"
108+
fi
101109
;;
102110
__SYSTEM__)
103111
echo "==================== Finding OpenMPI from system paths ===================="

0 commit comments

Comments
 (0)