ESMF_Test Subroutine

public subroutine ESMF_Test(condition, name, failMsg, result, file, line, unit)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: condition
character(len=*), intent(in) :: name
character(len=*), intent(in) :: failMsg
integer, intent(inout) :: result
character(len=*), intent(in) :: file
integer, intent(in) :: line
integer, intent(in), optional :: unit

Calls

proc~~esmf_test~~CallsGraph proc~esmf_test ESMF_Test proc~esmf_logwrite ESMF_LogWrite proc~esmf_test->proc~esmf_logwrite c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Called by

AttributeUpdateReconcilewESMF_Test
w
driverSetServicesw
w
ESMF_AlarmTestw
w
ESMF_ArrayArbIdxSMMUTestw
w
ESMF_ArrayBundleCreateUTestw
w
ESMF_ArrayBundleIOUTestw
w
ESMF_ArrayBundleRedistUTestw
w
ESMF_ArrayCreateGetUTestw
w
ESMF_ArrayDataUTestw
w
ESMF_ArrayGatherUTestw
w
ESMF_ArrayHaloUTestw
w
ESMF_ArrayInfoUTestw
w
ESMF_ArrayIOTypesUTestw
w
ESMF_ArrayIOUTestw
w
ESMF_ArrayRedistUTestw
w
ESMF_ArrayScatterUTestw
w
ESMF_ArraySMMFromFileUTestw
w
ESMF_ArraySMMUTestw
w
ESMF_ArraySpecUTestw
w
ESMF_AttributeProfileUTestw
w
ESMF_AttributeUtilUTestw
w
ESMF_BaseUTestw
w
ESMF_CalendarUTestw
w
ESMF_ClockTestw
w
ESMF_ComponentUTestw
w
ESMF_CompSetServUTestw
w
ESMF_CompTunnelUTestw
w
ESMF_Config_Testw
w
ESMF_ContainerUTestw
w
ESMF_CplCompCreateUTestw
w
ESMF_DELayoutUTestw
w
ESMF_DELayoutWQUTestw
w
ESMF_DistGridCreateGetUTestw
w
ESMF_FieldArbGridUTestw
w
ESMF_FieldBundleIOUTestw
w
ESMF_FieldBundleUTestw
w
ESMF_FieldCreateGetUTestw
w
ESMF_FieldHaloUTestw
w
ESMF_FieldIOUTestw
w
ESMF_FieldRedistArbUTestw
w
ESMF_FieldSMMFromFileUTestw
w
ESMF_FieldUTestw
w
ESMF_FileRegridUTestw
w
ESMF_FortranWordsizeUTestw
w
ESMF_FrameworkUTestw
w
ESMF_GeomUTestw
w
ESMF_GridArbitraryUTestw
w
ESMF_GridCompCreateUTestw
w
ESMF_GridCoordUTestw
w
ESMF_GridCreateUTestw
w
ESMF_GridItemUTestw
w
ESMF_GridToMeshUTestw
w
ESMF_HConfigUTestw
w
ESMF_InfoArrayUTestw
w
ESMF_InfoCacheUTestw
w
ESMF_InfoDescribeUTestw
w
ESMF_InfoProfileUTestw
w
ESMF_InfoSyncUTestw
w
ESMF_InfoUTestw
w
ESMF_InitMacrosTestw
w
ESMF_InternalStateUTestw
w
ESMF_IO_MultitileUTestw
w
ESMF_IO_YAMLUTestw
w
ESMF_IOCompUTestw
w
ESMF_IOGridCompUTestw
w
ESMF_IOUTestw
w
ESMF_LAPACKUTestw
w
ESMF_LocalArrayDataUTestw
w
ESMF_LocalArrayTestw
w
ESMF_LocStreamCreateUTestw
w
ESMF_LogErrPerfUTestw
w
ESMF_LogErrUTestw
w
ESMF_MeshFileIOUTestw
w
ESMF_MeshOpUTestw
w
ESMF_MeshUTestw
w
ESMF_NUOPC_UTestw
w
ESMF_PointListUTestw
w
ESMF_ProfileUTestw
w
ESMF_RegridWeightGenUTestw
w
ESMF_RouteHandleAdvancedUTestw
w
ESMF_RouteHandleUTestw
w
ESMF_SciCompCreateUTestw
w
ESMF_StateCreateUTestw
w
ESMF_StateReconcileProxyUTestw
w
ESMF_StateReconcileUTestw
w
ESMF_StateUTestw
w
ESMF_StdCompMethodsUTestw
w
ESMF_STestw
w
ESMF_TestUTestw
w
ESMF_TimeIntervalUTestw
w
ESMF_TimeUTestw
w
ESMF_TraceClkMonoSyncUTestw
w
ESMF_TraceClkMonoUTestw
w
ESMF_TraceIOUTestw
w
ESMF_TraceMPIUTestw
w
ESMF_TraceUTestw
w
ESMF_TypeKindGetUTestw
w
ESMF_UtilUTestw
w
ESMF_VMAccUTestw
w
ESMF_VMAllGatherUTestw
w
ESMF_VMAllGatherVUTestw
w
ESMF_VMAllToAllUTestw
w
ESMF_VMAllToAllVUTestw
w
ESMF_VMBarrierUTestw
w
ESMF_VMBroadcastUTestw
w
ESMF_VMComponentUTestw
w
ESMF_VMEpochLargeMsgUTestw
w
ESMF_VMGatherUTestw
w
ESMF_VMOpenMPUTestw
w
ESMF_VMScatterUTestw
w
ESMF_VMSendNbVMRecvNbUTestw
w
ESMF_VMSendRecvNbUTestw
w
ESMF_VMSendrecvUTestw
w
ESMF_VMSendVMRecvUTestw
w
ESMF_VMUTestw
w
ESMF_VMUTestw
w
ESMF_WebServComponentUTestw
w
ESMF_XGridMaskingUTestw
w
ESMF_XGridUTestw
w
FeatureTestw
w
Finalizationw
w
Initializationw
w
MultPar_MultLinesw
w
MultPar_SingleLine_Uw
w
MultPar_SingleLine_Vw
w
MultPar_SingleLine_Vfw
w
ptr_size_testw
w
runw
w
Sectionsw
w
SetModelServicesw
w
SingleParw
w
SingleParSetw
w
StringTestw
w
Tablew
w
testw
w
test3w
w
test_AllFullReduce_maxw
w
test_AllFullReduce_maxw
w
test_AllFullReduce_minw
w
test_AllFullReduce_minw
w
test_AllFullReduce_sumw
w
test_AllFullReduce_sumw
w
test_AllReduce_maxw
w
test_AllReduce_maxw
w
test_AllReduce_minw
w
test_AllReduce_minw
w
test_AllReduce_sumw
w
test_AllReduce_sumw
w
test_Reduce_maxw
w
test_Reduce_minw
w
test_Reduce_sumw
w
test_vm_currentw
w
test_vm_operatorsw
w
test_vm_timew
w
TestArrayBundleNamedAliasw
w
TestArrayNamedAliasw
w
TestCplCompNamedAliasw
w
TestFieldBundleNamedAliasw
w
TestFieldNamedAliasw
w
TestGridCompNamedAliasw
w
TestSciCompNamedAliasw
w
TestStateNamedAliasw
w
user_finalw
w
user_initw
w
user_runw
w
WordsizeTestw
w

