Added hpl 2.3 (#10345)
* Added hpl 2.3 * Added requested build fixes, added step to copy HPL.dat in 2.3+
This commit is contained in:
parent
d7fb3fd88e
commit
eaa340eba7
@ -8,7 +8,7 @@
|
|||||||
import platform
|
import platform
|
||||||
|
|
||||||
|
|
||||||
class Hpl(MakefilePackage):
|
class Hpl(AutotoolsPackage):
|
||||||
"""HPL is a software package that solves a (random) dense linear system
|
"""HPL is a software package that solves a (random) dense linear system
|
||||||
in double precision (64 bits) arithmetic on distributed-memory computers.
|
in double precision (64 bits) arithmetic on distributed-memory computers.
|
||||||
It can thus be regarded as a portable as well as freely available
|
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/"
|
homepage = "http://www.netlib.org/benchmark/hpl/"
|
||||||
url = "http://www.netlib.org/benchmark/hpl/hpl-2.2.tar.gz"
|
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')
|
version('2.2', '0eb19e787c3dc8f4058db22c9e0c5320')
|
||||||
|
|
||||||
variant('openmp', default=False, description='Enable OpenMP support')
|
variant('openmp', default=False, description='Enable OpenMP support')
|
||||||
@ -24,13 +27,21 @@ class Hpl(MakefilePackage):
|
|||||||
depends_on('mpi@1.1:')
|
depends_on('mpi@1.1:')
|
||||||
depends_on('blas')
|
depends_on('blas')
|
||||||
|
|
||||||
|
# 2.3 adds support for openmpi 4
|
||||||
|
conflicts('openmpi@4.0.0:', when='@:2.2')
|
||||||
|
|
||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
arch = '{0}-{1}'.format(platform.system(), platform.processor())
|
arch = '{0}-{1}'.format(platform.system(), platform.processor())
|
||||||
|
|
||||||
build_targets = ['arch={0}'.format(arch)]
|
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
|
# List of configuration options
|
||||||
# Order is important
|
# Order is important
|
||||||
config = []
|
config = []
|
||||||
@ -88,9 +99,26 @@ def edit(self, spec, prefix):
|
|||||||
for var in config:
|
for var in config:
|
||||||
makefile.write('{0}\n'.format(var))
|
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):
|
def install(self, spec, prefix):
|
||||||
# Manual installation
|
# Manual installation
|
||||||
install_tree(join_path('bin', self.arch), prefix.bin)
|
install_tree(join_path('bin', self.arch), prefix.bin)
|
||||||
install_tree(join_path('lib', self.arch), prefix.lib)
|
install_tree(join_path('lib', self.arch), prefix.lib)
|
||||||
install_tree(join_path('include', self.arch), prefix.include)
|
install_tree(join_path('include', self.arch), prefix.include)
|
||||||
install_tree('man', prefix.man)
|
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'))
|
||||||
|
Loading…
Reference in New Issue
Block a user