diff --git a/CHANGELOG.md b/CHANGELOG.md index 86c0127..437bd78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,16 @@ ### Updates +- GFE v1.21.0 + - pFUnit v4.14.0 + - Fixes for LLVM Flang among others + ### Fixed +- Added patches for FMS for llvm flang + - One for https://github.com/NOAA-GFDL/FMS/issues/1738 + - One for https://github.com/NOAA-GFDL/FMS/issues/1739 + ### Changed ### Removed diff --git a/GFE b/GFE index 6f5586c..9be1379 160000 --- a/GFE +++ b/GFE @@ -1 +1 @@ -Subproject commit 6f5586c7a03a8689498f6f8dfa0573fe17b9ad03 +Subproject commit 9be13792f26ccab4076dba53d6c9d7a62c21d2ce diff --git a/GNUmakefile b/GNUmakefile index 4b54295..ed867c4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -919,7 +919,16 @@ libyaml.config: cmake -B build -S . -DCMAKE_INSTALL_PREFIX=$(prefix) -DCMAKE_PREFIX_PATH=$(prefix) -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ) @touch $@ -FMS.config: netcdf.install netcdf-fortran.install libyaml.install +# We need to patch FMS for LLVM +# https://github.com/NOAA-GFDL/FMS/issues/1739 +# https://github.com/NOAA-GFDL/FMS/issues/1738 +# NOTE: Because we patch both source and CMake, we need to patch before +# configuring and unpatch after installing +FMS.config :: netcdf.install netcdf-fortran.install libyaml.install + @echo Patching FMS + patch -f -p1 < ./patches/FMS/llvm.patch + +FMS.config :: netcdf.install netcdf-fortran.install libyaml.install @echo "Configuring FMS" @mkdir -p ./FMS/build @(cd ./FMS; \ @@ -1109,12 +1118,16 @@ libyaml.install: libyaml.config cmake --build build --target install -j $(MAKEJOBS)) @touch $@ -FMS.install: FMS.config +FMS.install :: FMS.config @echo "Installing FMS" @(cd ./FMS; \ cmake --build build --target install -j $(MAKEJOBS)) @touch $@ +FMS.install :: FMS.config + @echo Unpatching FMS + patch -f -p1 -R < ./patches/FMS/llvm.patch + # MAT: Note that on Mac machines there seems to be an issue with the libtool setup # in nco. If you just run nco, it never makes the libnco.a library, or at least # does not make it correctly. As the nco/m4/libtool.m4 and, say, the diff --git a/README.md b/README.md index b6d5b42..7f562f5 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ NASA/GSFC. | [netCDF C++](https://github.com/Unidata/netcdf-cxx4) | 4.3.1 | | [HDF5](https://portal.hdfgroup.org/display/support) | 1.14.5 | | [HDF4](https://portal.hdfgroup.org/display/support) | 4.2.16-2 | -| [GFE](https://github.com/Goddard-Fortran-Ecosystem/GFE) | v1.20.0 | +| [GFE](https://github.com/Goddard-Fortran-Ecosystem/GFE) | v1.21.0 | | [xgboost](https://github.com/dmlc/xgboost) | v1.6.0 | | [libyaml](https://github.com/yaml/libyaml.git) | 0.2.5 | | [antlr2](https://www.antlr2.org/) | 2.7.7 | diff --git a/patches/FMS/llvm.patch b/patches/FMS/llvm.patch new file mode 100644 index 0000000..b5b273b --- /dev/null +++ b/patches/FMS/llvm.patch @@ -0,0 +1,32 @@ +--- a/FMS/mpp/include/mpp_chksum_int.fh ++++ b/FMS/mpp/include/mpp_chksum_int.fh +@@ -53,8 +53,8 @@ function MPP_CHKSUM_INT_RMASK_( var, pelist, mask_val ) + integer, optional :: pelist(:) + real, intent(in) :: mask_val + integer(KIND(var))::imask_val +- integer(KIND=i4_kind)::i4tmp(2)=0 +- real(KIND=r4_kind)::r4tmp(2)=0 ++ integer(KIND=i4_kind),allocatable::i4tmp(:) ++ real(KIND=r4_kind),allocatable::r4tmp(:) + integer(KIND=i8_kind) :: i8tmp=0 + !high fidelity error message + character(LEN=1) :: tmpStr1,tmpStr2,tmpStr3 +--- a/FMS/CMakeLists.txt ++++ b/FMS/CMakeLists.txt +@@ -325,6 +325,7 @@ foreach(kind ${kinds}) + mosaic2/include + constants + astronomy/include ++ field_manager + field_manager/include + time_interp/include + tracer_manager/include +@@ -380,6 +381,7 @@ foreach(kind ${kinds}) + $ + $ + $ ++ $ + $ + $ + $ +