StubProfiler.F90 Source File


This file depends on

sourcefile~~stubprofiler.f90~~EfferentGraph sourcefile~stubprofiler.f90 StubProfiler.F90 sourcefile~abstractmeter.f90 AbstractMeter.F90 sourcefile~stubprofiler.f90->sourcefile~abstractmeter.f90 sourcefile~abstractmeternode.f90 AbstractMeterNode.F90 sourcefile~stubprofiler.f90->sourcefile~abstractmeternode.f90 sourcefile~advancedmeter.f90 AdvancedMeter.F90 sourcefile~stubprofiler.f90->sourcefile~advancedmeter.f90 sourcefile~baseprofiler.f90 BaseProfiler.F90 sourcefile~stubprofiler.f90->sourcefile~baseprofiler.f90 sourcefile~distributedprofiler.f90 DistributedProfiler.F90 sourcefile~stubprofiler.f90->sourcefile~distributedprofiler.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~stubprofiler.f90->sourcefile~errorhandling.f90 sourcefile~keywordenforcer.f90 KeywordEnforcer.F90 sourcefile~stubprofiler.f90->sourcefile~keywordenforcer.f90 sourcefile~meternode.f90 MeterNode.F90 sourcefile~stubprofiler.f90->sourcefile~meternode.f90 sourcefile~nullgauge.f90 NullGauge.F90 sourcefile~stubprofiler.f90->sourcefile~nullgauge.f90 sourcefile~abstractmeter.f90->sourcefile~errorhandling.f90 sourcefile~abstractmeternode.f90->sourcefile~abstractmeter.f90 sourcefile~advancedmeter.f90->sourcefile~abstractmeter.f90 sourcefile~abstractgauge.f90 AbstractGauge.F90 sourcefile~advancedmeter.f90->sourcefile~abstractgauge.f90 sourcefile~baseprofiler.f90->sourcefile~abstractmeter.f90 sourcefile~baseprofiler.f90->sourcefile~abstractmeternode.f90 sourcefile~baseprofiler.f90->sourcefile~advancedmeter.f90 sourcefile~baseprofiler.f90->sourcefile~errorhandling.f90 sourcefile~baseprofiler.f90->sourcefile~keywordenforcer.f90 sourcefile~baseprofiler.f90->sourcefile~meternode.f90 sourcefile~meternodeptr.f90 MeterNodePtr.F90 sourcefile~baseprofiler.f90->sourcefile~meternodeptr.f90 sourcefile~meternodestack.f90 MeterNodeStack.F90 sourcefile~baseprofiler.f90->sourcefile~meternodestack.f90 sourcefile~distributedprofiler.f90->sourcefile~abstractmeter.f90 sourcefile~distributedprofiler.f90->sourcefile~abstractmeternode.f90 sourcefile~distributedprofiler.f90->sourcefile~advancedmeter.f90 sourcefile~distributedprofiler.f90->sourcefile~baseprofiler.f90 sourcefile~distributedprofiler.f90->sourcefile~meternode.f90 sourcefile~distributedprofiler.f90->sourcefile~abstractgauge.f90 sourcefile~distributedmeter.f90 DistributedMeter.F90 sourcefile~distributedprofiler.f90->sourcefile~distributedmeter.f90 sourcefile~mpitimergauge.f90 MpiTimerGauge.F90 sourcefile~distributedprofiler.f90->sourcefile~mpitimergauge.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90 sourcefile~meternode.f90->sourcefile~abstractmeter.f90 sourcefile~meternode.f90->sourcefile~abstractmeternode.f90 sourcefile~meternodevector.f90 MeterNodeVector.F90 sourcefile~meternode.f90->sourcefile~meternodevector.f90 sourcefile~nullgauge.f90->sourcefile~abstractgauge.f90 sourcefile~abstractgauge.f90->sourcefile~abstractmeter.f90 sourcefile~distributedmeter.f90->sourcefile~abstractmeter.f90 sourcefile~distributedmeter.f90->sourcefile~advancedmeter.f90 sourcefile~distributedmeter.f90->sourcefile~errorhandling.f90 sourcefile~distributedmeter.f90->sourcefile~abstractgauge.f90 sourcefile~meternodeptr.f90->sourcefile~abstractmeternode.f90 sourcefile~meternodestack.f90->sourcefile~meternodeptr.f90 sourcefile~meternodevector.f90->sourcefile~abstractmeternode.f90 sourcefile~mpitimergauge.f90->sourcefile~abstractgauge.f90

