Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cam6_4_036: Update MPAS-A external to use 'v8.2.1' #1145

Merged
merged 6 commits into from
Sep 24, 2024
Merged
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
url = https://github.com/MPAS-Dev/MPAS-Model.git
fxrequired = AlwaysRequired
fxsparse = ../.mpas_sparse_checkout
fxtag = b8c33daa
fxtag = v8.2.1
fxDONOTUSEurl = https://github.com/MPAS-Dev/MPAS-Model.git

[submodule "cosp2"]
Expand Down
66 changes: 66 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,71 @@
===============================================================

Tag name: cam6_4_036
Originator(s): gdicker
Date: Sep 24, 2024
One-line Summary: Update MPAS-A to v8.2.1
Github PR URL: https://github.com/ESCOMP/CAM/pull/1145

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
- Update MPAS-A within CAM to 'v8.2.1' https://github.com/ESCOMP/CAM/issue/1144

Describe any changes made to build system:

Describe any changes made to the namelist:

List any changes to the defaults for the boundary datasets:

Describe any substantial timing or memory changes:

Code reviewed by:

List all files eliminated:

List all files added and what they do:

List all existing files that have been modified, and describe the changes:
M .gitmodules
- Update the mpas fxTag to v8.2.1

M src/dynamics/mpas/Makefile
- Add rules to build stream_inquiry and mpas_stream_inquiry
- Pass CPPFLAGS to the registry command
- Edit CPPFLAGS: add MPAS_BUILD_TARGET and add the GIT_VERSION using a shell command
- Also a commented out addition to enable mpi_f08 support in MPAS

M src/dynamics/mpas/driver/cam_mpas_subdriver.F90
- Add streamInfo to the MPAS domain_ptr
- Modify function calls for updated variables
- Optional mpi_f08 change

If there were any failures reported from running test_driver.sh on any test
platform, and checkin with these failures has been OK'd by the gatekeeper,
then copy the lines from the td.*.status files for the failed tests to the
appropriate machine below. All failed tests must be justified.

derecho/intel/aux_cam:

FAIL ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s COMPARE_base_rest
FAIL SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d ... DIFF
- pre-existing failure due to HEMCO not having reproducible results issues #1018 and #856

PEND SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s
- pre-existing failures -- need fix in CLM external

derecho/nvhpc/aux_cam: ALL PASS

izumi/nag/aux_cam:

FAIL DAE.f45_f45_mg37.FHS94.izumi_nag.cam-dae
- pre-existing failure - issue #670

izumi/gnu/aux_cam: ALL PASS

Summarize any changes to answers: bit-for-bit

===============================================================
===============================================================

Tag name: cam6_4_035
Originator(s): fvitt
Date: 23 Sep 2024
Expand Down
11 changes: 9 additions & 2 deletions src/dynamics/mpas/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
CPPFLAGS := -D_MPI -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=unknown -DMPAS_NAMELIST_SUFFIX=atmosphere -DMPAS_CAM_DYCORE -DMPAS_PIO_SUPPORT -DMPAS_NO_ESMF_INIT
GIT_VERSION=$(shell git -C "$(MPAS_SRC_ROOT)/dycore" describe --always --dirty --tags || echo "N/A" )
CPPFLAGS := -D_MPI -DMPAS_NATIVE_TIMERS -DMPAS_CAM_DYCORE -DMPAS_PIO_SUPPORT -DMPAS_NO_ESMF_INIT -DMPAS_GIT_VERSION="$(GIT_VERSION)" -DMPAS_BUILD_TARGET="N/A" -DMPAS_NAMELIST_SUFFIX="atmosphere"
ifdef PIODEF
CPPFLAGS += $(PIODEF)
endif
ifeq ($(strip $(COMP_INTERFACE)),nuopc)
CPPFLAGS += -DMPAS_EXTERNAL_ESMF_LIB
endif
# Uncomment next line to enable MPAS to use mpi_f08 module
#CPPFLAGS += -DMPAS_USE_MPI_F08

REGISTRY_FILE := $(MPAS_SRC_ROOT)/dycore/src/core_atmosphere/Registry.xml

Expand Down Expand Up @@ -80,6 +83,8 @@ FRAME_OBJS = \
mpas_io_streams.o \
mpas_bootstrapping.o \
mpas_io_units.o \
mpas_stream_inquiry.o \
stream_inquiry.o \
mpas_stream_manager.o \
mpas_stream_list.o \
mpas_forcing.o \
Expand Down Expand Up @@ -179,6 +184,8 @@ mpas_io_units.o: mpas_kind_types.o

mpas_threading.o: mpas_kind_types.o

mpas_stream_inquiry.o: mpas_derived_types.o mpas_log.o mpas_c_interfacing.o stream_inquiry.o

