diff --git a/var/spack/repos/builtin/packages/esmf/package.py b/var/spack/repos/builtin/packages/esmf/package.py index a00e49ee90..3f65662ae7 100644 --- a/var/spack/repos/builtin/packages/esmf/package.py +++ b/var/spack/repos/builtin/packages/esmf/package.py @@ -176,7 +176,9 @@ def edit(self, spec, prefix): os.environ['ESMF_CXXLINKLIBS'] = '-lmpifort' elif '^openmpi' in spec: os.environ['ESMF_COMM'] = 'openmpi' - elif '^intel-parallel-studio+mpi' in spec or '^intel-mpi' in spec: + elif '^intel-parallel-studio+mpi' in spec or \ + '^intel-mpi' in spec or \ + '^intel-oneapi-mpi' in spec: os.environ['ESMF_COMM'] = 'intelmpi' else: # Force use of the single-processor MPI-bypass library. diff --git a/var/spack/repos/builtin/packages/nemsio/package.py b/var/spack/repos/builtin/packages/nemsio/package.py index 76edd7d734..d31ffc85ae 100644 --- a/var/spack/repos/builtin/packages/nemsio/package.py +++ b/var/spack/repos/builtin/packages/nemsio/package.py @@ -21,3 +21,6 @@ class Nemsio(CMakePackage): depends_on('bacio') depends_on('mpi') depends_on('w3nco') + + def cmake_args(self): + return ['-DMPI_Fortran_COMPILER=%s' % self.spec['mpi'].mpifc] diff --git a/var/spack/repos/builtin/packages/ufs-utils/package.py b/var/spack/repos/builtin/packages/ufs-utils/package.py index b1de6c9eb1..f430687c46 100644 --- a/var/spack/repos/builtin/packages/ufs-utils/package.py +++ b/var/spack/repos/builtin/packages/ufs-utils/package.py @@ -35,5 +35,9 @@ class UfsUtils(CMakePackage): depends_on('wgrib2') depends_on('zlib') + def cmake_args(self): + return ['-DMPI_C_COMPILER=%s' % self.spec['mpi'].mpicc, + '-DMPI_Fortran_COMPILER=%s' % self.spec['mpi'].mpifc] + def setup_build_environment(self, env): env.set('ESMFMKFILE', join_path(self.spec['esmf'].prefix.lib, 'esmf.mk'))