Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion GFE
17 changes: 15 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
32 changes: 32 additions & 0 deletions patches/FMS/llvm.patch
Original file line number Diff line number Diff line change
@@ -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})
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/astronomy/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/monin_obukhov/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/sat_vapor_pres/include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/field_manager>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/field_manager/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/horiz_interp/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/mosaic2/include>