Skip to content

Commit

Permalink
Merge pull request #3051 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
GitFlow: Merge develop into main for 2.48 release
  • Loading branch information
mathomp4 authored Sep 24, 2024
2 parents c7926cd + a3ac73e commit 38af635
Show file tree
Hide file tree
Showing 262 changed files with 4,203 additions and 1,308 deletions.
29 changes: 23 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ parameters:
# Anchors to prevent forgetting to update a version
os_version: &os_version ubuntu20
baselibs_version: &baselibs_version v7.25.0
bcs_version: &bcs_version v11.5.0
bcs_version: &bcs_version v11.6.0
tag_build_arg_name: &tag_build_arg_name maplversion

orbs:
ci: geos-esm/circleci-tools@2
ci: geos-esm/circleci-tools@4

workflows:
build-and-test-MAPL:
Expand Down Expand Up @@ -136,7 +136,7 @@ workflows:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran,ifort]
compiler: [gfortran, ifort]
baselibs_version: *baselibs_version
repo: GEOSldas
mepodevelop: false
Expand Down Expand Up @@ -171,7 +171,7 @@ workflows:
filters:
tags:
only: /^v.*$/
name: publish-intel-docker-image
name: publish-ifort-docker-image
context:
- docker-hub-creds
- ghcr-creds
Expand All @@ -180,10 +180,27 @@ workflows:
container_name: mapl
mpi_name: intelmpi
mpi_version: "2021.13"
compiler_name: intel
compiler_version: "2024.2"
compiler_name: ifort
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:
Expand Down
8 changes: 0 additions & 8 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,3 @@

# The MAPL Team owns all the files
* @GEOS-ESM/mapl-team

# The Python Transition Team will own Python files
# until the Python 3 transition is completed
*.py @GEOS-ESM/python-transition-team

# The GEOS CMake Team is the CODEOWNER for the CMakeLists.txt files in this repository
CMakeLists.txt @GEOS-ESM/cmake-team

2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
name: Build and Test MAPL Intel
runs-on: ubuntu-latest
container:
image: gmao/ubuntu20-geos-env:v7.25.0-intelmpi_2021.13-intel_2024.2
image: gmao/ubuntu20-geos-env:v7.25.0-intelmpi_2021.13-ifort_2021.13
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
# It seems like we might not need secrets on GitHub Actions which is good for forked
# pull requests
Expand Down
18 changes: 3 additions & 15 deletions Apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,13 @@ install(
DESTINATION bin/forcing_converter)

ecbuild_add_executable (TARGET Regrid_Util.x SOURCES Regrid_Util.F90)
target_link_libraries (Regrid_Util.x PRIVATE MAPL MPI::MPI_Fortran ESMF::ESMF)
target_link_libraries (Regrid_Util.x PRIVATE MAPL MPI::MPI_Fortran ESMF::ESMF OpenMP::OpenMP_Fortran)
target_include_directories (Regrid_Util.x PRIVATE $<BUILD_INTERFACE:${MAPL_SOURCE_DIR}/include>)
# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
target_link_libraries(Regrid_Util.x PRIVATE OpenMP::OpenMP_Fortran)
endif ()

ecbuild_add_executable (TARGET time_ave_util.x SOURCES time_ave_util.F90)
target_link_libraries (time_ave_util.x PRIVATE MAPL MPI::MPI_Fortran ESMF::ESMF)
target_link_libraries (time_ave_util.x PRIVATE MAPL MPI::MPI_Fortran ESMF::ESMF OpenMP::OpenMP_Fortran)
target_include_directories (time_ave_util.x PRIVATE $<BUILD_INTERFACE:${MAPL_SOURCE_DIR}/include>)
# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
target_link_libraries(time_ave_util.x PRIVATE OpenMP::OpenMP_Fortran)
endif ()

