Skip to content
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 component/ComponentDriver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module mapl3g_ComponentDriver
recursive subroutine I_run(this, unusable, phase_idx, rc)
use :: MaplShared, only: KeywordEnforcer
import ComponentDriver
class(ComponentDriver), intent(inout) :: this
class(ComponentDriver), target, intent(inout) :: this
class(KeywordEnforcer), optional, intent(in) :: unusable
integer, optional, intent(in) :: phase_idx
integer, optional, intent(out) :: rc
Expand Down
8 changes: 4 additions & 4 deletions component/GriddedComponentDriver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module mapl3g_GriddedComponentDriver
interface

module recursive subroutine initialize(this, unusable, phase_idx, rc)
class(GriddedComponentDriver), intent(inout) :: this
class(GriddedComponentDriver), target, intent(inout) :: this
class(KE), optional, intent(in) :: unusable
integer, optional, intent(in) :: phase_idx
integer, optional, intent(out) :: rc
Expand All @@ -56,21 +56,21 @@ end subroutine initialize
! run_self() is implemented in submodule to avoid circular dependency
! on OuterMetaComponent.
module recursive subroutine run(this, unusable, phase_idx, rc)
class(GriddedComponentDriver), intent(inout) :: this
class(GriddedComponentDriver), target, intent(inout) :: this
class(KE), optional, intent(in) :: unusable
integer, optional, intent(in) :: phase_idx
integer, optional, intent(out) :: rc
end subroutine

module recursive subroutine finalize(this, unusable, phase_idx, rc)
class(GriddedComponentDriver), intent(inout) :: this
class(GriddedComponentDriver), target, intent(inout) :: this
class(KE), optional, intent(in) :: unusable
integer, optional, intent(in) :: phase_idx
integer, optional, intent(out) :: rc
end subroutine finalize

module recursive subroutine write_restart(this, unusable, phase_idx, rc)
class(GriddedComponentDriver), intent(inout) :: this
class(GriddedComponentDriver), target, intent(inout) :: this
class(KE), optional, intent(in) :: unusable
integer, optional, intent(in) :: phase_idx
integer, optional, intent(out) :: rc
Expand Down
2 changes: 1 addition & 1 deletion component/GriddedComponentDriver/finalize.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
contains

module recursive subroutine finalize(this, unusable, phase_idx, rc)
class(GriddedComponentDriver), intent(inout) :: this
class(GriddedComponentDriver), target, intent(inout) :: this
class(KE), optional, intent(in) :: unusable
integer, optional, intent(in) :: phase_idx
integer, optional, intent(out) :: rc
Expand Down
2 changes: 1 addition & 1 deletion component/GriddedComponentDriver/initialize.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


recursive module subroutine initialize(this, unusable, phase_idx, rc)
class(GriddedComponentDriver), intent(inout) :: this
class(GriddedComponentDriver), target, intent(inout) :: this
class(KE), optional, intent(in) :: unusable
integer, optional, intent(in) :: phase_idx
integer, optional, intent(out) :: rc
Expand Down
2 changes: 1 addition & 1 deletion component/GriddedComponentDriver/run.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
contains

module recursive subroutine run(this, unusable, phase_idx, rc)
class(GriddedComponentDriver), intent(inout) :: this
class(GriddedComponentDriver), target, intent(inout) :: this
class(KE), optional, intent(in) :: unusable
integer, optional, intent(in) :: phase_idx
integer, optional, intent(out) :: rc
Expand Down
2 changes: 1 addition & 1 deletion component/GriddedComponentDriver/write_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
contains

module recursive subroutine write_restart(this, unusable, phase_idx, rc)
class(GriddedComponentDriver), intent(inout) :: this
class(GriddedComponentDriver), target, intent(inout) :: this
class(KE), optional, intent(in) :: unusable
integer, optional, intent(in) :: phase_idx
integer, optional, intent(out) :: rc
Expand Down
6 changes: 6 additions & 0 deletions docs/user_guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ It:

### 3.3 [Building complex applications: MAPL_Connect](docs/mapl_connect.md)

<!--
### 3.4 [Doing Diagnostics: History](../../gridcomps/History/HistoryGridComp.md)

### 3.5 [Connecting Import Fields to Data on File: ExtData](../../gridcomps/ExtData2G/ExtDataGridComp.md)
-->

