Skip to content

Commit

Permalink
Merge branch 'fix/hconfig' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
theurich committed May 20, 2023
2 parents f20d586 + 7f2cf84 commit f99560c
Showing 1 changed file with 27 additions and 63 deletions.
90 changes: 27 additions & 63 deletions src/Infrastructure/HConfig/interface/ESMF_HConfig.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4077,7 +4077,6 @@ function ESMF_HConfigAsString(hconfig, keywordEnforcer, index, keyString, &
integer :: len
type(ESMF_HConfig) :: hconfigTemp
type(ESMF_Logical) :: flag
character(len=:), allocatable :: tempString

! initialize return code; assume routine not implemented
localrc = ESMF_RC_NOT_IMPL
Expand All @@ -4098,10 +4097,10 @@ function ESMF_HConfigAsString(hconfig, keywordEnforcer, index, keyString, &
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigAsString)

! Call into the C++ interface to get the string
call c_ESMC_HConfigAsString(hconfigTemp, tempString, &
call c_ESMC_HConfigAsString(hconfigTemp, ESMF_HConfigAsString, &
flag, localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
Expand All @@ -4117,18 +4116,15 @@ function ESMF_HConfigAsString(hconfig, keywordEnforcer, index, keyString, &
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigAsString)

! Call into the C++ interface to get the string
call c_ESMC_HConfigAsString(hconfig, tempString, &
call c_ESMC_HConfigAsString(hconfig, ESMF_HConfigAsString, &
flag, localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
endif

! transfer ownership of allocation
call move_alloc(tempString, ESMF_HConfigAsString)

! handle asOkay
if (present(asOkay)) then
asOkay = flag
Expand Down Expand Up @@ -4164,7 +4160,6 @@ function ESMF_HConfigIterAsString(hconfig, keywordEnforcer, index, keyString, &

integer :: localrc ! local return code
type(ESMF_HConfig) :: hconfigTemp
character(len=:), allocatable :: tempString

! initialize return code; assume routine not implemented
localrc = ESMF_RC_NOT_IMPL
Expand All @@ -4174,14 +4169,11 @@ function ESMF_HConfigIterAsString(hconfig, keywordEnforcer, index, keyString, &
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return

tempString = ESMF_HConfigAsString(hconfigTemp, &
ESMF_HConfigIterAsString = ESMF_HConfigAsString(hconfigTemp, &
index=index, keyString=keyString, doc=doc, asOkay=asOkay, rc=localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return

! transfer ownership of allocation
call move_alloc(tempString, ESMF_HConfigIterAsString)

! return successfully
if (present(rc)) rc = ESMF_SUCCESS

Expand Down Expand Up @@ -4606,7 +4598,6 @@ function ESMF_HConfigAsStringMapKey(hconfig, keywordEnforcer, index, keyString,
integer :: len
type(ESMF_HConfig) :: hconfigTemp
type(ESMF_Logical) :: flag
character(len=:), allocatable :: tempString

! initialize return code; assume routine not implemented
localrc = ESMF_RC_NOT_IMPL
Expand All @@ -4627,10 +4618,10 @@ function ESMF_HConfigAsStringMapKey(hconfig, keywordEnforcer, index, keyString,
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigAsStringMapKey)

! Call into the C++ interface to get the string
call c_ESMC_HConfigAsString(hconfigTemp, tempString, &
call c_ESMC_HConfigAsString(hconfigTemp, ESMF_HConfigAsStringMapKey, &
flag, localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
Expand All @@ -4646,18 +4637,15 @@ function ESMF_HConfigAsStringMapKey(hconfig, keywordEnforcer, index, keyString,
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigAsStringMapKey)

! Call into the C++ interface to get the string
call c_ESMC_HConfigAsStringMapKey(hconfig, tempString, &
call c_ESMC_HConfigAsStringMapKey(hconfig, ESMF_HConfigAsStringMapKey, &
flag, localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
endif

! transfer ownership of allocation
call move_alloc(tempString, ESMF_HConfigAsStringMapKey)

! handle asOkay
if (present(asOkay)) then
asOkay = flag
Expand Down Expand Up @@ -5092,7 +5080,6 @@ function ESMF_HConfigAsStringMapVal(hconfig, keywordEnforcer, index, keyString,
integer :: len
type(ESMF_HConfig) :: hconfigTemp
type(ESMF_Logical) :: flag
character(len=:), allocatable :: tempString

! initialize return code; assume routine not implemented
localrc = ESMF_RC_NOT_IMPL
Expand All @@ -5113,10 +5100,10 @@ function ESMF_HConfigAsStringMapVal(hconfig, keywordEnforcer, index, keyString,
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigAsStringMapVal)

! Call into the C++ interface to get the string
call c_ESMC_HConfigAsString(hconfigTemp, tempString, &
call c_ESMC_HConfigAsString(hconfigTemp, ESMF_HConfigAsStringMapVal, &
flag, localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
Expand All @@ -5132,18 +5119,15 @@ function ESMF_HConfigAsStringMapVal(hconfig, keywordEnforcer, index, keyString,
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigAsStringMapVal)

! Call into the C++ interface to get the string
call c_ESMC_HConfigAsStringMapVal(hconfig, tempString, &
call c_ESMC_HConfigAsStringMapVal(hconfig, ESMF_HConfigAsStringMapVal, &
flag, localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
endif

! transfer ownership of allocation
call move_alloc(tempString, ESMF_HConfigAsStringMapVal)

! handle asOkay
if (present(asOkay)) then
asOkay = flag
Expand Down Expand Up @@ -5941,7 +5925,6 @@ function ESMF_HConfigIterAsStringSeq(hconfig, stringLen, keywordEnforcer, index,

integer :: localrc ! local return code
type(ESMF_HConfig) :: hconfigTemp
character(len=:), allocatable :: tempString(:)

! initialize return code; assume routine not implemented
localrc = ESMF_RC_NOT_IMPL
Expand All @@ -5951,15 +5934,12 @@ function ESMF_HConfigIterAsStringSeq(hconfig, stringLen, keywordEnforcer, index,
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return

tempString = ESMF_HConfigAsStringSeq(hconfigTemp, &
ESMF_HConfigIterAsStringSeq = ESMF_HConfigAsStringSeq(hconfigTemp, &
stringLen=stringLen, &
index=index, keyString=keyString, doc=doc, asOkay=asOkay, rc=localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return

! transfer ownership of allocation
call move_alloc(tempString, ESMF_HConfigIterAsStringSeq)

! return successfully
if (present(rc)) rc = ESMF_SUCCESS

Expand Down Expand Up @@ -8692,7 +8672,6 @@ function ESMF_HConfigGetTag(hconfig, keywordEnforcer, index, keyString, doc, rc)
integer :: localrc ! local return code
integer :: len
type(ESMF_HConfig) :: hconfigTemp
character(len=:), allocatable :: tempString

! initialize return code; assume routine not implemented
localrc = ESMF_RC_NOT_IMPL
Expand All @@ -8713,10 +8692,10 @@ function ESMF_HConfigGetTag(hconfig, keywordEnforcer, index, keyString, doc, rc)
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigGetTag)

! Call into the C++ interface to get the string
call c_ESMC_HConfigGetTag(hconfigTemp, tempString, localrc)
call c_ESMC_HConfigGetTag(hconfigTemp, ESMF_HConfigGetTag, localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return

Expand All @@ -8731,17 +8710,14 @@ function ESMF_HConfigGetTag(hconfig, keywordEnforcer, index, keyString, doc, rc)
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigGetTag)

! Call into the C++ interface to get the string
call c_ESMC_HConfigGetTag(hconfig, tempString, localrc)
call c_ESMC_HConfigGetTag(hconfig, ESMF_HConfigGetTag, localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
endif

! transfer ownership of allocation
call move_alloc(tempString, ESMF_HConfigGetTag)

! return successfully
if (present(rc)) rc = ESMF_SUCCESS

Expand All @@ -8766,7 +8742,6 @@ function ESMF_HConfigIterGetTag(hconfig, keywordEnforcer, index, keyString, doc,

integer :: localrc ! local return code
type(ESMF_HConfig) :: hconfigTemp
character(len=:), allocatable :: tempString

! initialize return code; assume routine not implemented
localrc = ESMF_RC_NOT_IMPL
Expand All @@ -8776,14 +8751,11 @@ function ESMF_HConfigIterGetTag(hconfig, keywordEnforcer, index, keyString, doc,
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return

tempString = ESMF_HConfigGetTag(hconfigTemp, &
ESMF_HConfigIterGetTag = ESMF_HConfigGetTag(hconfigTemp, &
index=index, keyString=keyString, doc=doc, rc=localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return

! transfer ownership of allocation
call move_alloc(tempString, ESMF_HConfigIterGetTag)

! return successfully
if (present(rc)) rc = ESMF_SUCCESS

Expand Down Expand Up @@ -8833,7 +8805,6 @@ function ESMF_HConfigGetTagMapKey(hconfig, keywordEnforcer, index, keyString, &
integer :: localrc ! local return code
integer :: len
type(ESMF_HConfig) :: hconfigTemp
character(len=:), allocatable :: tempString

! initialize return code; assume routine not implemented
localrc = ESMF_RC_NOT_IMPL
Expand All @@ -8854,10 +8825,10 @@ function ESMF_HConfigGetTagMapKey(hconfig, keywordEnforcer, index, keyString, &
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigGetTagMapKey)

! Call into the C++ interface to get the string
call c_ESMC_HConfigGetTag(hconfigTemp, tempString, &
call c_ESMC_HConfigGetTag(hconfigTemp, ESMF_HConfigGetTagMapKey, &
localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
Expand All @@ -8873,18 +8844,15 @@ function ESMF_HConfigGetTagMapKey(hconfig, keywordEnforcer, index, keyString, &
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigGetTagMapKey)

! Call into the C++ interface to get the string
call c_ESMC_HConfigGetTagMapKey(hconfig, tempString, &
call c_ESMC_HConfigGetTagMapKey(hconfig, ESMF_HConfigGetTagMapKey, &
localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
endif

! transfer ownership of allocation
call move_alloc(tempString, ESMF_HConfigGetTagMapKey)

! return successfully
if (present(rc)) rc = ESMF_SUCCESS

Expand Down Expand Up @@ -8934,7 +8902,6 @@ function ESMF_HConfigGetTagMapVal(hconfig, keywordEnforcer, index, keyString, &
integer :: localrc ! local return code
integer :: len
type(ESMF_HConfig) :: hconfigTemp
character(len=:), allocatable :: tempString

! initialize return code; assume routine not implemented
localrc = ESMF_RC_NOT_IMPL
Expand All @@ -8955,10 +8922,10 @@ function ESMF_HConfigGetTagMapVal(hconfig, keywordEnforcer, index, keyString, &
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigGetTagMapVal)

! Call into the C++ interface to get the string
call c_ESMC_HConfigGetTag(hconfigTemp, tempString, &
call c_ESMC_HConfigGetTag(hconfigTemp, ESMF_HConfigGetTagMapVal, &
localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
Expand All @@ -8974,18 +8941,15 @@ function ESMF_HConfigGetTagMapVal(hconfig, keywordEnforcer, index, keyString, &
ESMF_CONTEXT, rcToReturn=rc)) return

! correctly size the character allocation
allocate(character(len=len)::tempString)
allocate(character(len=len)::ESMF_HConfigGetTagMapVal)

! Call into the C++ interface to get the string
call c_ESMC_HConfigGetTagMapVal(hconfig, tempString, &
call c_ESMC_HConfigGetTagMapVal(hconfig, ESMF_HConfigGetTagMapVal, &
localrc)
if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
endif

! transfer ownership of allocation
call move_alloc(tempString, ESMF_HConfigGetTagMapVal)

! return successfully
if (present(rc)) rc = ESMF_SUCCESS

Expand Down

0 comments on commit f99560c

Please sign in to comment.