ecbuild_add_executable (TARGET Comp_Testing_Driver.x SOURCES Comp_Testing_Driver.F90)
target_link_libraries (Comp_Testing_Driver.x PRIVATE MAPL MPI::MPI_Fortran ESMF::ESMF)
target_link_libraries (Comp_Testing_Driver.x PRIVATE MAPL MPI::MPI_Fortran ESMF::ESMF OpenMP::OpenMP_Fortran)
target_include_directories (Comp_Testing_Driver.x PRIVATE $<BUILD_INTERFACE:${MAPL_SOURCE_DIR}/include>)
# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
target_link_libraries(Comp_Testing_Driver.x PRIVATE OpenMP::OpenMP_Fortran)
endif ()
3 changes: 2 additions & 1 deletion Apps/Regrid_Util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ subroutine process_command_line(this,rc)
this%lat_range=uninit
this%shave=64
this%deflate=0
this%quantize_algorithm=1
this%quantize_algorithm=0
this%quantize_level=0
this%use_weights = .false.
nargs = command_argument_count()
Expand Down Expand Up @@ -424,6 +424,7 @@ subroutine main()
call t_prof%stop("Read")

call MPI_BARRIER(MPI_COMM_WORLD,STATUS)
_VERIFY(status)

call t_prof%start("write")

Expand Down
13 changes: 11 additions & 2 deletions Apps/time_ave_util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,13 @@ program time_ave

!call timebeg ('main')

call mpi_init ( ierror ) ; comm = mpi_comm_world
call mpi_init ( ierror )
_VERIFY(ierror)
comm = mpi_comm_world
call mpi_comm_rank ( comm,myid,ierror )
_VERIFY(ierror)
call mpi_comm_size ( comm,npes,ierror )
_VERIFY(ierror)
call ESMF_Initialize(logKindFlag=ESMF_LOGKIND_NONE,mpiCommunicator=MPI_COMM_WORLD, _RC)
call MAPL_Initialize(_RC)
t_prof = DistributedProfiler('time_ave_util',MpiTImerGauge(),MPI_COMM_WORLD)
Expand Down Expand Up @@ -813,6 +817,7 @@ program time_ave
enddo ! End ntime Loop within file

call MPI_BARRIER(comm,status)
_VERIFY(status)
enddo

do k=0,ntods
Expand Down Expand Up @@ -1064,7 +1069,9 @@ program time_ave
endif

call mpi_reduce( qmin(nloc(n)+L-1),qming,1,mpi_real,mpi_min,0,comm,ierror )
_VERIFY(ierror)
call mpi_reduce( qmax(nloc(n)+L-1),qmaxg,1,mpi_real,mpi_max,0,comm,ierror )
_VERIFY(ierror)
if( root ) then
if(L.eq.1) then
write(6,3101) trim(vname2(n)),plev,qming,qmaxg
Expand All @@ -1076,6 +1083,7 @@ program time_ave
3102 format(1x,' ',a20,' Level: ',f9.3,' Min: ',g15.8,' Max: ',g15.8)
enddo
call MPI_BARRIER(comm,status)
_VERIFY(status)
if( root ) print *
enddo
if( root ) print *
Expand Down Expand Up @@ -1676,7 +1684,7 @@ end function is_leap_year

subroutine usage(root)
logical, intent(in) :: root
integer :: status,errorcode
integer :: status,errorcode,rc
if(root) then
write(6,100)
100 format( "usage: ",/,/ &
Expand Down Expand Up @@ -1710,6 +1718,7 @@ subroutine usage(root)
)
endif
call MPI_Abort(MPI_COMM_WORLD,errorcode,status)
_VERIFY(status)
end subroutine usage

subroutine generate_report()
Expand Down
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,67 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [2.48.0] - 2024-09-24

### Added

- Added 5 new ExtData tests to test compression, bit-shaving, and quantization

### Changed

