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

Define all named MPI constants. #1

Open
jeffhammond opened this issue Jul 19, 2022 · 8 comments
Open

Define all named MPI constants. #1

jeffhammond opened this issue Jul 19, 2022 · 8 comments
Assignees

Comments

@jeffhammond
Copy link
Owner

see MPI 4.0 19.1.2

@jeffhammond
Copy link
Owner Author

jeffhammond commented Oct 9, 2022

    ! The constants that cannot be used in initialization expressions or assignments in Fortran are as follows:
    ! Buffer address sentinels
    integer :: MPI_BOTTOM          =  0
    integer :: MPI_IN_PLACE        =  1
    integer :: MPI_ARGV_NULL       =  0
    integer :: MPI_ARGVS_NULL      =  0
    integer :: MPI_ERRCODES_IGNORE = -1
    integer :: MPI_UNWEIGHTED      = -1
    integer :: MPI_WEIGHTS_EMPTY   =  0

Only MPI_BOTTOM and MPI_IN_PLACE are handled right now.
Functions that use the others aren't present yet.

@jeffhammond
Copy link
Owner Author

jeffhammond commented Oct 9, 2022

    ! thread levels
    integer, parameter :: MPI_THREAD_SINGLE     = 0
    integer, parameter :: MPI_THREAD_FUNNELED   = 1
    integer, parameter :: MPI_THREAD_SERIALIZED = 2
    integer, parameter :: MPI_THREAD_MULTIPLE   = 3

    ! comparisons (communicators and groups)
    integer, parameter :: MPI_IDENT     = 0
    integer, parameter :: MPI_CONGRUENT = 1
    integer, parameter :: MPI_SIMILAR   = 2
    integer, parameter :: MPI_UNEQUAL   = 3

DONE

@jeffhammond
Copy link
Owner Author

jeffhammond commented Oct 9, 2022

    ! useful handles
    type(MPI_Comm), parameter     :: MPI_COMM_WORLD    = MPI_Comm(MPI_VAL     = -1000000)
    type(MPI_Comm), parameter     :: MPI_COMM_SELF     = MPI_Comm(MPI_VAL     = -1)

DONE

@jeffhammond
Copy link
Owner Author

jeffhammond commented Oct 9, 2022

    ! NULL handles
    type(MPI_Comm), parameter     :: MPI_COMM_NULL     = MPI_Comm(MPI_VAL     = -911)
    type(MPI_Datatype), parameter :: MPI_DATATYPE_NULL = MPI_Datatype(MPI_VAL = -911)
    type(MPI_File), parameter     :: MPI_FILE_NULL     = MPI_File(MPI_VAL     = -911)
    type(MPI_Group), parameter    :: MPI_GROUP_NULL    = MPI_Group(MPI_VAL    = -911)
    type(MPI_Info), parameter     :: MPI_INFO_NULL     = MPI_Info(MPI_VAL     = -911)
    type(MPI_Message), parameter  :: MPI_MESSAGE_NULL  = MPI_Message(MPI_VAL  = -911)
    type(MPI_Op), parameter       :: MPI_OP_NULL       = MPI_Op(MPI_VAL       = -911)
    type(MPI_Request), parameter  :: MPI_REQUEST_NULL  = MPI_Request(MPI_VAL  = -911)
    type(MPI_Win), parameter      :: MPI_WIN_NULL      = MPI_Win(MPI_VAL      = -911)

DONE

@jeffhammond
Copy link
Owner Author

    ! IGNORE sentinels
    type(MPI_Status)   :: MPI_STATUS_IGNORE
    type(MPI_Status)   :: MPI_STATUSES_IGNORE

@jeffhammond
Copy link
Owner Author

    ! use a ridiculously large value that will always be larger than
    ! what any implementation uses, to avoid having to query the
    ! underlying implementation
    integer, parameter :: MPI_MAX_PROCESSOR_NAME         = (1024*1024)
    integer, parameter :: MPI_MAX_LIBRARY_VERSION_STRING = (1024*1024)
    integer, parameter :: MPI_MAX_ERROR_STRING           = (1024*1024)
    integer, parameter :: MPI_MAX_DATAREP_STRING         = (1024*1024)
    integer, parameter :: MPI_MAX_INFO_KEY               = (1024*1024)
    integer, parameter :: MPI_MAX_INFO_VAL               = (1024*1024)
    integer, parameter :: MPI_MAX_OBJECT_NAME            = (1024*1024)
    integer, parameter :: MPI_MAX_PORT_NAME              = (1024*1024)

@jeffhammond jeffhammond self-assigned this Nov 25, 2022
@jeffhammond
Copy link
Owner Author

jeffhammond commented Nov 28, 2022

    ! built-in ops
    type(MPI_Op), parameter :: MPI_MAX      = MPI_Op(MPI_VAL = -10001)
    type(MPI_Op), parameter :: MPI_MIN      = MPI_Op(MPI_VAL = -10002)
    type(MPI_Op), parameter :: MPI_SUM      = MPI_Op(MPI_VAL = -10003)
    type(MPI_Op), parameter :: MPI_PROD     = MPI_Op(MPI_VAL = -10004)
    type(MPI_Op), parameter :: MPI_MAXLOC   = MPI_Op(MPI_VAL = -10005)
    type(MPI_Op), parameter :: MPI_MINLOC   = MPI_Op(MPI_VAL = -10006)
    type(MPI_Op), parameter :: MPI_BAND     = MPI_Op(MPI_VAL = -10007)
    type(MPI_Op), parameter :: MPI_BOR      = MPI_Op(MPI_VAL = -10008)
    type(MPI_Op), parameter :: MPI_BXOR     = MPI_Op(MPI_VAL = -10009)
    type(MPI_Op), parameter :: MPI_LAND     = MPI_Op(MPI_VAL = -10010)
    type(MPI_Op), parameter :: MPI_LOR      = MPI_Op(MPI_VAL = -10011)
    type(MPI_Op), parameter :: MPI_LXOR     = MPI_Op(MPI_VAL = -10012)
    type(MPI_Op), parameter :: MPI_REPLACE  = MPI_Op(MPI_VAL = -10013)
    type(MPI_Op), parameter :: MPI_NO_OP    = MPI_Op(MPI_VAL = -10014)

@jeffhammond
Copy link
Owner Author

jeffhammond commented Dec 10, 2022

Currently, only these are missing:

MPI_BSEND_OVERHEAD is missing
MPI_KEYVAL_INVALID is missing
MPI_ROOT is missing
MPI_MAX_STRINGTAG_LEN is missing
MPI_MAX_PSET_NAME_LEN is missing
MPI_PACKED is missing

Some constants may be present but not yet supported in convert_constants.h...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant