Skip to content

Commit

Permalink
Squashed commit of the release/8.1.0 branch:
Browse files Browse the repository at this point in the history
commit cbb807a
Author: Gerhard Theurich <[email protected]>
Date:   Fri Jan 29 14:48:25 2021 -0800

    Remove protos that are still experimental from develop.

commit 40af753
Author: Gerhard Theurich <[email protected]>
Date:   Fri Jan 29 14:30:35 2021 -0800

    Fix alphabetization of test order.

commit 012e0bd
Merge: c846754 49833d7
Author: Gerhard Theurich <[email protected]>
Date:   Thu Jan 28 12:47:33 2021 -0800

    Merge branch 'develop' of https://github.com/esmf-org/nuopc-app-prototypes into develop

commit c846754
Author: Gerhard Theurich <[email protected]>
Date:   Thu Jan 28 12:47:12 2021 -0800

    Cleanup around OpenMP section.

commit 1f85c6e
Author: Gerhard Theurich <[email protected]>
Date:   Thu Jan 28 12:35:59 2021 -0800

    Cleanup around OpenMP section.

commit 49833d7
Author: Gerhard Theurich <[email protected]>
Date:   Tue Jan 26 18:33:33 2021 -0800

    Update copyright date for 2021.

commit 38f15e9
Author: Gerhard Theurich <[email protected]>
Date:   Fri Jan 8 16:50:38 2021 -0800

    Add more logging to see more clearly various aspects of MeshTransfer.

commit 085f44d
Author: Gerhard Theurich <[email protected]>
Date:   Fri Jan 8 13:41:07 2021 -0800

    Additional output to help analyze and validate Grid Transfer.

commit 3af25e2
Author: Gerhard Theurich <[email protected]>
Date:   Mon Jan 4 15:02:38 2021 -0800

    Adjust to the further refined /NUOPC/Hint/PePerPet hint approach.

commit e78f10e
Author: Gerhard Theurich <[email protected]>
Date:   Wed Dec 23 15:49:49 2020 -0800

    Rely on ESMF internal OpenMP handling.

commit 3026bb4
Author: Gerhard Theurich <[email protected]>
Date:   Wed Dec 23 14:24:05 2020 -0800

    Switch over to the new /NUOPC/Hint/PePerPet for resource management.

commit e23290e
Author: Gerhard Theurich <[email protected]>
Date:   Wed Dec 23 09:41:54 2020 -0800

    Add new output files.

commit 36f16ae
Author: Gerhard Theurich <[email protected]>
Date:   Mon Dec 14 15:07:22 2020 -0800

    Demonstrate the use of ESMF_InitializePreMPI() in case of explicit call
    to MPI_Init*(), and ESMF-aware resource management for threading.

commit 7501c8b
Author: Gerhard Theurich <[email protected]>
Date:   Thu Dec 10 10:31:40 2020 -0800

    Add demonstration of time stepping on the external level.

commit a1aea7e
Author: Gerhard Theurich <[email protected]>
Date:   Wed Dec 9 16:36:28 2020 -0800

    Correct code and clarify comments with respect to import/exportStates.
    Add diagnostic dumping of fields in states. Test and demonstrate sharing
    of field.

commit ff64902
Author: Gerhard Theurich <[email protected]>
Date:   Tue Oct 6 14:44:07 2020 -0700

    Adjust to localPe -> currentSsiPe change.

commit 76270f8
Author: Gerhard Theurich <[email protected]>
Date:   Thu Oct 1 14:55:19 2020 -0700

    Correct outdated attribute. This was an oversight before and has now
    been flagged by more strict attribute checking.

commit ebb4336
Author: Gerhard Theurich <[email protected]>
Date:   Fri Sep 4 18:52:41 2020 -0700

    Fix typo in comment.

commit bba5a92
Author: bekozi <[email protected]>
Date:   Sun Aug 30 12:25:34 2020 -0600

    Add test start/stop echos

commit a7b71a8
Author: Gerhard Theurich <[email protected]>
Date:   Wed Aug 19 16:19:53 2020 -0700

    Use the new external interface label_'s.

commit 5332e27
Author: Gerhard Theurich <[email protected]>
Date:   Tue Aug 18 10:06:43 2020 -0700

    Remove outdated and unsupported prototype examples.

commit c765e6e
Author: Gerhard Theurich <[email protected]>
Date:   Tue Aug 18 10:05:42 2020 -0700

    Update list of files to be ignored.

commit f30fabc
Author: Gerhard Theurich <[email protected]>
Date:   Tue Aug 18 09:40:01 2020 -0700

    Completely rework all of the active NUOPC prototype examples to use
    IPDvX.