### 3.4 Doing Diagnostics: History (needs updating for MAPL3)

### 3.5 Connecting Import Fields to Data on File: ExtData (needs updating for MAPL3)

### 3.6 [Performing Arithmetic Operations on Fields](../../base/ArthParser.md)

Expand Down
2 changes: 1 addition & 1 deletion generic3g/ComponentSpecParser/parse_connections.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module function parse_connections(hconfig, rc) result(connections)
num_specs = ESMF_HConfigGetSize(conn_specs, _RC)
do i = 1, num_specs
conn_spec = ESMF_HConfigCreateAt(conn_specs, index=i, _RC)
allocate(conn, source=parse_connection(conn_spec, rc=status)); _VERIFY(status)
conn = parse_connection(conn_spec, _RC)
call connections%push_back(conn)
deallocate(conn)
enddo
Expand Down
6 changes: 3 additions & 3 deletions generic3g/OuterMetaComponent.F90
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,16 @@ end subroutine initialize_advertise

module recursive subroutine initialize_modify_advertised(this, importState, exportState, clock, unusable, rc)
class(OuterMetaComponent), target, intent(inout) :: this
! optional arguments
type(ESMF_State) :: importState
type(ESMF_State) :: exportState
type(ESMF_Clock) :: clock
! optional arguments
class(KE), optional, intent(in) :: unusable
integer, optional, intent(out) :: rc
end subroutine initialize_modify_advertised

module recursive subroutine initialize_realize(this, importState, exportState, clock, unusable, rc)
class(OuterMetaComponent), intent(inout) :: this
class(OuterMetaComponent), target, intent(inout) :: this
type(ESMF_State) :: importState
type(ESMF_State) :: exportState
type(ESMF_Clock) :: clock
Expand Down Expand Up @@ -340,7 +340,7 @@ module recursive subroutine initialize_user(this, unusable, rc)
end subroutine initialize_user

module subroutine run_custom(this, method_flag, phase_name, rc)
class(OuterMetaComponent), intent(inout) :: this
class(OuterMetaComponent), target, intent(inout) :: this
type(ESMF_METHOD_FLAG), intent(in) :: method_flag
character(*), intent(in) :: phase_name
integer, optional, intent(out) :: rc
Expand Down
4 changes: 2 additions & 2 deletions generic3g/OuterMetaComponent/SetServices.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ recursive module subroutine SetServices_(this, rc)
user_gridcomp = this%user_gc_driver%get_gridcomp()
call attach_inner_meta(user_gridcomp, this%self_gridcomp, _RC)
logger => this%get_logger()
call logger%info("SetServices:: starting...")
call logger%info("SetServices:: starting...", _RC)
call this%user_setservices%run(user_gridcomp, _RC)
call logger%info("SetServices:: ...completed")
call logger%info("SetServices:: ...completed", _RC)
call add_children(this, _RC)
call run_children_setservices(this, _RC)

Expand Down
4 changes: 2 additions & 2 deletions generic3g/OuterMetaComponent/has_geom.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module function has_geom(this)
logical :: has_geom
class(OuterMetaComponent), intent(in) :: this

has_geom = .false.
if (allocated(this%geom)) has_geom = .true.
has_geom = allocated(this%geom)

end function has_geom

end submodule has_geom_smod
2 changes: 1 addition & 1 deletion generic3g/OuterMetaComponent/initialize_read_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ module recursive subroutine initialize_read_restart(this, unusable, rc)
_RETURN_UNLESS(this%has_geom())

driver => this%get_user_gc_driver()
states = driver%get_states()
call esmf_ClockGet(driver%get_clock(), currTime=currTime, _RC)

user_logger => this%get_logger()
restart_handler = RestartHandler(this%get_geom(), currTime, user_logger)

states = driver%get_states()
subdir = get_checkpoint_subdir(this%hconfig, currTime, _RC)

if (this%component_spec%misc%restart_controls%import) then
Expand Down
2 changes: 1 addition & 1 deletion generic3g/OuterMetaComponent/initialize_realize.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
contains

module recursive subroutine initialize_realize(this, importState, exportState, clock, unusable, rc)
class(OuterMetaComponent), intent(inout) :: this
class(OuterMetaComponent), target, intent(inout) :: this
type(esmf_State) :: importState
type(esmf_State) :: exportState
type(esmf_Clock) :: clock
Expand Down
2 changes: 1 addition & 1 deletion generic3g/OuterMetaComponent/run_custom.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
contains

