MPAS-Dev / MPAS-Model

Repository for MPAS models and shared framework releases.
235 stars 312 forks source link

Add build target 'intel' for the Intel oneAPI compilers #1129

Closed mgduda closed 7 months ago

mgduda commented 9 months ago

This PR adds a new build target (intel) for the Intel oneAPI compilers. The ifx, icx, and icpx compilers are used for serial code, while the mpifort, mpicc, and mpic++ wrappers are used for MPI code.

mgduda commented 9 months ago

On Derecho, after loading the intel module, setting the environment variable INTEL_COMPILER_TYPE=ONEAPI seems to cause the oneAPI compilers to be invoked in favor of the Intel classic compilers.

mgduda commented 7 months ago

@gdicker1 It looks like builds also fail when using the PIO library with the existing ifort target. So the failures don't seem to be specific to the proposed new intel target.

gdicker1 commented 7 months ago

To test this PR I did builds on Derecho using the same software stack (intel/2023.0.0, cray-mpich/8.1.25,...) to try builds for:

Only the combination of intel and PIO failed to build.

Other times I've seen this kind of error has been with the OneAPI compilers when I was mistakenly using them with the ifort target or when the OneAPI compilers have been used to compile the other mpas-* cores in EarthWorks [^1]. To me this points to an issue with how our core_interface code interacts with the OneAPI+PIO combo.

[^1]: NOTE: the mpas-framework is based more on the v7.3+ MPAS-Dev/MPAS-Model than whatever E3SM uses

mgduda commented 7 months ago

That's true that I actually used the Intel oneAPI compilers with the ifort build target when noting a failure there with PIO as the I/O option. I think my point is that this demonstrates that it's not the new build target itself that's wrong, but rather, that there's a problem with the compiler (or its interaction with our code, to be fair). I'd propose that fixing builds with the oneAPI compilers should be a separate PR, and this PR shouldn't mix code changes with Makefile changes, as the two goals are fundamentally different.