commit 01738ae
Merge: 2f0d86d c4ab2c6
Author: Gerhard Theurich <[email protected]>
Date:   Tue Aug 11 14:44:30 2020 -0700

    Merge remote-tracking branch 'origin/develop' into NUOPC_IPDvX

commit c4ab2c6
Author: Gerhard Theurich <[email protected]>
Date:   Tue Aug 11 13:54:10 2020 -0700

    Change 'maxPeCountPerPet' to '/NUOPC/Instance/maxPeCountPerPet' as a
    consequence of the Attribute -> Info work in ESMF.

commit 2f0d86d
Author: Gerhard Theurich <[email protected]>
Date:   Fri Aug 7 09:38:33 2020 -0700

    Set Verbosity to "high".

commit 51d67d5
Author: Gerhard Theurich <[email protected]>
Date:   Fri Aug 7 08:43:28 2020 -0700

    Remove the call to ESMF_MethodRemove() now that NUOPC_CompSpecialize()
    takes care of this.

commit ba51d8e
Author: Gerhard Theurich <[email protected]>
Date:   Fri Jul 10 14:35:36 2020 -0700

    Add .gitignore to filter generated artifacts.

commit eb5029e
Author: Gerhard Theurich <[email protected]>
Date:   Fri Jul 10 10:28:41 2020 -0700

    Remove white spaces at the end of line.

commit 927ec13
Merge: eddff06 0504f58
Author: Gerhard Theurich <[email protected]>
Date:   Fri Jun 26 15:37:26 2020 -0700

    Merge remote-tracking branch 'origin/info-json-dev'

commit eddff06
Author: Himanshu Pillai <[email protected]>
Date:   Thu Jun 11 08:34:13 2020 -0600

    Update README.md

commit 1af2cae
Author: Himanshu Pillai <[email protected]>
Date:   Thu Jun 11 08:33:53 2020 -0600

    Create README.md

commit 5857030
Author: Gerhard Theurich <[email protected]>
Date:   Mon Jun 1 20:57:31 2020 +0000

    Update copyright date to 2020.

commit aa38089
Author: Daniel Rosen <[email protected]>
Date:   Wed May 6 17:29:43 2020 +0000

    Add mask testing to AtmOcnConOptsProto.

commit d9767d1
Author: Daniel Rosen <[email protected]>
Date:   Wed May 6 15:40:22 2020 +0000

    Add runconfig (.cfg) files to AtmOcnConOptsProto.

commit 616eb41
Author: Daniel Rosen <[email protected]>
Date:   Fri May 1 23:43:57 2020 +0000

    Add AtmOcnConOptsProto to NUOPC prototypes.

commit 8bbc895
Author: Gerhard Theurich <[email protected]>
Date:   Thu Apr 30 16:59:00 2020 +0000

    Update copyright date.

commit 168bf93
Author: Gerhard Theurich <[email protected]>
Date:   Thu Apr 30 16:28:02 2020 +0000

    Testing optimized Mesh transfer in NUOPC. Need more fields with transferred Mesh for this test.

commit 1a5e93f
Author: Gerhard Theurich <[email protected]>
Date:   Thu Apr 30 16:25:18 2020 +0000

    Set Verbosity to "high".

commit 12db72c
Author: Gerhard Theurich <[email protected]>
Date:   Thu Apr 30 16:15:01 2020 +0000

    Build out this proto to test data-initialize with SetVM (i.e. with pthreads).
    Also show how to access localPe from under user OpenMP threads.

commit f0a6136
Author: Gerhard Theurich <[email protected]>
Date:   Mon Feb 10 20:22:44 2020 +0000

    Bring the code more in line with recent versions of ESMF/NUOPC. Also try to fix some of the obvious issue. However, it still does not run to completion, failing in the RegridStore(). There is a lot to be cleaned up before this will function correctly, and before this can be included as one of the officially released prototypes.

commit 0504f58
Author: Ben Koziol <[email protected]>
Date:   Fri Jan 17 15:51:23 2020 +0000

    Branch for Info-JSON development issues

commit d6ec6e8
Author: Gerhard Theurich <[email protected]>
Date:   Tue Dec 17 23:48:04 2019 +0000

    Adapt to the TransferOffer attribute change.

commit c681eaa
Author: Gerhard Theurich <[email protected]>
Date:   Tue Dec 3 23:52:16 2019 +0000

    Remove an outdated comment.
  • Loading branch information
theurich committed Mar 22, 2021
1 parent 4e9ea47 commit e1dc108
Show file tree
Hide file tree
Showing 208 changed files with 13,242 additions and 9,462 deletions.
815 changes: 815 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

