Skip to content

Commit

Permalink
more Fortran constants
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Hammond <[email protected]>
  • Loading branch information
jeffhammond committed Feb 18, 2024
1 parent 9f2513f commit be4f668
Show file tree
Hide file tree
Showing 2 changed files with 147 additions and 7 deletions.
147 changes: 147 additions & 0 deletions mpi_fortran_constants.F90
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,151 @@ module mpi_fortran_constants
integer, parameter :: MPI_T_ERR_PVAR_NO_ATOMIC = 1017
integer, parameter :: MPI_ERR_LASTCODE = 16383

! Other constants
integer, parameter :: MPI_BSEND_OVERHEAD = 512

! String size constants
integer, parameter :: MPI_MAX_DATAREP_STRING = 128
integer, parameter :: MPI_MAX_ERROR_STRING = 512
integer, parameter :: MPI_MAX_INFO_KEY = 256
integer, parameter :: MPI_MAX_INFO_VAL = 1024
integer, parameter :: MPI_MAX_LIBRARY_VERSION_STRING = 8192
integer, parameter :: MPI_MAX_OBJECT_NAME = 128
integer, parameter :: MPI_MAX_PORT_NAME = 1024
integer, parameter :: MPI_MAX_PROCESSOR_NAME = 256
integer, parameter :: MPI_MAX_STRINGTAG_LEN = 1024
integer, parameter :: MPI_MAX_PSET_NAME_LEN = 512

! Mode Constants
! Files
integer, parameter :: MPI_MODE_APPEND = 1
integer, parameter :: MPI_MODE_CREATE = 2
integer, parameter :: MPI_MODE_DELETE_ON_CLOSE = 4
integer, parameter :: MPI_MODE_EXCL = 8
integer, parameter :: MPI_MODE_RDONLY = 16
integer, parameter :: MPI_MODE_RDWR = 32
integer, parameter :: MPI_MODE_SEQUENTIAL = 64
integer, parameter :: MPI_MODE_UNIQUE_OPEN = 128
integer, parameter :: MPI_MODE_WRONLY = 256
! Windows
integer, parameter :: MPI_MODE_NOCHECK = 1024
integer, parameter :: MPI_MODE_NOPRECEDE = 2048
integer, parameter :: MPI_MODE_NOPUT = 4096
integer, parameter :: MPI_MODE_NOSTORE = 8192
integer, parameter :: MPI_MODE_NOSUCCEED = 16384

! rank sentinels - must be negative
integer, parameter :: MPI_ANY_SOURCE = -1
integer, parameter :: MPI_PROC_NULL = -2
integer, parameter :: MPI_ROOT = -3

! tag sentinels - should be negative
integer, parameter :: MPI_ANY_TAG = -31

! attribute constant - should be negative
integer, parameter :: MPI_KEYVAL_INVALID = -127

! special displacement for sequential access file - should be negative
integer, parameter :: MPI_DISPLACEMENT_CURRENT = -255

! multi-purpose sentinel - must be negative
integer, parameter :: MPI_UNDEFINED = -32766

! Environmental inquiry keys and Predefined Attribute Keys

! Threads Constants
integer, parameter :: MPI_THREAD_SINGLE = 0
integer, parameter :: MPI_THREAD_FUNNELED = 1
integer, parameter :: MPI_THREAD_SERIALIZED = 2
integer, parameter :: MPI_THREAD_MULTIPLE = 7

! Array Datatype Order
integer, parameter :: MPI_ORDER_C = 12
integer, parameter :: MPI_ORDER_FORTRAN = 15

! Array Datatype Distribution
integer, parameter :: MPI_DISTRIBUTE_NONE = 16
integer, parameter :: MPI_DISTRIBUTE_BLOCK = 17
integer, parameter :: MPI_DISTRIBUTE_CYCLIC = 18
integer, parameter :: MPI_DISTRIBUTE_DFLT_DARG = 19

! RMA Lock Constants - arbitrary values
integer, parameter :: MPI_LOCK_SHARED = 21
integer, parameter :: MPI_LOCK_EXCLUSIVE = 22

! MPI Window Models
integer, parameter :: MPI_WIN_UNIFIED = 31
integer, parameter :: MPI_WIN_SEPARATE = 32