Source Code

      subroutine ESMF_Test(condition, name, failMsg, result, file, line, unit)

! !ARGUMENTS:
      logical, intent(in) :: condition      ! pass/fail condition
      character(*), intent(in) :: name      ! test name
      character(*), intent(in) :: failMsg   ! fail message
      integer, intent(inout) :: result      ! accumulated result
      character(*), intent(in) :: file      ! test file name
      integer, intent(in) :: line           ! test file line number
      integer, intent(in), optional :: unit ! additional output unit number

! !DESCRIPTION:
!     Prints a {\tt PASS} message to stdout if {\tt condition} is true,
!     and a {\tt FAIL} message if {\tt condition} is false.  If {\tt unit}
!     is specified, will in addition write the same message to that 
!     Fortran unit number.
!
!EOP
!-------------------------------------------------------------------------------

      character(2*ESMF_MAXSTR) :: msg
      character(16) :: linestr

      write (linestr,*) line
      linestr = adjustl (linestr)

      if(condition) then
        write(msg, *) "PASS ", trim(name), ", ", trim(file), ", line ", trim (linestr)
        print *, trim(msg)
        call ESMF_LogWrite(trim(msg), ESMF_LOGMSG_INFO)
        if (present(unit)) write(unit, *) trim(msg)
      else
        write(msg, *) "FAIL ", trim(name), ", ", trim(file), ", line ", &
                      trim (linestr), ": ", trim(failMsg)
        print *, trim(msg)
        call ESMF_LogWrite(trim(msg), ESMF_LOGMSG_INFO)
        if (present(unit)) write(unit, *) trim(msg)
        result = result + 1  ! count total failures; 0 = all pass
      end if

      end subroutine ESMF_Test