openmpi : turned torque support into a variant (default false)

hdf5 : fixed a few bugs, removed suspicious macro deinition, etc.
This commit is contained in:
alalazo
2016-01-20 15:22:49 +01:00
parent 88c810ed09
commit 19caac69d8
2 changed files with 79 additions and 29 deletions

View File

@@ -19,43 +19,44 @@ class Openmpi(Package):
version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e')
version('1.10.0', '280cf952de68369cebaca886c5ce0304')
version('1.8.8', '0dab8e602372da1425e9242ae37faf8c')
version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475')
version('1.8.8', '0dab8e602372da1425e9242ae37faf8c')
version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475')
patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5")
patch('llnl-platforms.patch', when="@1.6.5")
patch('configure.patch', when="@1.10.0:")
variant('psm', default=False, description='Build support for the PSM library.')
variant('psm', default=False, description='Build support for the PSM library.')
variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
# TODO : variant support for other schedulers is missing
variant('tm', default=False, description='Build TM (Torque, PBSPro, and compatible) support')
provides('mpi@:2.2', when='@1.6.5')
provides('mpi@:3.0', when='@1.7.5:')
depends_on('hwloc')
def url_for_version(self, version):
return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version)
def setup_dependent_environment(self, module, spec, dep_spec):
"""For dependencies, make mpicc's use spack wrapper."""
os.environ['OMPI_CC'] = 'cc'
os.environ['OMPI_CC'] = 'cc'
os.environ['OMPI_CXX'] = 'c++'
os.environ['OMPI_FC'] = 'f90'
os.environ['OMPI_F77'] = 'f77'
def install(self, spec, prefix):
config_args = ["--prefix=%s" % prefix,
"--with-hwloc=%s" % spec['hwloc'].prefix,
"--with-tm", # necessary for Torque support
"--enable-shared",
"--enable-static"]
# Variants
if '+tm' in spec:
config_args.append("--with-tm") # necessary for Torque support
if '+psm' in spec:
config_args.append("--with-psm")
@@ -85,7 +86,6 @@ def install(self, spec, prefix):
self.filter_compilers()
def filter_compilers(self):
"""Run after install to make the MPI compilers use the
compilers that Spack built the package with.
@@ -94,7 +94,7 @@ def filter_compilers(self):
to Spack's generic cc, c++ and f90. We want them to
be bound to whatever compiler they were built with.
"""
kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : False }
kwargs = {'ignore_absent': True, 'backup': False, 'string': False}
dir = os.path.join(self.prefix, 'share/openmpi/')
cc_wrappers = ['mpicc-vt-wrapper-data.txt', 'mpicc-wrapper-data.txt',
@@ -132,5 +132,3 @@ def filter_compilers(self):
if not os.path.islink(path):
filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc,
path, **kwargs)