Skip to content

Commit 1f0136f

Browse files
committed
make added global var uppercase
1 parent 40b34f2 commit 1f0136f

22 files changed

+49
-50
lines changed

toolchain/install_abacus_toolchain.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,11 @@ export intel_classic="no"
330330
# but icx is recommended by intel compiler
331331
# option: --with-intel-classic can change it to yes/no
332332
# QuantumMisaka by 2023.08
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
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
338338
export GPUVER="no"
339339
export MPICH_DEVICE="ch4"
340340
export TARGET_CPU="native"
@@ -464,7 +464,7 @@ while [ $# -ge 1 ]; do
464464
dry_run="__TRUE__"
465465
;;
466466
--pack-run)
467-
pack_run="__TRUE__"
467+
PACK_RUN="__TRUE__"
468468
;;
469469
--enable-tsan*)
470470
enable_tsan=$(read_enable $1)
@@ -519,7 +519,7 @@ while [ $# -ge 1 ]; do
519519
fi
520520
;;
521521
--with-4th-openmpi*)
522-
openmpi_4th=$(read_with "${1}" "no") # default new openmpi
522+
OPENMPI_4TH=$(read_with "${1}" "no") # default new openmpi
523523
;;
524524
--with-openmpi*)
525525
with_openmpi=$(read_with "${1}")
@@ -537,19 +537,19 @@ while [ $# -ge 1 ]; do
537537
intel_classic=$(read_with "${1}" "no") # default new intel compiler
538538
;;
539539
--with-intel-mpi-clas*)
540-
intelmpi_classic=$(read_with "${1}" "no") # default new intel mpi compiler
540+
INTELMPI_CLASSIC=$(read_with "${1}" "no") # default new intel mpi compiler
541541
;;
542542
--with-intel*) # must be read after items above
543543
with_intel=$(read_with "${1}" "__SYSTEM__")
544544
;;
545545
--with-ifx*)
546-
with_ifx=$(read_with "${1}" "yes") # default yes
546+
WITH_IFX=$(read_with "${1}" "yes") # default yes
547547
;;
548548
--with-amd*)
549549
with_amd=$(read_with "${1}" "__SYSTEM__")
550550
;;
551551
--with-flang*)
552-
with_flang=$(read_with "${1}" "no")
552+
WITH_FLANG=$(read_with "${1}" "no")
553553
;;
554554
--with-aocl*)
555555
with_aocl=$(read_with "${1}" "__SYSTEM__")
@@ -840,7 +840,6 @@ if [ "${dry_run}" = "__TRUE__" ]; then
840840
echo "Wrote only configuration files (--dry-run)."
841841
else
842842
echo "# Leak suppressions" > ${INSTALLDIR}/lsan.supp
843-
echo "pack_run: ${pack_run}"
844843
./scripts/stage0/install_stage0.sh
845844
./scripts/stage1/install_stage1.sh
846845
./scripts/stage2/install_stage2.sh

toolchain/scripts/stage0/install_amd.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ 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-
if [ "${pack_run}" != "__TRUE__" ]; then
30+
if [ "${PACK_RUN}" != "__TRUE__" ]; then
3131
exit 1
3232
fi
3333
;;
3434
__SYSTEM__)
3535
echo "==================== Finding AMD compiler from system paths ===================="
3636
check_command clang "amd" && CC="$(realpath $(command -v clang))" || exit 1
3737
check_command clang++ "amd" && CXX="$(realpath $(command -v clang++))" || exit 1
38-
if [ "${with_flang}" = "yes" ]; then
38+
if [ "${WITH_FLANG}" = "yes" ]; then
3939
check_command flang "amd" && FC="$(realpath $(command -v flang))" || exit 1
4040
else
4141
check_command gfortran "gcc" && FC="gfortran" || exit 1
@@ -55,7 +55,7 @@ case "${with_amd}" in
5555
check_dir "${pkg_install_dir}/include"
5656
check_command ${pkg_install_dir}/bin/clang "amd" && CC="${pkg_install_dir}/bin/clang" || exit 1
5757
check_command ${pkg_install_dir}/bin/clang++ "amd" && CXX="${pkg_install_dir}/bin/clang++" || exit 1
58-
if [ "${with_flang}" = "yes" ]; then
58+
if [ "${WITH_FLANG}" = "yes" ]; then
5959
check_command ${pkg_install_dir}/bin/flang "amd" && FC="${pkg_install_dir}/bin/flang" || exit 1
6060
else
6161
check_command gfortran "gcc" && FC="$(command -v gfortran)" || exit 1
@@ -72,7 +72,7 @@ if [ "${with_amd}" != "__DONTUSE__" ]; then
7272
echo "CXX is ${CXX}"
7373
[ $(realpath $(command -v clang++) | grep -e aocc-compiler) ] || echo "Check the AMD C++ compiler path"
7474
echo "FC is ${FC}"
75-
if [ "${with_flang}" = "yes" ]; then
75+
if [ "${WITH_FLANG}" = "yes" ]; then
7676
[ $(realpath $(command -v flang) | grep -e aocc-compiler) ] || echo "Check the AMD Fortran compiler path"
7777
else
7878
[ $(realpath $(command -v gfortran) | grep -e aocc-compiler) ] || echo "Check the GNU Fortran compiler path"

