spack/var/spack/packages/openmpi/package.py

42 lines
1.7 KiB
Python
Raw Normal View History

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"
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
patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5")
patch('llnl-platforms.patch', when="@1.6.5")
provides('mpi@:2')
2014-02-08 10:11:07 +08:00
def install(self, spec, prefix):
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
# 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
configure(*config_args)
2014-02-08 10:11:07 +08:00
make()
make("install")