summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py7
-rw-r--r--var/spack/repos/builtin/packages/mvapich2/package.py7
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py25
3 files changed, 21 insertions, 18 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 940a44a1b4..e4ff29c00a 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -82,6 +82,13 @@ class Mpich(Package):
]
def install(self, spec, prefix):
+ # Until we can pass variants such as +fortran through virtual
+ # dependencies depends_on('mpi'), require Fortran compiler to
+ # avoid delayed build errors in dependents.
+ if (self.compiler.f77 is None) or (self.compiler.fc is None):
+ raise InstallError('Mpich requires both C and Fortran ',
+ 'compilers!')
+
config_args = [
'--prefix={0}'.format(prefix),
'--enable-shared',
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py
index 06678bf08b..18f2ebe0bb 100644
--- a/var/spack/repos/builtin/packages/mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2/package.py
@@ -232,6 +232,13 @@ class Mvapich2(Package):
]
def install(self, spec, prefix):
+ # Until we can pass variants such as +fortran through virtual
+ # dependencies depends_on('mpi'), require Fortran compiler to
+ # avoid delayed build errors in dependents.
+ if (self.compiler.f77 is None) or (self.compiler.fc is None):
+ raise InstallError('Mvapich2 requires both C and Fortran ',
+ 'compilers!')
+
# we'll set different configure flags depending on our
# environment
configure_args = [
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index bb356aaccc..72b9b8dbd2 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -23,9 +23,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import os
-
-import llnl.util.tty as tty
-
from spack import *
@@ -135,21 +132,6 @@ class Openmpi(Package):
join_path(self.prefix.lib, 'libmpi.{0}'.format(dso_suffix))
]
- def setup_environment(self, spack_env, run_env):
- # As of 06/2016 there is no mechanism to specify that packages which
- # depends on MPI need C or/and Fortran implementation. For now
- # require both.
- if (self.compiler.f77 is None) or (self.compiler.fc is None):
- tty.warn('OpenMPI : FORTRAN compiler not found')
- tty.warn('OpenMPI : FORTRAN bindings will be disabled')
- spack_env.unset('FC')
- spack_env.unset('F77')
- # Setting an attribute here and using it in the 'install'
- # method is needed to ensure tty.warn is actually displayed
- # to user and not redirected to spack-build.out
- self.config_extra = ['--enable-mpi-fortran=none',
- '--disable-oshmem-fortran']
-
@property
def verbs(self):
# Up through version 1.6, this option was previously named
@@ -161,6 +143,13 @@ class Openmpi(Package):
return 'verbs'
def install(self, spec, prefix):
+ # Until we can pass variants such as +fortran through virtual
+ # dependencies depends_on('mpi'), require Fortran compiler to
+ # avoid delayed build errors in dependents.
+ if (self.compiler.f77 is None) or (self.compiler.fc is None):
+ raise InstallError('OpenMPI requires both C and Fortran ',
+ 'compilers!')
+
config_args = ["--prefix=%s" % prefix,
"--with-hwloc=%s" % spec['hwloc'].prefix,
"--enable-shared",