Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-standard declarations of 8-byte integers in ESMF in MPAS-Framework #4825

Merged
merged 1 commit into from
Mar 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,23 @@ module ESMF_BaseMod
ESMF_STATE_BUSY = ESMF_Status(5), &
ESMF_STATE_INVALID = ESMF_Status(6)

!------------------------------------------------------------------------------
!
integer, parameter :: &
ESMF_KIND_I1 = selected_int_kind(2), &
ESMF_KIND_I2 = selected_int_kind(4), &
ESMF_KIND_I4 = selected_int_kind(9), &
ESMF_KIND_I8 = selected_int_kind(18), &
ESMF_KIND_R4 = selected_real_kind(3,25), &
ESMF_KIND_R8 = selected_real_kind(6,45), &
ESMF_KIND_C8 = selected_real_kind(3,25), &
ESMF_KIND_C16 = selected_real_kind(6,45)

!------------------------------------------------------------------------------
!
type ESMF_Pointer
private
integer*8 :: ptr
integer(kind=ESMF_KIND_I8) :: ptr
end type

type(ESMF_Pointer), parameter :: ESMF_NULL_POINTER = ESMF_Pointer(0), &
Expand All @@ -95,18 +107,6 @@ module ESMF_BaseMod
ESMF_DATA_LOGICAL = ESMF_DataType(3), &
ESMF_DATA_CHARACTER = ESMF_DataType(4)

!------------------------------------------------------------------------------

integer, parameter :: &
ESMF_KIND_I1 = selected_int_kind(2), &
ESMF_KIND_I2 = selected_int_kind(4), &
ESMF_KIND_I4 = selected_int_kind(9), &
ESMF_KIND_I8 = selected_int_kind(18), &
ESMF_KIND_R4 = selected_real_kind(3,25), &
ESMF_KIND_R8 = selected_real_kind(6,45), &
ESMF_KIND_C8 = selected_real_kind(3,25), &
ESMF_KIND_C16 = selected_real_kind(6,45)

!------------------------------------------------------------------------------

type ESMF_DataValue
Expand Down Expand Up @@ -160,7 +160,7 @@ module ESMF_BaseMod
!
type ESMF_BasePointer
private
integer*8 :: base_ptr
integer(kind=ESMF_KIND_I8) :: base_ptr
end type

integer :: global_count = 0
Expand Down Expand Up @@ -950,7 +950,7 @@ subroutine ESMF_SetPointer(ptype, contents, rc)
!
! !ARGUMENTS:
type(ESMF_Pointer) :: ptype
integer*8, intent(in) :: contents
integer(kind=ESMF_KIND_I8), intent(in) :: contents
integer, intent(out), optional :: rc

!
Expand Down Expand Up @@ -985,7 +985,7 @@ subroutine ESMF_SetNullPointer(ptype, rc)
!
!EOP
! !REQUIREMENTS:
integer*8, parameter :: nullp = 0
integer(kind=ESMF_KIND_I8), parameter :: nullp = 0

ptype%ptr = nullp
if (present(rc)) rc = ESMF_SUCCESS
Expand All @@ -999,7 +999,7 @@ end subroutine ESMF_SetNullPointer
function ESMF_GetPointer(ptype, rc)
!
! !RETURN VALUE:
integer*8 :: ESMF_GetPointer
integer(kind=ESMF_KIND_I8) :: ESMF_GetPointer

! !ARGUMENTS:
type(ESMF_Pointer), intent(in) :: ptype
Expand Down