- Rename all single-digit ExtData tests to have a leading zero (i.e., `case1` -> `case01`)
- Add restart benchmark code `restart_simulator.x` in benchmark directory
- Start implementing changes for vertical regridding in ExtData
- Made the POSITIVE field attribute defaults to "down" in case it is not found
- VLOCATION is not querried in MAPL_VerticalMethods.F90 for rank 2 fields
- Fixed time print in Cap GC (from slashes to colons)
- Added ability to read the attribute with explicit type "string" of a netcdf variable.
- Add ability to connect export of the MAPL hierachy to ExtData via CAP.rc file
- Added new driver, CapDriver.x, to excerise the MAPL_Cap with the configuratable component also used by ExtDataDriver.x
- Added Fortran interface to UDUNITS2
- NOTE: This now means MAPL depends on UDUNITS2 (and transitively, expat)
- Improve mask sampler by adding an MPI step and a LS_chunk (intermediate step)
- CI Updates
- Update Baselibs in CI to 7.25.0
- Update to circleci-tools orb v4
- This adds the ability to do an `ifx` test along with the `ifort` test (though `ifx` is not yet enabled)
- Update `components.yaml`
- ESMA_env v4.30.1
- Update to Baselibs 7.25.0
- ESMF 8.6.1
- GFE v1.16.0
- gFTL v1.14.0
- gFTL-shared v1.9.0
- fArgParse v1.8.0
- pFUnit v4.10.0
- yaFyaml v1.4.0
- curl 8.8.0
- NCO 5.2.6
- Other various fixes from the v8 branch
- Move to use Intel ifort 2021.13 at NCCS SLES15, NAS, and GMAO Desktops
- Move to use Intel MPI at NCCS SLES15 and GMAO Desktops
- Move to GEOSpyD Min24.4.4 Python 3.11
- Fix for csh at NAS
- ESMA_cmake v3.51.0
- Update `esma_add_fortran_submodules` function
- Move MPI detection out of FindBaselibs
- Add SMOD to submodule generator
- NAG OpenMP Workaround
- Support for Jemalloc and LLVM Flang
- Add support for preliminary CF Conventions quantization properties
- Add new quantization keyword `granular_bitround` to History. This will be the preferred keyword for quantization in the future
replacing `GranularBR`

### Fixed

- Fix profiler PercentageColumn test for GCC 14
- Fix bug in ExtData Tests. CMake was overwriting the `EXTDATA2G_SMALL_TESTS` LABEL with `ESSENTIAL`

### Deprecated

- Deprecate `GranularBR` as a quantization method keyword in History. We will prefer `granular_bitround` in the future to match
draft CF conventions. This will be removed in MAPL 3.

## [2.47.2] - 2024-08-16

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif ()

project (
MAPL
VERSION 2.47.2
VERSION 2.48.0
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

# Set the possible values of build type for cmake-gui
Expand Down Expand Up @@ -218,6 +218,7 @@ if (APPLE)
add_compile_definitions("-D__DARWIN")
endif()

add_subdirectory (udunits2f)
add_subdirectory (pfio)
add_subdirectory (profiler)
add_subdirectory (generic)
Expand Down
32 changes: 13 additions & 19 deletions Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
esma_set_this (OVERRIDE MAPL.test_utilities)

set(MODULE_DIRECTORY "${esma_include}/Tests")

set (srcs
ExtDataDriverGridComp.F90
ExtDataRoot_GridComp.F90
ExtDataDriver.F90
ExtDataDriverMod.F90
VarspecDescription.F90
)

esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL NetCDF::NetCDF_Fortran NetCDF::NetCDF_C TYPE ${MAPL_LIBRARY_TYPE})

if (BUILD_WITH_FARGPARSE)