32 changes: 13 additions & 19 deletions AsyncIOBlockingProto/asyncIOApp.F90
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
!==============================================================================
! Earth System Modeling Framework
! Copyright 2002-2019, University Corporation for Atmospheric Research,
! Massachusetts Institute of Technology, Geophysical Fluid Dynamics
! Laboratory, University of Michigan, National Centers for Environmental
! Prediction, Los Alamos National Laboratory, Argonne National Laboratory,
! Copyright 2002-2021, University Corporation for Atmospheric Research,
! Massachusetts Institute of Technology, Geophysical Fluid Dynamics
! Laboratory, University of Michigan, National Centers for Environmental
! Prediction, Los Alamos National Laboratory, Argonne National Laboratory,
! NASA Goddard Space Flight Center.
! Licensed under the University of Illinois-NCSA License.
!==============================================================================
Expand All @@ -22,14 +22,14 @@ program asyncIOApp

integer :: rc, urc
type(ESMF_GridComp) :: driver

! Initialize ESMF
call ESMF_Initialize(logkindflag=ESMF_LOGKIND_MULTI, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
call ESMF_Finalize(endflag=ESMF_END_ABORT)

call ESMF_LogWrite("asyncIOApp STARTING", ESMF_LOGMSG_INFO, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
Expand All @@ -53,7 +53,7 @@ program asyncIOApp
line=__LINE__, &
file=__FILE__)) &
call ESMF_Finalize(endflag=ESMF_END_ABORT)

! Call Initialize for the earth system Component
call ESMF_GridCompInitialize(driver, userRc=urc, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
Expand All @@ -64,13 +64,7 @@ program asyncIOApp
line=__LINE__, &
file=__FILE__)) &
call ESMF_Finalize(endflag=ESMF_END_ABORT)

call NUOPC_CompAttributeSet(driver, name="Verbosity", value="1", rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
call ESMF_Finalize(endflag=ESMF_END_ABORT)


! Call Run for earth the system Component
call ESMF_GridCompRun(driver, userRc=urc, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
Expand All @@ -81,7 +75,7 @@ program asyncIOApp
line=__LINE__, &
file=__FILE__)) &
call ESMF_Finalize(endflag=ESMF_END_ABORT)

! Call Finalize for the earth system Component
call ESMF_GridCompFinalize(driver, userRc=urc, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
Expand All @@ -92,14 +86,14 @@ program asyncIOApp
line=__LINE__, &
file=__FILE__)) &
call ESMF_Finalize(endflag=ESMF_END_ABORT)

