2014-02-08 10:11:07 +08:00
|
|
|
from spack import *
|
|
|
|
|
|
|
|
class Openmpi(Package):
|
|
|
|
"""Open MPI is a project combining technologies and resources from
|
|
|
|
several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI)
|
|
|
|
in order to build the best MPI library available. A completely
|
|
|
|
new MPI-2 compliant implementation, Open MPI offers advantages
|
|
|
|
for system and software vendors, application developers and
|
|
|
|
computer science researchers.
|
|
|
|
"""
|
|
|
|
|
|
|
|
homepage = "http://www.open-mpi.org"
|
|
|
|
|
2014-09-24 05:59:30 +08:00
|
|
|
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")
|
2014-11-09 03:42:54 +08:00
|
|
|
|
2014-09-24 05:59:30 +08:00
|
|
|
patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5")
|
|
|
|
patch('llnl-platforms.patch', when="@1.6.5")
|
2014-06-02 23:35:01 +08:00
|
|
|
|
2014-09-24 05:59:30 +08:00
|
|
|
provides('mpi@:2')
|
2014-02-08 10:11:07 +08:00
|
|
|
|
|
|
|
def install(self, spec, prefix):
|
2014-09-24 05:59:30 +08:00
|
|
|
config_args = ["--prefix=%s" % prefix]
|
|
|
|
|
|
|
|
# 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"
|
2014-11-09 03:42:54 +08:00
|
|
|
if self.version == ver("1.6.5") and '+lanl' in spec:
|
|
|
|
config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas")
|
2014-02-08 10:11:07 +08:00
|
|
|
|
2014-09-24 05:59:30 +08:00
|
|
|
# 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")
|
2014-02-08 10:11:07 +08:00
|
|
|
|
2014-09-24 05:59:30 +08:00
|
|
|
configure(*config_args)
|
2014-02-08 10:11:07 +08:00
|
|
|
make()
|
|
|
|
make("install")
|