mpas_stream_list.o: mpas_derived_types.o mpas_kind_types.o mpas_io_streams.o mpas_timekeeping.o regex_matching.o mpas_log.o

mpas_stream_manager.o: mpas_io_streams.o mpas_timekeeping.o mpas_derived_types.o mpas_kind_types.o mpas_c_interfacing.o mpas_stream_list.o mpas_dmpar.o mpas_io.o mpas_threading.o mpas_log.o
Expand Down Expand Up @@ -226,7 +233,7 @@ streams_gen: $(STREAMS_GEN_OBJS) ezxml.o
#
incs: $(REGISTRY_FILE)
( cpp -P -traditional $(CPPFLAGS) -I$(MPAS_SRC_ROOT)/dycore/src/core_atmosphere/diagnostics $(REGISTRY_FILE) > Registry_processed.xml )
( ./registry Registry_processed.xml )
( ./registry Registry_processed.xml $(CPPFLAGS) )

#
# Dycore
Expand Down
21 changes: 19 additions & 2 deletions src/dynamics/mpas/driver/cam_mpas_subdriver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,20 @@ end subroutine halt_model
!-----------------------------------------------------------------------
subroutine cam_mpas_init_phase1(mpicom, endrun, logUnits, realkind)

#ifdef MPAS_USE_MPI_F08
use mpi_f08, only : mpi_comm_type => mpi_comm
#endif
use mpas_domain_routines, only : mpas_allocate_domain
use mpas_framework, only : mpas_framework_init_phase1
use atm_core_interface, only : atm_setup_core, atm_setup_domain
use mpas_kind_types, only : RKIND

! Dummy argument
#ifdef MPAS_USE_MPI_F08
type(mpi_comm_type), intent(in) :: mpicom
#else
integer, intent(in) :: mpicom
#endif
procedure(halt_model) :: endrun
integer, dimension(2), intent(in) :: logUnits
integer, intent(in) :: realkind
Expand Down Expand Up @@ -108,7 +115,7 @@ subroutine cam_mpas_init_phase1(mpicom, endrun, logUnits, realkind)
!
! Initialize MPAS infrastructure (principally, the mpas_dmpar module)
!
call mpas_framework_init_phase1(domain_ptr % dminfo, mpi_comm=mpicom)
call mpas_framework_init_phase1(domain_ptr % dminfo, external_comm=mpicom)

call atm_setup_core(corelist)
call atm_setup_domain(domain_ptr)
Expand Down Expand Up @@ -152,6 +159,7 @@ subroutine cam_mpas_init_phase2(pio_subsystem, endrun, cam_calendar)

use mpas_framework, only : mpas_framework_init_phase2
use mpas_timer, only : mpas_timer_start
use mpas_stream_inquiry, only : mpas_stream_inquiry_new_streaminfo

type (iosystem_desc_t), pointer :: pio_subsystem
procedure(halt_model) :: endrun
Expand Down Expand Up @@ -181,12 +189,20 @@ subroutine cam_mpas_init_phase2(pio_subsystem, endrun, cam_calendar)

call mpas_timer_start('total time')

! Since MPAS is being used as a dycore and is not responsible for IO, it's enough to create this
! object without running its init(). Any queries made to it will always return `.false.`
domain_ptr % streamInfo => mpas_stream_inquiry_new_streaminfo()
if (.not. associated(domain_ptr % streamInfo)) then
call endrun(subname//': FATAL: streamInfo instantiation failed for core '//trim(domain_ptr % core % coreName))
end if

ierr = domain_ptr % core % define_packages(domain_ptr % packages)
if ( ierr /= 0 ) then
call endrun(subname//': FATAL: Package definition failed for core '//trim(domain_ptr % core % coreName))
end if

ierr = domain_ptr % core % setup_packages(domain_ptr % configs, domain_ptr % packages, domain_ptr % iocontext)
ierr = domain_ptr % core % setup_packages(domain_ptr % configs, domain_ptr % streamInfo, &
domain_ptr % packages, domain_ptr % iocontext)
if ( ierr /= 0 ) then
call endrun(subname//': FATAL: Package setup failed for core '//trim(domain_ptr % core % coreName))
end if
Expand Down Expand Up @@ -2353,6 +2369,7 @@ subroutine cam_mpas_finalize()
!
! Finalize infrastructure
!
deallocate(domain_ptr % streamInfo) ! created by mpas_stream_inquiry_new_streaminfo

! Print out log stats and close log file
! (Do this after timer stats are printed and stream mgr finalized,
Expand Down
2 changes: 1 addition & 1 deletion src/dynamics/mpas/dycore
Submodule dycore updated 310 files
Loading