! Destroy the earth system Component
call ESMF_GridCompDestroy(driver, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
call ESMF_Finalize(endflag=ESMF_END_ABORT)

call ESMF_LogWrite("asyncIOApp FINISHED", ESMF_LOGMSG_INFO, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
Expand All @@ -108,5 +102,5 @@ program asyncIOApp

! Finalize ESMF
call ESMF_Finalize()
end program

end program
90 changes: 48 additions & 42 deletions AsyncIOBlockingProto/asyncIODriver.F90
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
!==============================================================================
! Earth System Modeling Framework
! Copyright 2002-2019, University Corporation for Atmospheric Research,
! Massachusetts Institute of Technology, Geophysical Fluid Dynamics
! Laboratory, University of Michigan, National Centers for Environmental
! Prediction, Los Alamos National Laboratory, Argonne National Laboratory,
! Copyright 2002-2021, University Corporation for Atmospheric Research,
! Massachusetts Institute of Technology, Geophysical Fluid Dynamics
! Laboratory, University of Michigan, National Centers for Environmental
! Prediction, Los Alamos National Laboratory, Argonne National Laboratory,
! NASA Goddard Space Flight Center.
! Licensed under the University of Illinois-NCSA License.
!==============================================================================
Expand All @@ -17,60 +17,65 @@ module asyncIODriver
use ESMF
use NUOPC
use NUOPC_Driver, &
driver_routine_SS => SetServices, &
driver_label_SetModelServices => label_SetModelServices, &
driver_label_ModifyCplLists => label_ModifyCplLists
driverSS => SetServices

use ModelComp, only: modelSS => SetServices
use IOComp, only: ioSS => SetServices

use NUOPC_Connector, only: cplSS => SetServices

implicit none

private

public SetServices

!-----------------------------------------------------------------------------
contains
!-----------------------------------------------------------------------------

subroutine SetServices(driver, rc)
type(ESMF_GridComp) :: driver
integer, intent(out) :: rc

rc = ESMF_SUCCESS
! NUOPC_Driver registers the generic methods
call NUOPC_CompDerive(driver, driver_routine_SS, rc=rc)

! derive from NUOPC_Driver
call NUOPC_CompDerive(driver, driverSS, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

! attach specializing method(s)
call NUOPC_CompSpecialize(driver, specLabel=driver_label_SetModelServices, &
call NUOPC_CompSpecialize(driver, specLabel=label_SetModelServices, &
specRoutine=SetModelServices, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out
call NUOPC_CompSpecialize(driver, specLabel=driver_label_ModifyCplLists, &
call NUOPC_CompSpecialize(driver, specLabel=label_ModifyCplLists, &
specRoutine=ModifyCplLists, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out


! set driver verbosity
call NUOPC_CompAttributeSet(driver, name="Verbosity", value="high", rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

end subroutine

!-----------------------------------------------------------------------------

subroutine SetModelServices(driver, rc)
type(ESMF_GridComp) :: driver
integer, intent(out) :: rc

! local variables
character(len=80) :: name
type(ESMF_Grid) :: grid
Expand All @@ -87,14 +92,14 @@ subroutine SetModelServices(driver, rc)
type(ESMF_Config) :: config

rc = ESMF_SUCCESS

! get the petCount and name
call ESMF_GridCompGet(driver, petCount=petCount, name=name, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

! create and open the config
config = ESMF_ConfigCreate(rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
Expand All @@ -116,7 +121,7 @@ subroutine SetModelServices(driver, rc)
petListBounds(1) = 0
petListBounds(2) = petCount - 1
endif

! add the ModelComp
allocate(petList(petListBounds(2)-petListBounds(1)+1))
do i=petListBounds(1), petListBounds(2)
Expand All @@ -128,13 +133,13 @@ subroutine SetModelServices(driver, rc)
line=__LINE__, &
file=__FILE__)) &
return ! bail out
call NUOPC_CompAttributeSet(child, name="Verbosity", value="1", rc=rc)
call NUOPC_CompAttributeSet(child, name="Verbosity", value="high", rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out
deallocate(petList)

! determine the IOComp petList bounds
call ESMF_ConfigGetAttribute(config, petListBounds, &
label="io_petlist_bounds:", default=-1, rc=rc)
Expand All @@ -144,7 +149,7 @@ subroutine SetModelServices(driver, rc)
petListBounds(1) = 0
petListBounds(2) = petCount - 1
endif

! add the IOComp
allocate(petList(petListBounds(2)-petListBounds(1)+1))
do i=petListBounds(1), petListBounds(2)
Expand All @@ -156,26 +161,27 @@ subroutine SetModelServices(driver, rc)
line=__LINE__, &
file=__FILE__)) &
return ! bail out
call NUOPC_CompAttributeSet(child, name="Verbosity", value="1", rc=rc)
call NUOPC_CompAttributeSet(child, name="Verbosity", value="high", rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out
deallocate(petList)

! Add Connector for model2io
call NUOPC_DriverAddComp(driver, srcCompLabel="Model", dstCompLabel="IO", &
compSetServicesRoutine=cplSS, comp=connector, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out
call NUOPC_CompAttributeSet(connector, name="Verbosity", value="1", rc=rc)
call NUOPC_CompAttributeSet(connector, name="Verbosity", value="high", &
rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

! set the model clock
call ESMF_TimeIntervalSet(timeStep, m=15, rc=rc) ! 15 minute steps
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
Expand Down Expand Up @@ -203,51 +209,51 @@ subroutine SetModelServices(driver, rc)
line=__LINE__, &
file=__FILE__)) &
call ESMF_Finalize(endflag=ESMF_END_ABORT)

call ESMF_GridCompSet(driver, clock=internalClock, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

end subroutine

!-----------------------------------------------------------------------------

subroutine ModifyCplLists(driver, rc)
type(ESMF_GridComp) :: driver
integer, intent(out) :: rc

! local variables
character(len=160) :: msg
character(len=160) :: msg
type(ESMF_CplComp), pointer :: connectorList(:)
integer :: i, j, cplListSize
character(len=160), allocatable :: cplList(:)
character(len=160) :: tempString

rc = ESMF_SUCCESS

call ESMF_LogWrite("Driver is in ModifyCplLists()", ESMF_LOGMSG_INFO, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

nullify(connectorList)
call NUOPC_DriverGetComp(driver, compList=connectorList, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

write (msg,*) "Found ", size(connectorList), " Connectors."// &
" Modifying CplList Attribute...."
call ESMF_LogWrite(trim(msg), ESMF_LOGMSG_INFO, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

do i=1, size(connectorList)
! query the cplList for connector i
call NUOPC_CompAttributeGet(connectorList(i), name="CplList", &
Expand Down Expand Up @@ -279,9 +285,9 @@ subroutine ModifyCplLists(driver, rc)
deallocate(cplList)
endif
enddo

deallocate(connectorList)

end subroutine

!-----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit e1dc108

Please sign in to comment.