ecbuild_add_executable (TARGET ExtDataDriver.x SOURCES ${srcs})
target_link_libraries (ExtDataDriver.x PRIVATE MAPL FARGPARSE::fargparse ESMF::ESMF)
# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
target_link_libraries(ExtDataDriver.x PRIVATE OpenMP::OpenMP_Fortran)
endif ()
ecbuild_add_executable (TARGET ExtDataDriver.x SOURCES ExtDataDriver.F90 ExtDataDriverGridComp.F90 ExtDataDriverMod.F90)
target_link_libraries (ExtDataDriver.x PRIVATE MAPL MAPL.test_utilities FARGPARSE::fargparse ESMF::ESMF OpenMP::OpenMP_Fortran)
set_target_properties(ExtDataDriver.x PROPERTIES Fortran_MODULE_DIRECTORY ${MODULE_DIRECTORY})
target_compile_definitions (ExtDataDriver.x PRIVATE $<$<BOOL:${USE_EXTDATA2G}>:BUILD_WITH_EXTDATA2G>)
add_subdirectory(ExtData_Testing_Framework EXCLUDE_FROM_ALL)

ecbuild_add_executable (TARGET pfio_MAPL_demo.x SOURCES pfio_MAPL_demo.F90)
target_link_libraries (pfio_MAPL_demo.x PRIVATE MAPL FARGPARSE::fargparse ESMF::ESMF)
# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
target_link_libraries(pfio_MAPL_demo.x PRIVATE OpenMP::OpenMP_Fortran)
endif ()
target_link_libraries (pfio_MAPL_demo.x PRIVATE MAPL FARGPARSE::fargparse ESMF::ESMF OpenMP::OpenMP_Fortran)
set_target_properties(pfio_MAPL_demo.x PROPERTIES Fortran_MODULE_DIRECTORY ${MODULE_DIRECTORY})

ecbuild_add_executable (TARGET MAPL_demo_fargparse.x SOURCES MAPL_demo_fargparse.F90)
target_link_libraries (MAPL_demo_fargparse.x PRIVATE MAPL FARGPARSE::fargparse ESMF::ESMF)
# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
target_link_libraries(MAPL_demo_fargparse.x PRIVATE OpenMP::OpenMP_Fortran)
endif ()
target_link_libraries (MAPL_demo_fargparse.x PRIVATE MAPL FARGPARSE::fargparse ESMF::ESMF OpenMP::OpenMP_Fortran)
set_target_properties(MAPL_demo_fargparse.x PROPERTIES Fortran_MODULE_DIRECTORY ${MODULE_DIRECTORY})

ecbuild_add_executable (TARGET CapDriver.x SOURCES CapDriver.F90)
target_link_libraries (CapDriver.x PRIVATE MAPL MAPL.test_utilities FARGPARSE::fargparse ESMF::ESMF OpenMP::OpenMP_Fortran)
set_target_properties(CapDriver.x PROPERTIES Fortran_MODULE_DIRECTORY ${MODULE_DIRECTORY})

endif ()
24 changes: 24 additions & 0 deletions Tests/CapDriver.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#define I_AM_MAIN

#include "MAPL_Generic.h"

program CapDriver_Main
use MPI
use MAPL
use ExtDataUtRoot_GridCompMod, only: ROOT_SetServices => SetServices
implicit none

character(len=*), parameter :: Iam="CapDriver_Main"
type (MAPL_Cap) :: cap
type (MAPL_FargparseCLI) :: cli
type (MAPL_CapOptions) :: cap_options
integer :: status

cli = MAPL_FargparseCLI()
cap_options = MAPL_CapOptions(cli)
cap = MAPL_Cap('Root', ROOT_SetServices, cap_options = cap_options)

call cap%run(_RC)

end program CapDriver_Main

1 change: 1 addition & 0 deletions Tests/ExtDataDriverMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ subroutine initialize_mpi(this, unusable, rc)
_UNUSED_DUMMY(unusable)

call MPI_Init(ierror)
_VERIFY(ierror)

this%comm_world=MPI_COMM_WORLD
call MPI_Comm_rank(this%comm_world, this%rank, ierror); _VERIFY(ierror)
Expand Down
Loading

0 comments on commit 38af635

Please sign in to comment.