Skip to content

Commit 65ddd66

Browse files
committed
update downloading url
1 parent 1f0136f commit 65ddd66

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

toolchain/scripts/stage0/install_cmake.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ 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}"
4749
fi
4850
if [ "${PACK_RUN}" = "__TRUE__" ]; then
4951
echo "--pack-run mode specified, skip installation"

toolchain/scripts/stage0/install_gcc.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ 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
4547
if [ "${PACK_RUN}" = "__TRUE__" ]; then
4648
echo "--pack-run mode specified, skip installation"
@@ -119,13 +121,17 @@ case "${with_gcc}" in
119121
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage0/$(basename ${SCRIPT_NAME})"
120122
fi
121123
fi
122-
check_install ${pkg_install_dir}/bin/gcc "gcc" && CC="${pkg_install_dir}/bin/gcc" || exit 1
123-
check_install ${pkg_install_dir}/bin/g++ "gcc" && CXX="${pkg_install_dir}/bin/g++" || exit 1
124-
check_install ${pkg_install_dir}/bin/gfortran "gcc" && FC="${pkg_install_dir}/bin/gfortran" || exit 1
125-
F90="${FC}"
126-
F77="${FC}"
127-
GCC_CFLAGS="-I'${pkg_install_dir}/include'"
128-
GCC_LDFLAGS="-L'${pkg_install_dir}/lib64' -L'${pkg_install_dir}/lib' -Wl,-rpath,'${pkg_install_dir}/lib64' -Wl,-rpath,'${pkg_install_dir}/lib64'"
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
129135
;;
130136
__SYSTEM__)
131137
echo "==================== Finding GCC from system paths ===================="

toolchain/scripts/stage1/install_openmpi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)