module subroutine run_custom(this, method_flag, phase_name, rc)
class(OuterMetaComponent), intent(inout) :: this
class(OuterMetaComponent), target, intent(inout) :: this
type(ESMF_METHOD_FLAG), intent(in) :: method_flag
character(*), intent(in) :: phase_name
integer, optional, intent(out) :: rc
Expand Down
4 changes: 2 additions & 2 deletions generic3g/connection/Connection.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ end function I_get
subroutine I_activate(this, registry, rc)
use mapl3g_StateRegistry
import Connection
class(Connection), intent(in) :: this
class(Connection), target, intent(in) :: this
type(StateRegistry), target, intent(inout) :: registry
integer, optional, intent(out) :: rc
end subroutine I_activate

subroutine I_connect(this, registry, rc)
use mapl3g_StateRegistry
import Connection
class(Connection), intent(inout) :: this
class(Connection), target, intent(inout) :: this
type(StateRegistry), target, intent(inout) :: registry
integer, optional, intent(out) :: rc
end subroutine I_connect
Expand Down
13 changes: 7 additions & 6 deletions generic3g/connection/MatchConnection.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module mapl3g_MatchConnection
private
type(ConnectionPt) :: source
type(ConnectionPt) :: destination
logical :: consumed = .false.
logical :: consumed
contains
procedure :: get_source
procedure :: get_destination
Expand All @@ -47,6 +47,7 @@ function new_MatchConnection(source, destination) result(this)

this%source = source
this%destination = destination
this%consumed = .false.

end function new_MatchConnection

Expand All @@ -63,14 +64,14 @@ function get_destination(this) result(destination)
end function get_destination

recursive subroutine activate(this, registry, rc)
class(MatchConnection), intent(in) :: this
class(MatchConnection), target, intent(in) :: this
type(StateRegistry), target, intent(inout) :: registry
integer, optional, intent(out) :: rc

integer :: status
type(ConnectionPt) :: src_pt, dst_pt
type(ConnectionPt) :: src_pt, dst_pt
type(StateRegistry), pointer :: src_registry, dst_registry
type(VirtualConnectionPtVector) :: src_v_pts, dst_v_pts
type(VirtualConnectionPtVector), target :: src_v_pts, dst_v_pts
type(VirtualConnectionPt), pointer :: dst_pattern, src_v_pt
type(VirtualConnectionPt) :: src_pattern, dst_v_pt
integer :: i, j
Expand Down Expand Up @@ -117,15 +118,15 @@ recursive subroutine activate(this, registry, rc)
end subroutine activate

recursive subroutine connect(this, registry, rc)
class(MatchConnection), intent(inout) :: this
class(MatchConnection), target, intent(inout) :: this
type(StateRegistry), target, intent(inout) :: registry
integer, optional, intent(out) :: rc

integer :: status

type(ConnectionPt) :: src_pt, dst_pt
type(StateRegistry), pointer :: src_registry, dst_registry
type(VirtualConnectionPtVector) :: src_v_pts, dst_v_pts
type(VirtualConnectionPtVector), target :: src_v_pts, dst_v_pts
type(VirtualConnectionPt), pointer :: dst_pattern, src_v_pt
type(VirtualConnectionPt) :: src_pattern, dst_v_pt
integer :: i, j
Expand Down
4 changes: 2 additions & 2 deletions generic3g/connection/ReexportConnection.F90
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ end function get_destination

! No-op: reexports are always active
recursive subroutine activate(this, registry, rc)
class(ReexportConnection), intent(in) :: this
class(ReexportConnection), target, intent(in) :: this
type(StateRegistry), target, intent(inout) :: registry
integer, optional, intent(out) :: rc

Expand All @@ -80,7 +80,7 @@ recursive subroutine activate(this, registry, rc)
end subroutine activate

recursive subroutine connect(this, registry, rc)
class(ReexportConnection), intent(inout) :: this
class(ReexportConnection), target, intent(inout) :: this
type(StateRegistry), target, intent(inout) :: registry
integer, optional, intent(out) :: rc

