summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMartin Diehl <mail@martin-diehl.net>2022-06-03 17:40:02 +0200
committerGitHub <noreply@github.com>2022-06-03 08:40:02 -0700
commit38ccefbe844c292371b95ae6b03b535a96fa16fb (patch)
tree57bca5fc96c49fed2b0744bbb5653015c4ae9c43 /var
parent1bd33d88bd5bdf6820800b71b2f5f798e857920b (diff)
downloadspack-38ccefbe844c292371b95ae6b03b535a96fa16fb.tar.gz
spack-38ccefbe844c292371b95ae6b03b535a96fa16fb.tar.bz2
spack-38ccefbe844c292371b95ae6b03b535a96fa16fb.tar.xz
spack-38ccefbe844c292371b95ae6b03b535a96fa16fb.zip
mpicxx does not work with icpx (#30098)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py36
1 files changed, 26 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
index 7d39db8c03..29e28dafda 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py
@@ -49,7 +49,10 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
variant('ilp64', default=False,
description='Build with ILP64 support')
- variant('external-libfabric', default=False, description='Enable external libfabric dependency')
+ variant('generic-names', default=False,
+ description='Use generic names, e.g mpicc instead of mpiicc')
+ variant('external-libfabric', default=False,
+ description='Enable external libfabric dependency')
depends_on('libfabric', when='+external-libfabric', type=('link', 'run'))
provides('mpi@:3.1')
@@ -60,10 +63,16 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
def setup_dependent_package(self, module, dep_spec):
dir = join_path(self.component_path, 'bin')
- self.spec.mpicc = join_path(dir, 'mpicc')
- self.spec.mpicxx = join_path(dir, 'mpicxx')
- self.spec.mpif77 = join_path(dir, 'mpif77')
- self.spec.mpifc = join_path(dir, 'mpifc')
+ if '+generic-names' in self.spec:
+ self.spec.mpicc = join_path(dir, 'mpicc')
+ self.spec.mpicxx = join_path(dir, 'mpicxx')
+ self.spec.mpif77 = join_path(dir, 'mpif77')
+ self.spec.mpifc = join_path(dir, 'mpifc')
+ else:
+ self.spec.mpicc = join_path(dir, 'mpiicc')
+ self.spec.mpicxx = join_path(dir, 'mpiicpc')
+ self.spec.mpif77 = join_path(dir, 'mpiifort')
+ self.spec.mpifc = join_path(dir, 'mpiifort')
def setup_dependent_build_environment(self, env, dependent_spec):
env.set('MPICH_CC', spack_cc)
@@ -74,11 +83,18 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
# Set compiler wrappers for dependent build stage
dir = join_path(self.component_path, 'bin')
- env.set('MPICC', join_path(dir, 'mpicc'))
- env.set('MPICXX', join_path(dir, 'mpicxx'))
- env.set('MPIF77', join_path(dir, 'mpif77'))
- env.set('MPIF90', join_path(dir, 'mpif90'))
- env.set('MPIFC', join_path(dir, 'mpifc'))
+ if '+generic-names' in self.spec:
+ env.set('MPICC', join_path(dir, 'mpicc'))
+ env.set('MPICXX', join_path(dir, 'mpicxx'))
+ env.set('MPIF77', join_path(dir, 'mpif77'))
+ env.set('MPIF90', join_path(dir, 'mpif90'))
+ env.set('MPIFC', join_path(dir, 'mpifc'))
+ else:
+ env.set('MPICC', join_path(dir, 'mpiicc'))
+ env.set('MPICXX', join_path(dir, 'mpiicpc'))
+ env.set('MPIF77', join_path(dir, 'mpiifort'))
+ env.set('MPIF90', join_path(dir, 'mpiifort'))
+ env.set('MPIFC', join_path(dir, 'mpiifort'))
env.set('I_MPI_ROOT', self.component_path)