Skip to content
Snippets Groups Projects
Commit aa079dbd authored by Adam J. Stewart's avatar Adam J. Stewart Committed by Todd Gamblin
Browse files

Add variant to MPICH to enable ROMIO support (#1944)

parent 49aed396
No related branches found
No related tags found
No related merge requests found
...@@ -27,9 +27,10 @@ ...@@ -27,9 +27,10 @@
class Mpich(Package): class Mpich(Package):
"""MPICH is a high performance and widely portable implementation of """MPICH is a high performance and widely portable implementation of
the Message Passing Interface (MPI) standard.""" the Message Passing Interface (MPI) standard."""
homepage = "http://www.mpich.org" homepage = "http://www.mpich.org"
url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz"
list_url = "http://www.mpich.org/static/downloads/" list_url = "http://www.mpich.org/static/downloads/"
list_depth = 2 list_depth = 2
...@@ -41,10 +42,10 @@ class Mpich(Package): ...@@ -41,10 +42,10 @@ class Mpich(Package):
version('3.1', '5643dd176499bfb7d25079aaff25f2ec') version('3.1', '5643dd176499bfb7d25079aaff25f2ec')
version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0')
variant('verbs', default=False, variant('hydra', default=True, description='Build the hydra process manager')
description='Build support for OpenFabrics verbs.') variant('pmi', default=True, description='Build with PMI support')
variant('pmi', default=True, description='Build with PMI support') variant('romio', default=True, description='Enable ROMIO MPI I/O implementation')
variant('hydra', default=True, description='Build the hydra process manager') variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
provides('mpi@:3.0', when='@3:') provides('mpi@:3.0', when='@3:')
provides('mpi@:1.3', when='@1:') provides('mpi@:1.3', when='@1:')
...@@ -72,16 +73,14 @@ def setup_dependent_package(self, module, dep_spec): ...@@ -72,16 +73,14 @@ def setup_dependent_package(self, module, dep_spec):
] ]
def install(self, spec, prefix): def install(self, spec, prefix):
config_args = ["--prefix=" + prefix, config_args = [
"--with-pmi=" + ("yes" if '+pmi' in spec else 'no'), '--prefix={0}'.format(prefix),
"--with-pm=" + ('hydra' if '+hydra' in spec else 'no'), '--enable-shared',
"--enable-shared"] '--with-pm={0}'.format('hydra' if '+hydra' in spec else 'no'),
'--with-pmi={0}'.format('yes' if '+pmi' in spec else 'no'),
# Variants '--{0}-romio'.format('enable' if '+romio' in spec else 'disable'),
if '+verbs' in spec: '--{0}-ibverbs'.format('with' if '+verbs' in spec else 'without')
config_args.append("--with-ibverbs") ]
else:
config_args.append("--without-ibverbs")
# TODO: Spack should make it so that you can't actually find # TODO: Spack should make it so that you can't actually find
# these compilers if they're "disabled" for the current # these compilers if they're "disabled" for the current
...@@ -96,32 +95,33 @@ def install(self, spec, prefix): ...@@ -96,32 +95,33 @@ def install(self, spec, prefix):
config_args.append("--disable-fortran") config_args.append("--disable-fortran")
configure(*config_args) configure(*config_args)
make() make()
make("install") make('check')
make('install')
self.filter_compilers() self.filter_compilers(prefix)
def filter_compilers(self): def filter_compilers(self, prefix):
"""Run after install to make the MPI compilers use the """Run after install to make the MPI compilers use the
compilers that Spack built the package with. compilers that Spack built the package with.
If this isn't done, they'll have CC, CXX, F77, and FC set If this isn't done, they'll have CC, CXX, F77, and FC set
to Spack's generic cc, c++, f77, and f90. We want them to to Spack's generic cc, c++, f77, and f90. We want them to
be bound to whatever compiler they were built with. be bound to whatever compiler they were built with."""
"""
bin = self.prefix.bin mpicc = join_path(prefix.bin, 'mpicc')
mpicc = join_path(bin, 'mpicc') mpicxx = join_path(prefix.bin, 'mpicxx')
mpicxx = join_path(bin, 'mpicxx') mpif77 = join_path(prefix.bin, 'mpif77')
mpif77 = join_path(bin, 'mpif77') mpif90 = join_path(prefix.bin, 'mpif90')
mpif90 = join_path(bin, 'mpif90')
# Substitute Spack compile wrappers for the real # Substitute Spack compile wrappers for the real
# underlying compiler # underlying compiler
kwargs = {'ignore_absent': True, 'backup': False, 'string': True} kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs) filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs)
filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs) filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs)
filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs) filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs)
filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs) filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs)
# Remove this linking flag if present # Remove this linking flag if present
# (it turns RPATH into RUNPATH) # (it turns RPATH into RUNPATH)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment