main Program

Uses

  • program~~main~5~~UsesGraph program~main~5 main ESMF ESMF program~main~5->ESMF iso_fortran_env iso_fortran_env program~main~5->iso_fortran_env module~mapl_errorhandlingmod mapl_ErrorHandlingMod program~main~5->module~mapl_errorhandlingmod module~my_gc my_gc program~main~5->module~my_gc module~mapl_errorhandling mapl_ErrorHandling module~mapl_errorhandlingmod->module~mapl_errorhandling module~my_gc->ESMF module~my_gc->module~mapl_errorhandlingmod module~mapl_throwmod MAPL_ThrowMod module~mapl_errorhandling->module~mapl_throwmod mpi mpi module~mapl_errorhandling->mpi

Calls

program~~main~5~~CallsGraph program~main~5 main ESMF_Finalize ESMF_Finalize program~main~5->ESMF_Finalize ESMF_GridCompRun ESMF_GridCompRun program~main~5->ESMF_GridCompRun ESMF_Initialize ESMF_Initialize program~main~5->ESMF_Initialize proc~make_gc_t make_gc_t program~main~5->proc~make_gc_t proc~mapl_abort MAPL_abort program~main~5->proc~mapl_abort proc~mapl_verify MAPL_Verify program~main~5->proc~mapl_verify proc~make_gc_t->proc~mapl_verify ESMF_CalendarSetDefault ESMF_CalendarSetDefault proc~make_gc_t->ESMF_CalendarSetDefault ESMF_ClockCreate ESMF_ClockCreate proc~make_gc_t->ESMF_ClockCreate ESMF_GridCompCreate ESMF_GridCompCreate proc~make_gc_t->ESMF_GridCompCreate ESMF_TimeIntervalSet ESMF_TimeIntervalSet proc~make_gc_t->ESMF_TimeIntervalSet ESMF_TimeSet ESMF_TimeSet proc~make_gc_t->ESMF_TimeSet esmf_gridcompsetservices esmf_gridcompsetservices proc~make_gc_t->esmf_gridcompsetservices esmf_statecreate esmf_statecreate proc~make_gc_t->esmf_statecreate proc~mapl_return MAPL_Return proc~make_gc_t->proc~mapl_return mpi_abort mpi_abort proc~mapl_abort->mpi_abort proc~mapl_throw_exception MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception proc~mapl_return->proc~mapl_throw_exception at at proc~mapl_return->at insert insert proc~mapl_return->insert

Variables

Type Attributes Name Initial
integer(kind=INT64) :: c0
integer(kind=INT64) :: c1
integer(kind=INT64) :: cr
integer, parameter :: N_GCS = 100
integer, parameter :: N_STEPS = 10
integer :: i
integer :: j
integer :: rc
integer :: status
integer :: userStatus
real :: t_all
real :: t_one
type(GC_T), allocatable :: gcs(:)

Source Code

program main
   use my_gc
   use esmf
   use mapl_ErrorHandlingMod
   use iso_fortran_env, only: INT64
   implicit none

   integer :: status

   type(GC_T), allocatable :: gcs(:)

   integer, parameter :: N_GCS = 100
   integer, parameter :: N_STEPS = 10
   integer :: i, j
   real :: t_all, t_one
   integer(kind=INT64) :: c0, c1, cr
   integer :: rc, userStatus

   call ESMF_Initialize(_RC)
   allocate(gcs(N_GCS))
   do i= 1, N_GCS
      gcs(i) = make_gc_t(_RC)
   end do

   call system_clock(c0, cr)
   do j = 1, N_STEPS
      do i = 1, N_GCS
         call ESMF_GridCompRun(gcs(i)%gridcomp, importState=gcs(i)%importState, exportState=gcs(i)%exportState, clock=gcs(i)%clock, userrc=userStatus, _RC)
         _VERIFY(userStatus)
      end do
   end do
   call system_clock(c1)

   t_all = real(c1-c0)/real(cr)
   t_one = t_all/real(N_GCS*N_STEPS)

   print*,'Time: ', t_one, t_all
   call ESMF_Finalize(_RC)


end program main