toolchain/scripts/stage0/install_cmake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ case "${with_cmake}" in
4545
else
4646
download_pkg_from_ABACUS_org "${cmake_sha256}" "$cmake_pkg"
4747
fi
48-
if [ "${pack_run}" = "__TRUE__" ]; then
48+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
4949
echo "--pack-run mode specified, skip installation"
5050
else
5151
echo "Installing from scratch into ${pkg_install_dir}"

toolchain/scripts/stage0/install_gcc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ case "${with_gcc}" in
4242
else
4343
download_pkg_from_ABACUS_org "${gcc_sha256}" "gcc-${gcc_ver}.tar.gz"
4444
fi
45-
if [ "${pack_run}" = "__TRUE__" ]; then
45+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
4646
echo "--pack-run mode specified, skip installation"
4747
else
4848
[ -d gcc-${gcc_ver} ] && rm -rf gcc-${gcc_ver}

toolchain/scripts/stage0/install_intel.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ 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
29+
if [ "${PACK_RUN}" != "__TRUE__" ]; then
3030
exit 1
3131
fi
3232
exit 1
@@ -40,7 +40,7 @@ case "${with_intel}" in
4040
else
4141
check_command icx "intel" && CC="$(realpath $(command -v icx))" || exit 1
4242
check_command icpx "intel" && CXX="$(realpath $(command -v icpx))" || exit 1
43-
if [ "${with_ifx}" = "yes" ]; then
43+
if [ "${WITH_IFX}" = "yes" ]; then
4444
check_command ifx "intel" && FC="$(realpath $(command -v ifx))" || exit 1
4545
else
4646
check_command ifort "intel" && FC="$(realpath $(command -v ifort))" || exit 1
@@ -65,7 +65,7 @@ case "${with_intel}" in
6565
else
6666
check_command ${pkg_install_dir}/bin/icx "intel" && CC="${pkg_install_dir}/bin/icx" || exit 1
6767
check_command ${pkg_install_dir}/bin/icpx "intel" && CXX="${pkg_install_dir}/bin/icpx" || exit 1
68-
if [ "${with_ifx}" = "yes" ]; then
68+
if [ "${WITH_IFX}" = "yes" ]; then
6969
check_command ${pkg_install_dir}/bin/ifx "intel" && FC="${pkg_install_dir}/bin/ifx" || exit 1
7070
else
7171
check_command ${pkg_install_dir}/bin/ifort "intel" && FC="${pkg_install_dir}/bin/ifort" || exit 1

toolchain/scripts/stage1/install_intelmpi.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ case "${with_intelmpi}" in
2727
__INSTALL__)
2828
echo "==================== Installing Intel MPI ===================="
2929
echo '__INSTALL__ is not supported; please manually install Intel MPI'
30-
if [ "${pack_run}" != "__TRUE__" ]; then
30+
if [ "${PACK_RUN}" != "__TRUE__" ]; then
3131
exit 1
3232
fi
3333
;;
@@ -36,17 +36,17 @@ case "${with_intelmpi}" in
3636
check_command mpiexec "intelmpi" && MPIRUN="$(realpath $(command -v mpiexec))"
3737
if [ "${intel_classic}" = "yes" ]; then
3838
# if intel compiler used as classic, so as intelmpi
39-
export intelmpi_classic="yes"
39+
export INTELMPI_CLASSIC="yes"
4040
fi
4141
if [ "${with_intel}" != "__DONTUSE__" ]; then
42-
if [ "${intelmpi_classic}" = "yes" ]; then
42+
if [ "${INTELMPI_CLASSIC}" = "yes" ]; then
4343
check_command mpiicc "intelmpi" && MPICC="$(realpath $(command -v mpiicc))" || exit 1
4444
check_command mpiicpc "intelmpi" && MPICXX="$(realpath $(command -v mpiicpc))" || exit 1
4545
check_command mpiifort "intelmpi" && MPIFC="$(realpath $(command -v mpiifort))" || exit 1
4646
else
4747
check_command mpiicx "intelmpi" && MPICC="$(realpath $(command -v mpiicx))" || exit 1
4848
check_command mpiicpx "intelmpi" && MPICXX="$(realpath $(command -v mpiicpx))" || exit 1
49-
if [ "${with_ifx}" == "yes" ]; then
49+
if [ "${WITH_IFX}" == "yes" ]; then
5050
check_command mpiifx "intelmpi" && MPIFC="$(realpath $(command -v mpiifx))" || exit 1
5151
else
5252
check_command mpiifort "intelmpi" && MPIFC="$(realpath $(command -v mpiifort))" || exit 1
@@ -75,14 +75,14 @@ case "${with_intelmpi}" in
7575
check_dir "${pkg_install_dir}/include"
7676
check_command ${pkg_install_dir}/bin/mpiexec "intel" && MPIRUN="${pkg_install_dir}/bin/mpiexec" || exit 1
7777
if [ "${with_intel}" != "__DONTUSE__" ]; then
78-
if [ "${intelmpi_classic}" = "yes" ]; then
78+
if [ "${INTELMPI_CLASSIC}" = "yes" ]; then
7979
check_command ${pkg_install_dir}/bin/mpiicc "intel" && MPICC="${pkg_install_dir}/bin/mpiicc" || exit 1
8080
check_command ${pkg_install_dir}/bin/mpiicpc "intel" && MPICXX="${pkg_install_dir}/bin/mpiicpc" || exit 1
8181
check_command ${pkg_install_dir}/bin/mpiifort "intel" && MPIFC="${pkg_install_dir}/bin/mpiifort" || exit 1
8282
else
8383
check_command ${pkg_install_dir}/bin/mpiicx "intel" && MPICC="${pkg_install_dir}/bin/mpiicx" || exit 1
8484
check_command ${pkg_install_dir}/bin/mpiicpx "intel" && MPICXX="${pkg_install_dir}/bin/mpiicpx" || exit 1
85-
if [ "${with_ifx}" = "yes" ]; then
85+
if [ "${WITH_IFX}" = "yes" ]; then
8686
check_command ${pkg_install_dir}/bin/mpiifx "intel" && MPIFC="${pkg_install_dir}/bin/mpiifx" || exit 1
8787
else
8888
check_command ${pkg_install_dir}/bin/mpiifort "intel" && MPIFC="${pkg_install_dir}/bin/mpiifort" || exit 1
@@ -107,7 +107,7 @@ if [ "${with_intelmpi}" != "__DONTUSE__" ]; then
107107
else
108108
I_MPI_CXX="icpx"
109109
I_MPI_CC="icx"
110-
if [ "${with_ifx}" = "yes" ]; then
110+
if [ "${WITH_IFX}" = "yes" ]; then
111111
I_MPI_FC="ifx"
112112
else
113113
I_MPI_FC="ifort"