! MPI Window Create Flavors
integer, parameter :: MPI_WIN_FLAVOR_ALLOCATE = 41
integer, parameter :: MPI_WIN_FLAVOR_CREATE = 42
integer, parameter :: MPI_WIN_FLAVOR_DYNAMIC = 43
integer, parameter :: MPI_WIN_FLAVOR_SHARED = 44

! Results of communicator and group comparisons
integer, parameter :: MPI_IDENT = 101
integer, parameter :: MPI_CONGRUENT = 102
integer, parameter :: MPI_SIMILAR = 103
integer, parameter :: MPI_UNEQUAL = 104

! MPI_Topo_test
integer, parameter :: MPI_GRAPH = 201
integer, parameter :: MPI_DIST_GRAPH = 202
integer, parameter :: MPI_CART = 203

! Datatype Decoding Constants
integer, parameter :: MPI_COMBINER_NAMED = 301
integer, parameter :: MPI_COMBINER_DUP = 302
integer, parameter :: MPI_COMBINER_CONTIGUOUS = 303
integer, parameter :: MPI_COMBINER_VECTOR = 304
integer, parameter :: MPI_COMBINER_HVECTOR = 305
integer, parameter :: MPI_COMBINER_INDEXED = 306
integer, parameter :: MPI_COMBINER_HINDEXED = 307
integer, parameter :: MPI_COMBINER_INDEXED_BLOCK = 308
integer, parameter :: MPI_COMBINER_HINDEXED_BLOCK = 309
integer, parameter :: MPI_COMBINER_STRUCT = 310
integer, parameter :: MPI_COMBINER_SUBARRAY = 311
integer, parameter :: MPI_COMBINER_DARRAY = 312
integer, parameter :: MPI_COMBINER_F90_REAL = 313
integer, parameter :: MPI_COMBINER_F90_COMPLEX = 314
integer, parameter :: MPI_COMBINER_F90_INTEGER = 315
integer, parameter :: MPI_COMBINER_RESIZED = 316
integer, parameter :: MPI_COMBINER_VALUE_INDEX = 317

! File Position Constants
integer, parameter :: MPI_SEEK_CUR = 601
integer, parameter :: MPI_SEEK_END = 602
integer, parameter :: MPI_SEEK_SET = 603

! Fortran Datatype Matching Constants
integer, parameter :: MPIX_TYPECLASS_LOGICAL = 801
integer, parameter :: MPI_TYPECLASS_INTEGER = 802
integer, parameter :: MPI_TYPECLASS_REAL = 803
integer, parameter :: MPI_TYPECLASS_COMPLEX = 804

! Communicator split type constants - arbitrary values
integer, parameter :: MPI_COMM_TYPE_SHARED = 1001
integer, parameter :: MPI_COMM_TYPE_HW_UNGUIDED = 1002
integer, parameter :: MPI_COMM_TYPE_HW_GUIDED = 1003
integer, parameter :: MPI_COMM_TYPE_RESOURCE_GUIDED = 1004

! These apply to MPI_COMM_WORLD
integer, parameter :: MPI_TAG_UB = 10001
integer, parameter :: MPI_IO = 10002
integer, parameter :: MPI_HOST = 10003
integer, parameter :: MPI_WTIME_IS_GLOBAL = 10004
integer, parameter :: MPI_APPNUM = 10005
integer, parameter :: MPI_LASTUSEDCODE = 10006
integer, parameter :: MPI_UNIVERSE_SIZE = 10007

! Predefined Attribute Keys
! These apply to Windows
integer, parameter :: MPI_WIN_BASE = 20001
integer, parameter :: MPI_WIN_DISP_UNIT = 20002
integer, parameter :: MPI_WIN_SIZE = 20003
integer, parameter :: MPI_WIN_CREATE_FLAVOR = 20004
integer, parameter :: MPI_WIN_MODEL = 20005


end module mpi_fortran_constants
7 changes: 0 additions & 7 deletions mpi_fortran_handle_types.F90
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
module mpi_fortran_handle_types

type, bind(C) :: MPI_Status
integer :: MPI_SOURCE
integer :: MPI_TAG
integer :: MPI_ERROR
integer :: MPI_internal(5)
end type MPI_Status

type, bind(C) :: MPI_Comm
integer :: MPI_VAL
end type MPI_Comm
Expand Down

0 comments on commit be4f668

Please sign in to comment.