diff --git a/.circleci/config.yml b/.circleci/config.yml index 8b900ee522ae..58c5b8ee9a8d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ workflows: - docker-hub-creds matrix: parameters: - compiler: [gfortran, ifort] + compiler: [gfortran, ifort, ifx] cmake_generator: ['Unix Makefiles','Ninja'] baselibs_version: *baselibs_version repo: MAPL @@ -49,7 +49,7 @@ workflows: - docker-hub-creds matrix: parameters: - compiler: [gfortran, ifort] + compiler: [gfortran, ifort, ifx] baselibs_version: *baselibs_version repo: MAPL mepodevelop: false @@ -67,7 +67,7 @@ workflows: - docker-hub-creds matrix: parameters: - compiler: [ifort] + compiler: [ifort, ifx] baselibs_version: *baselibs_version repo: MAPL mepodevelop: false @@ -82,7 +82,7 @@ workflows: - docker-hub-creds matrix: parameters: - compiler: [gfortran, ifort] + compiler: [gfortran, ifort, ifx] tutorial_name: - hello_world - parent_no_children @@ -104,7 +104,7 @@ workflows: - docker-hub-creds matrix: parameters: - compiler: [gfortran, ifort] + compiler: [gfortran, ifort, ifx] baselibs_version: *baselibs_version repo: GEOSgcm checkout_fixture: true @@ -119,7 +119,7 @@ workflows: - docker-hub-creds matrix: parameters: - compiler: [gfortran, ifort] + compiler: [gfortran, ifort, ifx] requires: - build-GEOSgcm-on-<< matrix.compiler >> repo: GEOSgcm @@ -200,23 +200,23 @@ workflows: compiler_version: "2021.13" image_name: geos-env tag_build_arg_name: *tag_build_arg_name - #- ci/publish_docker: - #filters: - #tags: - #only: /^v.*$/ - #name: publish-ifx-docker-image - #context: - #- docker-hub-creds - #- ghcr-creds - #os_version: *os_version - #baselibs_version: *baselibs_version - #container_name: mapl - #mpi_name: intelmpi - #mpi_version: "2021.13" - #compiler_name: ifx - #compiler_version: "2024.2" - #image_name: geos-env - #tag_build_arg_name: *tag_build_arg_name + - ci/publish_docker: + filters: + tags: + only: /^v.*$/ + name: publish-ifx-docker-image + context: + - docker-hub-creds + - ghcr-creds + os_version: *os_version + baselibs_version: *baselibs_version + container_name: mapl + mpi_name: intelmpi + mpi_version: "2021.14" + compiler_name: ifx + compiler_version: "2025.0" + image_name: geos-env + tag_build_arg_name: *tag_build_arg_name - ci/publish_docker: filters: tags: diff --git a/CHANGELOG.md b/CHANGELOG.md index e55b7840bf5c..660110a6ac88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Use v7.27.0 Baselibs - Use GCC 14 for GNU tests - Add pFUnit-less build test + - Enable ifx tests - Improve some writes to be more informative - In `base/MAPL_CFIO.F90`, added `Iam` to a print statement so that when a read fails we know which routine failed - In `gridcomps/ExtData2G/ExtDataConfig.F90`, print out the name of the duplicate collection that causes model to fail @@ -50,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed issue of some Baselibs builds appearing to support zstandard. This is not possible due to Baselibs building HDF5 and netCDF as static libraries +- Workaround ifx bug in `pfio/ArrayReference.F90` (NOTE: This currently targets all versions of ifx, but will need to be qualified or removed in the future) - Updates to support llvm-flang - Trajectory sampler: fix a bug when group_name does not exist in netCDF file and a bug that omitted the first time point - Fixed a bug where the periodicity around the earth of the lat-lon grid was not being set properly when grid did not span from pole to pole diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt index 43ffa5fb4f06..f5fb9ddfe640 100644 --- a/base/CMakeLists.txt +++ b/base/CMakeLists.txt @@ -1,14 +1,5 @@ esma_set_this (OVERRIDE MAPL.base) -if(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") - if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 20) - if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 17) - add_definitions(-D__ifort_18) - endif() - endif() -endif() - - set (srcs MAPL_Profiler.F90 CFIOCollection.F90 MAPL_RegridderManager.F90 diff --git a/pfio/ArrayReference.F90 b/pfio/ArrayReference.F90 index 67a9635ea132..5289c8b74f36 100644 --- a/pfio/ArrayReference.F90 +++ b/pfio/ArrayReference.F90 @@ -87,7 +87,7 @@ function new_ArrayReference_1d(array, rc) result(reference) reference%shape = shape(array) _RETURN(_SUCCESS) - + end function new_ArrayReference_1d function new_ArrayReference_2d(array, rc) result(reference) @@ -151,7 +151,7 @@ function new_ArrayReference_3d(array, rc) result(reference) reference%shape = shape(array) _RETURN(_SUCCESS) - + end function new_ArrayReference_3d @@ -167,16 +167,32 @@ function new_ArrayReference_4d(array, rc) result(reference) select type (array) type is (real(kind=REAL32)) +#if defined(ODD_IFX_BUG) + if (has_address) reference%base_address = c_loc(array(1,1,1,1)) +#else if (has_address) reference%base_address = c_loc(array) +#endif reference%type_kind = pFIO_REAL32 type is (real(kind=REAL64)) +#if defined(ODD_IFX_BUG) + if (has_address) reference%base_address = c_loc(array(1,1,1,1)) +#else if (has_address) reference%base_address = c_loc(array) +#endif reference%type_kind = pFIO_REAL64 type is (integer(kind=INT32)) +#if defined(ODD_IFX_BUG) + if (has_address) reference%base_address = c_loc(array(1,1,1,1)) +#else if (has_address) reference%base_address = c_loc(array) +#endif reference%type_kind = pFIO_INT32 type is (integer(kind=INT64)) +#if defined(ODD_IFX_BUG) + if (has_address) reference%base_address = c_loc(array(1,1,1,1)) +#else if (has_address) reference%base_address = c_loc(array) +#endif reference%type_kind = pFIO_INT64 class default _FAIL( "ArrayRef does not support this type") @@ -184,7 +200,7 @@ function new_ArrayReference_4d(array, rc) result(reference) reference%shape = shape(array) _RETURN(_SUCCESS) - + end function new_ArrayReference_4d function new_ArrayReference_5d(array, rc) result(reference) @@ -199,16 +215,32 @@ function new_ArrayReference_5d(array, rc) result(reference) select type (array) type is (real(kind=REAL32)) +#if defined(ODD_IFX_BUG) + if (has_address) reference%base_address = c_loc(array(1,1,1,1,1)) +#else if (has_address) reference%base_address = c_loc(array) +#endif reference%type_kind = pFIO_REAL32 type is (real(kind=REAL64)) +#if defined(ODD_IFX_BUG) + if (has_address) reference%base_address = c_loc(array(1,1,1,1,1)) +#else if (has_address) reference%base_address = c_loc(array) +#endif reference%type_kind = pFIO_REAL64 type is (integer(kind=INT32)) +#if defined(ODD_IFX_BUG) + if (has_address) reference%base_address = c_loc(array(1,1,1,1,1)) +#else if (has_address) reference%base_address = c_loc(array) +#endif reference%type_kind = pFIO_INT32 type is (integer(kind=INT64)) +#if defined(ODD_IFX_BUG) + if (has_address) reference%base_address = c_loc(array(1,1,1,1,1)) +#else if (has_address) reference%base_address = c_loc(array) +#endif reference%type_kind = pFIO_INT64 class default _FAIL( "ArrayRef does not support this type") @@ -217,7 +249,7 @@ function new_ArrayReference_5d(array, rc) result(reference) reference%shape = shape(array) _RETURN(_SUCCESS) - + end function new_ArrayReference_5d integer function type_kind(element, rc) diff --git a/pfio/CMakeLists.txt b/pfio/CMakeLists.txt index 15f43fdc4388..178695eb74ab 100644 --- a/pfio/CMakeLists.txt +++ b/pfio/CMakeLists.txt @@ -1,12 +1,12 @@ esma_set_this (OVERRIDE MAPL.pfio) -if(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel") - if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 20) - if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 17) - add_definitions(-D__ifort_18) - endif() - endif() -endif() +# This is a workaround for a current ifx bug +# Technically, this bug is only due to a bug between +# ifx, OpenMP, and ArrayReference.F90, but in CMake land, it +# is hard to remove OpenMP flags for a *single* file. +if (CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM") + set_source_files_properties(ArrayReference.F90 PROPERTIES COMPILE_DEFINITIONS ODD_IFX_BUG) +endif () set (srcs # pFIO Files