toolchain/scripts/stage1/install_mpich.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ 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
50+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
5151
echo "--pack-run mode specified, skip installation"
5252
else
5353
echo "Installing from scratch into ${pkg_install_dir} for MPICH device ${MPICH_DEVICE}"
@@ -76,7 +76,7 @@ case "${with_mpich}" in
7676
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage1/$(basename ${SCRIPT_NAME})"
7777
fi
7878
fi
79-
if [ "${pack_run}" = "__TRUE__" ]; then
79+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
8080
echo "--pack-run mode specified, skip system check"
8181
else
8282
check_dir "${pkg_install_dir}/bin"

toolchain/scripts/stage1/install_openmpi.sh

Lines changed: 3 additions & 3 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
@@ -49,7 +49,7 @@ case "${with_openmpi}" in
4949
else
5050
download_pkg_from_url "${openmpi_sha256}" "${openmpi_pkg}" "${url}"
5151
fi
52-
if [ "${pack_run}" = "__TRUE__" ]; then
52+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
5353
echo "--pack-run mode specified, skip installation"
5454
else
5555
echo "Installing from scratch into ${pkg_install_dir}"
@@ -91,7 +91,7 @@ case "${with_openmpi}" in
9191
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage1/$(basename ${SCRIPT_NAME})"
9292
fi
9393
fi
94-
if [ "${pack_run}" = "__TRUE__" ]; then
94+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
9595
echo "--pack-run mode specified, skip system check"
9696
else
9797
check_dir "${pkg_install_dir}/bin"

toolchain/scripts/stage2/install_aocl.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ case "${with_aocl}" in
2727
__INSTALL__)
2828
echo "==================== Installing AOCL ===================="
2929
report_error ${LINENO} "To install AOCL, please contact your system administrator."
30-
if [ "${pack_run}" != "__TRUE__" ]; then
30+
if [ "${PACK_RUN}" != "__TRUE__" ]; then
3131
exit 1
3232
fi
3333
;;
3434
__SYSTEM__)
3535
echo "==================== Finding AOCL from system paths ===================="
36-
if [ "${pack_run}" = "__TRUE__" ]; then
36+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
3737
echo "--pack-run mode specified, skip system check"
3838
else
3939
check_lib -lblis "AOCL"

toolchain/scripts/stage2/install_mkl.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ case "${with_mkl}" in
2828
__INSTALL__)
2929
echo "==================== Installing MKL ===================="
3030
report_error ${LINENO} "To install MKL, please contact your system administrator."
31-
if [ "${pack_run}" != "__TRUE__" ]; then
31+
if [ "${PACK_RUN}" != "__TRUE__" ]; then
3232
exit 1
3333
fi
3434
;;
3535
__SYSTEM__)
3636
echo "==================== Finding MKL from system paths ===================="
37-
if [ "${pack_run}" = "__TRUE__" ]; then
37+
if [ "${PACK_RUN}" = "__TRUE__" ]; then
3838
echo "--pack-run mode specified, skip system check"
3939
else
4040
if ! [ -z "${MKLROOT}" ]; then

0 commit comments

Comments
 (0)