hpl: build v2.3 with timers (#48206)

Co-authored-by: zzzoom <zzzoom@users.noreply.github.com>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
Carlos Bederián 2025-01-13 09:04:49 -03:00 committed by GitHub
parent b6def50dcb
commit 3d554db198
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,6 +37,24 @@ class Hpl(AutotoolsPackage):
arch = "{0}-{1}".format(platform.system(), platform.processor())
build_targets = ["arch={0}".format(arch)]
with when("@=2.3"):
depends_on("autoconf-archive", type="build") # AX_PROG_CC_MPI
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("m4", type="build")
depends_on("libtool", type="build")
@property
def force_autoreconf(self):
return self.version == Version("2.3")
@run_before("autoreconf", when="@=2.3")
def add_timer_to_libhpl(self):
# Add HPL_timer_walltime to libhpl.a
filter_file(
r"(pgesv/HPL_perm.c)$", r"\1 ../testing/timer/HPL_timer_walltime.c", "src/Makefile.am"
)
@when("@:2.2")
def autoreconf(self, spec, prefix):
# Prevent sanity check from killing the build
@ -104,7 +122,7 @@ def configure(self, spec, prefix):
def configure_args(self):
filter_file(r"^libs10=.*", "libs10=%s" % self.spec["blas"].libs.ld_flags, "configure")
cflags, ldflags = ["-O3"], []
cflags, ldflags = ["-O3", "-DHPL_PROGRESS_REPORT", "-DHPL_DETAILED_TIMING"], []
if self.spec.satisfies("+openmp"):
cflags.append(self.compiler.openmp_flag)