test_vm_current Subroutine

public subroutine test_vm_current()

Arguments

None

Source Code

      subroutine test_vm_current
! This subroutine tests VM get current

      !------------------------------------------------------------------------
      !EX_UTest
      write(failMsg, *) "Did not return ESMF_SUCCESS"
      write(name, *) "VM Get Current  Test"
      call ESMF_VMGetCurrent(test_vm, rc=rc)
      call ESMF_Test((rc.eq.ESMF_SUCCESS), name, failMsg, result, ESMF_SRCLINE)

      !------------------------------------------------------------------------
      !EX_UTest
      write(failMsg, *) "Did not return ESMF_SUCCESS"
      write(name, *) "Test_VM Get Test"
      call ESMF_VMGet(test_vm, localPet=test_localPet, petCount=test_npets, &
        ssiMap=ssiMap, esmfComm=esmfComm, rc=rc)
      call ESMF_Test((rc.eq.ESMF_SUCCESS), name, failMsg, result, ESMF_SRCLINE)

      write(msgString,*) "ssiMap=", ssiMap
      call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc)
      if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)

      write(msgString,*) "esmfComm=", esmfComm, "  len(esmfComm)=", len(esmfComm)
      call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc)
      if (rc /= ESMF_SUCCESS) call ESMF_Finalize(endflag=ESMF_END_ABORT)

      !------------------------------------------------------------------------
      !EX_UTest
      write(failMsg, *) "Did not return correct bounds"
      write(name, *) "Test bounds of ssiMap"
      call ESMF_Test(((lbound(ssiMap,1)==0).and.(ubound(ssiMap,1)==test_npets-1)),&
        name, failMsg, result, ESMF_SRCLINE)

      !------------------------------------------------------------------------
      !EX_UTest
      write(failMsg, *) "Did have correct PET infoS"
      write(name, *) "Verify the VM is correct Test"
      call ESMF_Test(((localPet.eq.test_localPet).and.(npets.eq.test_npets)), &
          name, failMsg, result, ESMF_SRCLINE)

      end subroutine test_vm_current