GEOS-ESM / ESMA_cmake

Custom CMake macros for the GEOS Earth System Model
Apache License 2.0
4 stars 9 forks source link

Port to Intel LLVM based compilers #299

Closed dkokron closed 8 months ago

dkokron commented 1 year ago

I copied Intel.cmake to IntelLLVM.cmake and made the following edit in order to get esma_cmake-v3.4.3 to compile with the LLVM based compilers from Intel. ifx does not support the "source" option to the "-fp-model" flag and stops working if it is present.

diff Intel.cmake IntelLLVM.cmake
66c66
< set (common_Fortran_fpe_flags "${FPE0} ${FP_MODEL_SOURCE} ${HEAPARRAYS} ${NOOLD_MAXMINLOC}")
---
> set (common_Fortran_fpe_flags "${FPE0} ${HEAPARRAYS} ${NOOLD_MAXMINLOC}")

Note that the LLVM based compilers are very different than the Classic compilers in their support for compiler options. See https://www.intel.com/content/www/us/en/developer/articles/guide/porting-guide-for-ifort-to-ifx.html for further details.

mathomp4 commented 1 year ago

@dkokron Thanks. Can you look at/try #300 and see if that works for you?

dkokron commented 1 year ago

Matt, Do you need me to do anything before promoting the fix?

mathomp4 commented 1 year ago

Matt, Do you need me to do anything before promoting the fix?

I suppose if you could pull this branch and see if it works for you? (I still don't have access to ifx 2023.0)

dkokron commented 1 year ago

Matt, You don't need root to install oneAPI.

On Fri, Dec 30, 2022 at 12:49 PM Matthew Thompson @.***> wrote:

Matt, Do you need me to do anything before promoting the fix?

I suppose if you could pull this branch and see if it works for you? (I still don't have access to ifx 2023.0)

— Reply to this email directly, view it on GitHub https://github.com/GEOS-ESM/ESMA_cmake/issues/299#issuecomment-1368049639, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACODV2CDXWVSJLJWTGWGWX3WP4VCPANCNFSM6AAAAAATLL3U2Y . You are receiving this because you were mentioned.Message ID: @.***>

dkokron commented 1 year ago

I included your feature-mathomp4-299-add-ifx-support into the hpc-stack build system and did a targeted build of emsa_cmake. Doesn't look like esma_cmake compiles anything and I don't know what else in hpc-stack depends on it. Thus I'm not sure how to test this feature branch.