Drop incompatible HPL git fallback

This commit is contained in:
Mikhail Chusavitin
2026-04-08 09:50:58 +03:00
parent f345d8a89d
commit 13899aa864

View File

@@ -51,8 +51,6 @@ DEFAULT_HPL_URLS="
https://www.netlib.org/benchmark/hpl/hpl-${HPL_VERSION}.tar.gz
https://fossies.org/linux/privat/hpl-${HPL_VERSION}.tar.gz
"
HPL_GIT_URL="${HPL_GIT_URL:-https://github.com/icl-utk-edu/hpl.git}"
DEFAULT_HPL_GIT_REFS="v${HPL_VERSION} ${HPL_VERSION} main"
HPL_SOURCE_MODE="tarball"
download_to_file() {
@@ -100,41 +98,6 @@ download_hpl_tarball() {
return 1
}
download_hpl_from_git_archive() {
out="$1"
refs="${HPL_GIT_REFS:-$DEFAULT_HPL_GIT_REFS}"
tmp_root="$(mktemp -d)"
repo_dir="${tmp_root}/repo"
archive_dir="${tmp_root}/hpl-${HPL_VERSION}"
archive_tmp="${out}.part"
for ref in ${refs}; do
[ -n "${ref}" ] || continue
echo "=== trying HPL git source: ${HPL_GIT_URL} ref ${ref} ==="
rm -rf "${repo_dir}" "${archive_dir}" "${archive_tmp}"
if git clone --depth 1 --branch "${ref}" "${HPL_GIT_URL}" "${repo_dir}"; then
resolved_commit="$(git -C "${repo_dir}" rev-parse HEAD)"
mv "${repo_dir}" "${archive_dir}"
tar czf "${archive_tmp}" -C "${tmp_root}" "hpl-${HPL_VERSION}"
mv "${archive_tmp}" "${out}"
printf 'mode=git\nurl=%s\nref=%s\ncommit=%s\n' "${HPL_GIT_URL}" "${ref}" "${resolved_commit}" > "${HPL_SOURCE_META}"
rm -rf "${tmp_root}"
HPL_SOURCE_MODE="git"
return 0
fi
echo "=== failed git ref: ${ref} ==="
done
rm -rf "${tmp_root}" "${archive_tmp}"
echo "ERROR: failed to obtain HPL ${HPL_VERSION} from all configured sources" >&2
echo " looked for cache: ${out}" >&2
echo " tarball mirrors: ${HPL_URLS:-$DEFAULT_HPL_URLS}" >&2
echo " git fallback: ${HPL_GIT_URL} refs ${refs}" >&2
echo " override mirrors with HPL_URLS=\"https://mirror1/...\"" >&2
echo " override git refs with HPL_GIT_REFS=\"v${HPL_VERSION} ${HPL_VERSION} main\"" >&2
return 1
}
if [ -f "${HPL_SOURCE_META}" ]; then
case "$(awk -F= '$1=="mode"{print $2}' "${HPL_SOURCE_META}" 2>/dev/null)" in
git) HPL_SOURCE_MODE="git" ;;
@@ -144,7 +107,14 @@ fi
if [ ! -f "${HPL_TAR}" ]; then
echo "=== downloading HPL ${HPL_VERSION} ==="
download_hpl_tarball "${HPL_TAR}" || download_hpl_from_git_archive "${HPL_TAR}"
download_hpl_tarball "${HPL_TAR}" || {
echo "ERROR: failed to download HPL ${HPL_VERSION} tarball from all configured mirrors" >&2
echo " looked for cache: ${HPL_TAR}" >&2
echo " mirrors: ${HPL_URLS:-$DEFAULT_HPL_URLS}" >&2
echo " override mirrors with HPL_URLS=\"https://mirror1/...\"" >&2
echo " or pre-seed cache with the expected tarball at ${HPL_TAR}" >&2
exit 1
}
fi
if [ "${HPL_SOURCE_MODE}" = "tarball" ]; then
@@ -157,9 +127,6 @@ if [ "${HPL_SOURCE_MODE}" = "tarball" ]; then
exit 1
fi
echo "sha256 OK: hpl-${HPL_VERSION}.tar.gz"
else
echo "=== HPL source obtained from git fallback; skipping tarball sha256 check ==="
[ -f "${HPL_SOURCE_META}" ] && cat "${HPL_SOURCE_META}"
fi
# ── download OpenBLAS from Debian 12 apt repo ─────────────────────────────────