Files dependent on this one

sourcefile~~stubprofiler.f90~~AfferentGraph sourcefile~stubprofiler.f90 StubProfiler.F90 sourcefile~globalprofilers.f90 GlobalProfilers.F90 sourcefile~globalprofilers.f90->sourcefile~stubprofiler.f90 sourcefile~mapl_profiler.f90 MAPL_Profiler.F90 sourcefile~mapl_profiler.f90->sourcefile~globalprofilers.f90 sourcefile~abstractserver.f90 AbstractServer.F90 sourcefile~abstractserver.f90->sourcefile~mapl_profiler.f90 sourcefile~applicationsupport.f90 ApplicationSupport.F90 sourcefile~applicationsupport.f90->sourcefile~mapl_profiler.f90 sourcefile~base_base_implementation.f90 Base_Base_implementation.F90 sourcefile~base_base_implementation.f90->sourcefile~mapl_profiler.f90 sourcefile~demo.f90 demo.F90 sourcefile~demo.f90->sourcefile~mapl_profiler.f90 sourcefile~extdatadrivergridcomp.f90 ExtDataDriverGridComp.F90 sourcefile~extdatadrivergridcomp.f90->sourcefile~mapl_profiler.f90 sourcefile~mapl.f90 MAPL.F90 sourcefile~mapl.f90->sourcefile~mapl_profiler.f90 sourcefile~mapl_bundleio_test.f90 mapl_bundleio_test.F90 sourcefile~mapl_bundleio_test.f90->sourcefile~mapl_profiler.f90 sourcefile~mapl_capgridcomp.f90 MAPL_CapGridComp.F90 sourcefile~mapl_capgridcomp.f90->sourcefile~mapl_profiler.f90 sourcefile~mapl_generic.f90 MAPL_Generic.F90 sourcefile~mapl_generic.f90->sourcefile~mapl_profiler.f90 sourcefile~mapl_nuopcwrappermod.f90 MAPL_NUOPCWrapperMod.F90 sourcefile~mapl_nuopcwrappermod.f90->sourcefile~mapl_profiler.f90 sourcefile~mapl_verticalmethods.f90 MAPL_VerticalMethods.F90 sourcefile~mapl_verticalmethods.f90->sourcefile~mapl_profiler.f90 sourcefile~maplframework.f90 MaplFramework.F90 sourcefile~maplframework.f90->sourcefile~mapl_profiler.f90 sourcefile~mpi_demo.f90 mpi_demo.F90 sourcefile~mpi_demo.f90->sourcefile~mapl_profiler.f90 sourcefile~mpiserver.f90 MpiServer.F90 sourcefile~mpiserver.f90->sourcefile~mapl_profiler.f90 sourcefile~multigroupserver.f90 MultiGroupServer.F90 sourcefile~multigroupserver.f90->sourcefile~mapl_profiler.f90 sourcefile~regrid_util.f90 Regrid_Util.F90 sourcefile~regrid_util.f90->sourcefile~mapl_profiler.f90 sourcefile~serverthread.f90 ServerThread.F90 sourcefile~serverthread.f90->sourcefile~mapl_profiler.f90 sourcefile~test_advancedmeter.pf test_AdvancedMeter.pf sourcefile~test_advancedmeter.pf->sourcefile~mapl_profiler.f90 sourcefile~test_column.pf test_Column.pf sourcefile~test_column.pf->sourcefile~mapl_profiler.f90 sourcefile~test_distributedmeter.pf test_DistributedMeter.pf sourcefile~test_distributedmeter.pf->sourcefile~mapl_profiler.f90 sourcefile~test_exclusivecolumn.pf test_ExclusiveColumn.pf sourcefile~test_exclusivecolumn.pf->sourcefile~mapl_profiler.f90 sourcefile~test_meternode.pf test_MeterNode.pf sourcefile~test_meternode.pf->sourcefile~mapl_profiler.f90 sourcefile~test_meternodeiterator.pf test_MeterNodeIterator.pf sourcefile~test_meternodeiterator.pf->sourcefile~mapl_profiler.f90 sourcefile~test_namecolumn.pf test_NameColumn.pf sourcefile~test_namecolumn.pf->sourcefile~mapl_profiler.f90 sourcefile~test_percentagecolumn.pf test_PercentageColumn.pf sourcefile~test_percentagecolumn.pf->sourcefile~mapl_profiler.f90 sourcefile~test_profilereporter.pf test_ProfileReporter.pf sourcefile~test_profilereporter.pf->sourcefile~mapl_profiler.f90 sourcefile~test_timeprofiler.pf test_TimeProfiler.pf sourcefile~test_timeprofiler.pf->sourcefile~mapl_profiler.f90

