Modify MPI installs to work without fortran.

This commit is contained in:
Todd Gamblin 2014-09-23 14:59:30 -07:00
parent c9fbba22a2
commit 2de2d4bea7
3 changed files with 35 additions and 15 deletions

View File

@ -137,9 +137,9 @@
# TODO: it's not clear where all the stuff that needs to be included in packages
# should live. This file is overloaded for spack core vs. for packages.
#
__all__ = ['Package', 'Version', 'when']
__all__ = ['Package', 'Version', 'when', 'ver']
from spack.package import Package
from spack.version import Version
from spack.version import Version, ver
from spack.multimethod import when
import llnl.util.filesystem

View File

@ -38,8 +38,18 @@ class Mpich(Package):
provides('mpi@:1', when='@1:')
def install(self, spec, prefix):
configure(
"--prefix=" + prefix,
"--enable-shared")
config_args = ["--prefix=" + prefix,
"--enable-shared"]
# TODO: Spack should make it so that you can't actually find
# these compilers if they're "disabled" for the current
# compiler configuration.
if not self.compiler.f77:
config_args.append("--disable-f77")
if not self.compiler.fc:
config_args.append("--disable-fc")
configure(*config_args)
make()
make("install")

View File

@ -10,22 +10,32 @@ class Openmpi(Package):
"""
homepage = "http://www.open-mpi.org"
url = "http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.bz2"
version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475')
version('1.8.2', 'ab538ed8e328079d566fc797792e016e',
url='http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.2.tar.gz')
version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475',
url = "http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.bz2")
patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5")
patch('llnl-platforms.patch', when="@1.6.5")
provides('mpi@:2')
patch('ad_lustre_rwcontig_open_source.patch')
patch('llnl-platforms.patch')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix,
"--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas")
config_args = ["--prefix=%s" % prefix]
# TODO: implement variants next, so we can have LLNL and LANL options.
# use above for LANL builds, but for LLNL builds, we need this
# "--with-platform=contrib/platform/llnl/optimized")
# TODO: use variants for this, e.g. +lanl, +llnl, etc.
# use this for LANL builds, but for LLNL builds, we need:
# "--with-platform=contrib/platform/llnl/optimized"
if self.version == ver("1.6.5"):
confg_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas")
# TODO: Spack should make it so that you can't actually find
# these compilers if they're "disabled" for the current
# compiler configuration.
if not self.compiler.f77 and not self.compiler.fc:
config_args.append("--enable-mpi-fortran=no")
configure(*config_args)
make()
make("install")