summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsknigh <sknigh@sandia.gov>2019-01-15 14:41:33 -0800
committerAdam J. Stewart <ajstewart426@gmail.com>2019-01-15 16:41:33 -0600
commiteaa340eba71a06772de3e5b286990aa380538a71 (patch)
tree86fbc3aa037497cf052058622f3376b33612c76c
parentd7fb3fd88e9f397f4f199a060df0a3aec90fc15f (diff)
downloadspack-eaa340eba71a06772de3e5b286990aa380538a71.tar.gz
spack-eaa340eba71a06772de3e5b286990aa380538a71.tar.bz2
spack-eaa340eba71a06772de3e5b286990aa380538a71.tar.xz
spack-eaa340eba71a06772de3e5b286990aa380538a71.zip
Added hpl 2.3 (#10345)
* Added hpl 2.3 * Added requested build fixes, added step to copy HPL.dat in 2.3+
-rw-r--r--var/spack/repos/builtin/packages/hpl/package.py34
1 files changed, 31 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py
index 5c5cd4ac29..1985c242ae 100644
--- a/var/spack/repos/builtin/packages/hpl/package.py
+++ b/var/spack/repos/builtin/packages/hpl/package.py
@@ -8,7 +8,7 @@ import os
import platform
-class Hpl(MakefilePackage):
+class Hpl(AutotoolsPackage):
"""HPL is a software package that solves a (random) dense linear system
in double precision (64 bits) arithmetic on distributed-memory computers.
It can thus be regarded as a portable as well as freely available
@@ -17,6 +17,9 @@ class Hpl(MakefilePackage):
homepage = "http://www.netlib.org/benchmark/hpl/"
url = "http://www.netlib.org/benchmark/hpl/hpl-2.2.tar.gz"
+ # Note: HPL uses autotools starting with 2.3
+
+ version('2.3', sha256='32c5c17d22330e6f2337b681aded51637fb6008d3f0eb7c277b163fadd612830')
version('2.2', '0eb19e787c3dc8f4058db22c9e0c5320')
variant('openmp', default=False, description='Enable OpenMP support')
@@ -24,13 +27,21 @@ class Hpl(MakefilePackage):
depends_on('mpi@1.1:')
depends_on('blas')
+ # 2.3 adds support for openmpi 4
+ conflicts('openmpi@4.0.0:', when='@:2.2')
+
parallel = False
arch = '{0}-{1}'.format(platform.system(), platform.processor())
-
build_targets = ['arch={0}'.format(arch)]
- def edit(self, spec, prefix):
+ @when('@:2.2')
+ def autoreconf(self, spec, prefix):
+ # Prevent sanity check from killing the build
+ touch('configure')
+
+ @when('@:2.2')
+ def configure(self, spec, prefix):
# List of configuration options
# Order is important
config = []
@@ -88,9 +99,26 @@ class Hpl(MakefilePackage):
for var in config:
makefile.write('{0}\n'.format(var))
+ @when('@2.3:')
+ def configure_args(self):
+ config = [
+ 'CFLAGS=-O3'
+ ]
+
+ return config
+
+ @when('@:2.2')
def install(self, spec, prefix):
# Manual installation
install_tree(join_path('bin', self.arch), prefix.bin)
install_tree(join_path('lib', self.arch), prefix.lib)
install_tree(join_path('include', self.arch), prefix.include)
install_tree('man', prefix.man)
+
+ @run_after('install')
+ def copy_dat(self):
+ if self.spec.satisfies('@2.3:'):
+ # The pre-2.3 makefile would include a default HPL.dat config
+ # file in the bin directory
+ install('./testing/ptest/HPL.dat',
+ join_path(self.prefix.bin, 'HPL.dat'))