Source Code

#include "MAPL_ErrLog.h"
module MAPL_StubProfiler
   use MAPL_BaseProfiler, only: BaseProfiler
   use MAPL_DistributedProfiler
   use mapl_KeywordEnforcerMod
   use mapl_NullGauge
   use MAPL_AbstractMeter
   use MAPL_AdvancedMeter
   use MAPL_AbstractMeterNode
   use MAPL_MeterNode
   use mapl_ErrorHandlingMod
   implicit none
   private

   public :: StubProfiler
   
   type, extends(DistributedProfiler) :: StubProfiler
      private
   contains
      procedure :: make_meter
      procedure :: copy
      procedure :: start_name, start_self
      procedure :: stop_name, stop_self
      procedure :: reduce
      procedure :: get_root_node
      procedure :: get_num_meters
   end type StubProfiler

   type, extends(MeterNode) :: StubNode
   contains
      procedure :: get_num_nodes
   end type StubNode

   interface StubProfiler
      module procedure new_StubProfiler
   end interface StubProfiler

   type(StubNode), target, save :: STUB_NODE
contains


   function new_StubProfiler(name) result(prof)
      type(StubProfiler), target :: prof
      character(*), intent(in) :: name

      call prof%set_node(MeterNode(name, AdvancedMeter(NullGauge())))

   end function new_StubProfiler


   function make_meter(this) result(meter)
      class(AbstractMeter), allocatable :: meter
      class(StubProfiler), intent(in) :: this

      meter = AdvancedMeter(NullGauge())

      _UNUSED_DUMMY(this)
   end function make_meter


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

      call new%copy_profiler(old)

   end subroutine copy

   subroutine start_self(this, unusable, rc)
      class(StubProfiler), target, intent(inout) :: this
      class(KeywordEnforcer), optional, intent(in) :: unusable
      integer, optional, intent(out) :: rc

      _RETURN(_SUCCESS)
      _UNUSED_DUMMY(this)
      _UNUSED_DUMMY(unusable)
   end subroutine start_self


   subroutine start_name(this, name, rc)
      class(StubProfiler), target, intent(inout) :: this
      character(*), intent(in) :: name
      integer, optional, intent(out) :: rc


      _RETURN(_SUCCESS)
      _UNUSED_DUMMY(this)
      _UNUSED_DUMMY(name)
   end subroutine start_name


   subroutine stop_self(this, rc)
      class(StubProfiler), intent(inout) :: this
      integer, optional, intent(out) :: rc

      _RETURN(_SUCCESS)
      _UNUSED_DUMMY(this)
   end subroutine stop_self


   subroutine stop_name(this, name, rc)
      class(StubProfiler), intent(inout) :: this
      character(*), intent(in) :: name
      integer, optional, intent(out) :: rc


      _RETURN(_SUCCESS)
      _UNUSED_DUMMY(this)
      _UNUSED_DUMMY(name)
   end subroutine stop_name
   
   subroutine reduce(this)
      class(StubProfiler), target, intent(inout) :: this

      _UNUSED_DUMMY(this)
   end subroutine reduce

   function get_root_node(this) result(root_node)
      class(AbstractMeterNode), pointer :: root_node
      class(StubProfiler), target, intent(in) :: this
      
      root_node => STUB_NODE
   end function get_root_node

   integer function get_num_meters(this) result(num_meters)
      class(StubProfiler), intent(in) :: this
      num_meters = 0
   end function get_num_meters

   integer function get_num_nodes(this) result(num_nodes)
      class(StubNode), target, intent(in) :: this
      num_nodes = 0
      _UNUSED_DUMMY(this)
   end function get_num_nodes
   
end module MAPL_StubProfiler