require fortran for MPI providers to avoid delayed compiler errors (#1937)
* openmpi: require fortran for now * mpich: requre fortran for now * mvapich2: require fortran for now * openmpi: flake8 fixes
This commit is contained in:
parent
92f17eeba7
commit
46433b9eb3
@ -82,6 +82,13 @@ def setup_dependent_package(self, module, dep_spec):
|
||||
]
|
||||
|
||||
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',
|
||||
|
@ -232,6 +232,13 @@ def setup_dependent_package(self, module, dep_spec):
|
||||
]
|
||||
|
||||
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 = [
|
||||
|
@ -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 @@ def setup_dependent_package(self, module, dep_spec):
|
||||
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 @@ def verbs(self):
|
||||
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",
|
||||
|
Loading…
Reference in New Issue
Block a user