Expand Down
9 changes: 5 additions & 4 deletions generic3g/connection/SimpleConnection.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module mapl3g_SimpleConnection
private
type(ConnectionPt) :: source
type(ConnectionPt) :: destination
logical :: consumed=.false.
logical :: consumed
contains
procedure :: get_source
procedure :: get_destination
Expand All @@ -50,6 +50,7 @@ function new_SimpleConnection(source, destination) result(this)

this%source = source
this%destination = destination
this%consumed = .false.

end function new_SimpleConnection

Expand All @@ -66,7 +67,7 @@ function get_destination(this) result(destination)
end function get_destination

recursive subroutine activate(this, registry, rc)
class(SimpleConnection), intent(in) :: this
class(SimpleConnection), target, intent(in) :: this
type(StateRegistry), target, intent(inout) :: registry
integer, optional, intent(out) :: rc

Expand Down Expand Up @@ -111,7 +112,7 @@ end subroutine activate


recursive subroutine connect(this, registry, rc)
class(SimpleConnection), intent(inout) :: this
class(SimpleConnection), target, intent(inout) :: this
type(StateRegistry), target, intent(inout) :: registry
integer, optional, intent(out) :: rc

Expand Down Expand Up @@ -142,7 +143,7 @@ end subroutine connect


recursive subroutine connect_sibling(this, dst_registry, src_registry, unusable, rc)
class(SimpleConnection), intent(in) :: this
class(SimpleConnection), target, intent(in) :: this
type(StateRegistry), target, intent(inout) :: dst_registry
type(StateRegistry), target, intent(inout) :: src_registry
class(KeywordEnforcer), optional, intent(in) :: unusable
Expand Down
1 change: 1 addition & 0 deletions generic3g/registry/StateRegistry.F90
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ function get_subregistry_by_name(this, name, rc) result(subregistry)
_FAIL('Illegal subtype of AbstractRegistry encountered.')
end select

_RETURN(_SUCCESS)
end function get_subregistry_by_name

function get_subregistry_by_conn_pt(this, conn_pt, rc) result(subregistry)
Expand Down
3 changes: 1 addition & 2 deletions generic3g/tests/Test_Scenarios.pf
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,9 @@ contains
logical :: has_numsteps

file_name = './scenarios/' // this%scenario_name // '/' // this%scenario_root
config = ESMF_HConfigCreate(filename=file_name)
config = ESMF_HConfigCreate(filename=file_name, _RC)

call NUOPC_FieldDictionarySetup(filename='./scenarios/FieldDictionary.yml', _RC)
@assert_that(status, is(0))

associate (outer_gc => this%outer_gc, outer_states => this%outer_states, grid => this%grid)

Expand Down
2 changes: 0 additions & 2 deletions profiler/BaseProfiler.F90
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ module mapl_BaseProfiler
procedure :: get_root_node
procedure :: get_status
procedure :: copy_profiler
!# procedure(copy_profiler), deferred :: copy
!# generic :: assignment(=) => copy

procedure :: reset
procedure :: accumulate
Expand Down
14 changes: 0 additions & 14 deletions profiler/DistributedProfiler.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module MAPL_DistributedProfiler
contains
procedure :: make_meter
procedure :: reduce
!# procedure :: copy
end type DistributedProfiler

interface DistributedProfiler
Expand Down Expand Up @@ -83,17 +82,4 @@ subroutine reduce(this)

end subroutine reduce

subroutine copy(new, old)
class(DistributedProfiler), target, intent(inout) :: new
class(BaseProfiler), target, intent(in) :: old

call new%copy_profiler(old)
select type (old)
class is (DistributedProfiler)
new%gauge = old%gauge
new%comm = old%comm
end select

end subroutine copy

end module MAPL_DistributedProfiler
11 changes: 0 additions & 11 deletions profiler/MemoryProfiler.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module MAPL_MemoryProfiler_private
private
contains
procedure :: make_meter
procedure :: copy
end type MemoryProfiler

interface MemoryProfiler
Expand Down Expand Up @@ -49,16 +48,6 @@ function make_meter(this) result(meter)
end function make_meter


subroutine copy(new, old)
class(MemoryProfiler), target, intent(inout) :: new
class(BaseProfiler), target, intent(in) :: old

_HERE
!# call new%copy_profiler(old)

end subroutine copy


end module MAPL_MemoryProfiler_private


Expand Down
Loading
Loading