ESMF, NEMSIO and UFS-UTILS changes. (#25846)

* ESMF and NEMSIO changes.

- Updating ESMF to set the COMM correctly when using Intel oneapi.
- Explicitly setting the CMake MPI Fortran compiler for NEMSIO.

* Update UFS utils CMake to use MPI_<lang>_COMPILER.
This commit is contained in:
Timothy Brown 2021-09-13 16:13:43 -06:00 committed by GitHub
parent dad69e7d7c
commit 998de97091
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -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.

View file

@ -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]

View file

@ -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'))