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 usage of invalid BOZ integer constants #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
98 changes: 49 additions & 49 deletions src/include/mpif.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
INTEGER MPI_OP_NULL
PARAMETER (MPI_OP_NULL=402653184)
INTEGER MPI_DATATYPE_NULL
PARAMETER (MPI_DATATYPE_NULL=z'0c000000')
PARAMETER (MPI_DATATYPE_NULL=201326592)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another modification approach is PARAMETER (MPI_DATATYPE_NULL=int(z'0c000000')), because int is a built-in function, and compilation optimization makes it efficient. This modification might be easily reviewed.

Of course, directly updating to decimal is also good.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is convenient, subsequent commits can also update the use of similar non-standard syntax in mpi.f90:

PARAMETER (MPI_DATATYPE_NULL=z'0c000000')

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gfortran may throw out the following warning(s):

mpif.h:56:19:
Warning: Obsolescent feature: Old-style character length at (1)
mpif.h:57:19:
Warning: Obsolescent feature: Old-style character length at (1)

The non-standard writing character*1 should be replaced with the standard writing character(1):

CHARACTER*1 MPI_ARGVS_NULL(1,1)

CHARACTER*1 MPI_ARGVS_NULL(1,1)

INTEGER MPI_REQUEST_NULL
PARAMETER (MPI_REQUEST_NULL=738197504)
INTEGER MPI_ERRHANDLER_NULL
Expand Down Expand Up @@ -300,104 +300,104 @@
INTEGER MPI_LOCK_SHARED
PARAMETER (MPI_LOCK_SHARED=235)
INTEGER MPI_CHAR
PARAMETER (MPI_CHAR=z'4c000101')
PARAMETER (MPI_CHAR=1275068673)
INTEGER MPI_UNSIGNED_CHAR
PARAMETER (MPI_UNSIGNED_CHAR=z'4c000102')
PARAMETER (MPI_UNSIGNED_CHAR=1275068674)
INTEGER MPI_SHORT
PARAMETER (MPI_SHORT=z'4c000203')
PARAMETER (MPI_SHORT=1275068931)
INTEGER MPI_UNSIGNED_SHORT
PARAMETER (MPI_UNSIGNED_SHORT=z'4c000204')
PARAMETER (MPI_UNSIGNED_SHORT=1275068932)
INTEGER MPI_INT
PARAMETER (MPI_INT=z'4c000405')
PARAMETER (MPI_INT=1275069445)
INTEGER MPI_UNSIGNED
PARAMETER (MPI_UNSIGNED=z'4c000406')
PARAMETER (MPI_UNSIGNED=1275069446)
INTEGER MPI_LONG
PARAMETER (MPI_LONG=z'4c000407')
PARAMETER (MPI_LONG=1275069447)
INTEGER MPI_UNSIGNED_LONG
PARAMETER (MPI_UNSIGNED_LONG=z'4c000408')
PARAMETER (MPI_UNSIGNED_LONG=1275069448)
INTEGER MPI_LONG_LONG
PARAMETER (MPI_LONG_LONG=z'4c000809')
PARAMETER (MPI_LONG_LONG=1275070473)
INTEGER MPI_LONG_LONG_INT
PARAMETER (MPI_LONG_LONG_INT=z'4c000809')
PARAMETER (MPI_LONG_LONG_INT=1275070473)
INTEGER MPI_FLOAT
PARAMETER (MPI_FLOAT=z'4c00040a')
PARAMETER (MPI_FLOAT=1275069450)
INTEGER MPI_DOUBLE
PARAMETER (MPI_DOUBLE=z'4c00080b')
PARAMETER (MPI_DOUBLE=1275070475)
INTEGER MPI_LONG_DOUBLE
PARAMETER (MPI_LONG_DOUBLE=z'4c00080c')
PARAMETER (MPI_LONG_DOUBLE=1275070476)
INTEGER MPI_BYTE
PARAMETER (MPI_BYTE=z'4c00010d')
PARAMETER (MPI_BYTE=1275068685)
INTEGER MPI_WCHAR
PARAMETER (MPI_WCHAR=z'4c00020e')
PARAMETER (MPI_WCHAR=1275068942)
INTEGER MPI_PACKED
PARAMETER (MPI_PACKED=z'4c00010f')
PARAMETER (MPI_PACKED=1275068687)
INTEGER MPI_LB
PARAMETER (MPI_LB=z'4c000010')
PARAMETER (MPI_LB=1275068432)
INTEGER MPI_UB
PARAMETER (MPI_UB=z'4c000011')
PARAMETER (MPI_UB=1275068433)
INTEGER MPI_2INT
PARAMETER (MPI_2INT=z'4c000816')
PARAMETER (MPI_2INT=1275070486)
INTEGER MPI_SIGNED_CHAR
PARAMETER (MPI_SIGNED_CHAR=z'4c000118')
PARAMETER (MPI_SIGNED_CHAR=1275068696)
INTEGER MPI_UNSIGNED_LONG_LONG
PARAMETER (MPI_UNSIGNED_LONG_LONG=z'4c000819')
PARAMETER (MPI_UNSIGNED_LONG_LONG=1275070489)
INTEGER MPI_CHARACTER
PARAMETER (MPI_CHARACTER=z'4c00011a')
PARAMETER (MPI_CHARACTER=1275068698)
INTEGER MPI_INTEGER
PARAMETER (MPI_INTEGER=z'4c00041b')
PARAMETER (MPI_INTEGER=1275069467)
INTEGER MPI_REAL
PARAMETER (MPI_REAL=z'4c00041c')
PARAMETER (MPI_REAL=1275069468)
INTEGER MPI_LOGICAL
PARAMETER (MPI_LOGICAL=z'4c00041d')
PARAMETER (MPI_LOGICAL=1275069469)
INTEGER MPI_COMPLEX
PARAMETER (MPI_COMPLEX=z'4c00081e')
PARAMETER (MPI_COMPLEX=1275070494)
INTEGER MPI_DOUBLE_PRECISION
PARAMETER (MPI_DOUBLE_PRECISION=z'4c00081f')
PARAMETER (MPI_DOUBLE_PRECISION=1275070495)
INTEGER MPI_2INTEGER
PARAMETER (MPI_2INTEGER=z'4c000820')
PARAMETER (MPI_2INTEGER=1275070496)
INTEGER MPI_2REAL
PARAMETER (MPI_2REAL=z'4c000821')
PARAMETER (MPI_2REAL=1275070497)
INTEGER MPI_DOUBLE_COMPLEX
PARAMETER (MPI_DOUBLE_COMPLEX=z'4c001022')
PARAMETER (MPI_DOUBLE_COMPLEX=1275072546)
INTEGER MPI_2DOUBLE_PRECISION
PARAMETER (MPI_2DOUBLE_PRECISION=z'4c001023')
PARAMETER (MPI_2DOUBLE_PRECISION=1275072547)
INTEGER MPI_2COMPLEX
PARAMETER (MPI_2COMPLEX=z'4c001024')
PARAMETER (MPI_2COMPLEX=1275072548)
INTEGER MPI_2DOUBLE_COMPLEX
PARAMETER (MPI_2DOUBLE_COMPLEX=z'4c002025')
PARAMETER (MPI_2DOUBLE_COMPLEX=1275076645)
INTEGER MPI_REAL2
PARAMETER (MPI_REAL2=z'0c000000')
PARAMETER (MPI_REAL2=201326592)
INTEGER MPI_REAL4
PARAMETER (MPI_REAL4=z'4c000427')
PARAMETER (MPI_REAL4=1275069479)
INTEGER MPI_COMPLEX8
PARAMETER (MPI_COMPLEX8=z'4c000828')
PARAMETER (MPI_COMPLEX8=1275070504)
INTEGER MPI_REAL8
PARAMETER (MPI_REAL8=z'4c000829')
PARAMETER (MPI_REAL8=1275070505)
INTEGER MPI_COMPLEX16
PARAMETER (MPI_COMPLEX16=z'4c00102a')
PARAMETER (MPI_COMPLEX16=1275072554)
INTEGER MPI_REAL16
PARAMETER (MPI_REAL16=z'0c000000')
PARAMETER (MPI_REAL16=201326592)
INTEGER MPI_COMPLEX32
PARAMETER (MPI_COMPLEX32=z'0c000000')
PARAMETER (MPI_COMPLEX32=201326592)
INTEGER MPI_INTEGER1
PARAMETER (MPI_INTEGER1=z'4c00012d')
PARAMETER (MPI_INTEGER1=1275068717)
INTEGER MPI_COMPLEX4
PARAMETER (MPI_COMPLEX4=z'0c000000')
PARAMETER (MPI_COMPLEX4=201326592)
INTEGER MPI_INTEGER2
PARAMETER (MPI_INTEGER2=z'4c00022f')
PARAMETER (MPI_INTEGER2=1275068975)
INTEGER MPI_INTEGER4
PARAMETER (MPI_INTEGER4=z'4c000430')
PARAMETER (MPI_INTEGER4=1275069488)
INTEGER MPI_INTEGER8
PARAMETER (MPI_INTEGER8=z'4c000831')
PARAMETER (MPI_INTEGER8=1275070513)
INTEGER MPI_INTEGER16
PARAMETER (MPI_INTEGER16=z'0c000000')
PARAMETER (MPI_INTEGER16=201326592)

INCLUDE 'mpifptr.h'

INTEGER MPI_OFFSET
PARAMETER (MPI_OFFSET=z'4c00083c')
PARAMETER (MPI_OFFSET=1275070524)
INTEGER MPI_COUNT
PARAMETER (MPI_COUNT=z'4c00083d')
PARAMETER (MPI_COUNT=1275070525)
INTEGER MPI_FLOAT_INT
PARAMETER (MPI_FLOAT_INT=-1946157056)
INTEGER MPI_DOUBLE_INT
Expand Down
2 changes: 1 addition & 1 deletion src/include/x64/mpifptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
! Licensed under the MIT License.
!
INTEGER MPI_AINT
PARAMETER (MPI_AINT=z'4c00083b')
PARAMETER (MPI_AINT=1275070523)
INTEGER MPI_ADDRESS_KIND
PARAMETER(MPI_ADDRESS_KIND = 8)
2 changes: 1 addition & 1 deletion src/include/x86/mpifptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
! Licensed under the MIT License.
!
INTEGER MPI_AINT
PARAMETER (MPI_AINT=z'4c00043b')
PARAMETER (MPI_AINT=1275069499)
INTEGER MPI_ADDRESS_KIND
PARAMETER(MPI_ADDRESS_KIND = 4)