diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py index d992cea1269..882a25024b1 100644 --- a/var/spack/repos/builtin/packages/hpl/package.py +++ b/var/spack/repos/builtin/packages/hpl/package.py @@ -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)