check_resources Subroutine

subroutine check_resources(rc)

Uses

  • proc~~check_resources~~UsesGraph proc~check_resources check_resources module~supportmod SupportMod proc~check_resources->module~supportmod ESMF ESMF module~supportmod->ESMF gFTL_StringIntegerMap gFTL_StringIntegerMap module~supportmod->gFTL_StringIntegerMap gFTL_StringVector gFTL_StringVector module~supportmod->gFTL_StringVector iso_fortran_env iso_fortran_env module~supportmod->iso_fortran_env module~mapl_basemod MAPL_BaseMod module~supportmod->module~mapl_basemod module~mapl_constants MAPL_Constants module~supportmod->module~mapl_constants module~mapl_exceptionhandling MAPL_ExceptionHandling module~supportmod->module~mapl_exceptionhandling module~mapl_rangemod MAPL_RangeMod module~supportmod->module~mapl_rangemod module~mapl_stringroutehandlemapmod MAPL_StringRouteHandleMapMod module~supportmod->module~mapl_stringroutehandlemapmod module~pfio pFIO module~supportmod->module~pfio mpi mpi module~supportmod->mpi

Arguments

Type IntentOptional Attributes Name
integer, intent(out), optional :: rc

Calls

proc~~check_resources~~CallsGraph proc~check_resources check_resources ESMF_VMGet ESMF_VMGet proc~check_resources->ESMF_VMGet ESMF_VMGetGlobal ESMF_VMGetGlobal proc~check_resources->ESMF_VMGetGlobal proc~mapl_return MAPL_Return proc~check_resources->proc~mapl_return at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception

Called by

proc~~check_resources~~CalledByGraph proc~check_resources check_resources program~main~9 main program~main~9->proc~check_resources

Source Code

   subroutine check_resources(rc)
      use SupportMod
      integer, optional, intent(out) :: rc
      integer:: status

      type (ESMF_VM) :: vm_global

      call ESMF_VMGetGlobal(vm_global, rc=status)
      call ESMF_VMGet(vm_global, petcount=pet_count, localpet=local_pet, rc=status)

      if (mod(pet_count,N_TILES) /= 0) then ! should just require a multiple, but ...
         rc = -1
         if (local_pet == 0) then
            write(*,*)'The number of mpi processes must be a multile of 6.'
         end if
         _RETURN(_FAILURE)
      end if

      _RETURN(_SUCCESS)

   end subroutine check_resources