MPIX_Barrier_init(3)

πŸ“¦
version 26.9 Β· 3 versions
, in arch rolling

πŸ’… MPIX_Barrier_init(3) πŸ’…

okay so this is the Open MPI man page for MPIX_Barrier_init(3) and bestie, buckle up, because it's actually a whole family of functions sharing one page 🫢


✨ NAME ✨

So the NAME section is basically a group chat roster β€” every function that lives on this page. Here's the whole squad:

MPIX_Allgather_init, MPIX_Allgatherv_init, MPIX_Allreduce_init, MPIX_Alltoall_init, MPIX_Alltoallv_init, MPIX_Alltoallw_init, MPIX_Barrier_init, MPIX_Bcast_init, MPIX_Exscan_init, MPIX_Gather_init, MPIX_Gatherv_init, MPIX_Reduce_init, MPIX_Reduce_scatter_init, MPIX_Reduce_scatter_block_init, MPIX_Scan_init, MPIX_Scatter_init, MPIX_Scatterv_init, MPIX_Neighbor_allgather_init, MPIX_Neighbor_allgatherv_init, MPIX_Neighbor_alltoall_init, MPIX_Neighbor_alltoallv_init, MPIX_Neighbor_alltoallw_init

and what do they all do?? they build a handle for a collective communication or neighborhood collective communication πŸŽ€ like, that's the whole vibe. they make you a handle. you use it later. iconic behavior tbh.


πŸ¦‹ SYNTAX πŸ¦‹

🌸 C Syntax 🌸

first things first, you gotta invite the headers to the party β€” both of them, no skipping:

#include <mpi.h>
#include <mpi-ext.h>

and now the full cast, in order, every single one, no cap πŸ’–

int MPIX_Allgather_init(const void *sendbuf, int sendcount,
     MPI_Datatype sendtype, void *recvbuf, int recvcount,
     MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Allgatherv_init(const void *sendbuf, int sendcount,
     MPI_Datatype sendtype, void *recvbuf, const int recvcounts[],
     const int displs[], MPI_Datatype recvtype, MPI_Comm comm,
     MPI_Info info, MPI_Request *request)
int MPIX_Allreduce_init(const void *sendbuf, void *recvbuf, int count,
     MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Alltoall_init(const void *sendbuf, int sendcount,
     MPI_Datatype sendtype, void *recvbuf, int recvcount,
     MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Alltoallv_init(const void *sendbuf, const int sendcounts[],
     const int sdispls[], MPI_Datatype sendtype, void *recvbuf,
     const int recvcounts[], const int rdispls[], MPI_Datatype recvtype,
     MPI_Comm comm, MPI_Info info, MPI_Request *request)
int MPIX_Alltoallw_init(const void *sendbuf, const int sendcounts[],
     const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf,
     const int recvcounts[], const int rdispls[],
     const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Barrier_init(MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Bcast_init(void *buffer, int count, MPI_Datatype datatype,
     int root, MPI_Comm comm, MPI_Info info, MPI_Request *request)
int MPIX_Exscan_init(const void *sendbuf, void *recvbuf, int count,
     MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Gather_init(const void *sendbuf, int sendcount,
     MPI_Datatype sendtype, void *recvbuf, int recvcount,
     MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Gatherv_init(const void *sendbuf, int sendcount,
     MPI_Datatype sendtype, void *recvbuf, const int recvcounts[],
     const int displs[], MPI_Datatype recvtype, int root, MPI_Comm comm,
     MPI_Info info, MPI_Request *request)
int MPIX_Reduce_init(const void *sendbuf, void *recvbuf, int count,
     MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm,
     MPI_Info info, MPI_Request *request)
int MPIX_Reduce_scatter_init(const void *sendbuf, void *recvbuf,
     const int recvcounts[], MPI_Datatype datatype, MPI_Op op,
     MPI_Comm comm, MPI_Info info, MPI_Request *request)
int MPIX_Reduce_scatter_block_init(const void *sendbuf, void *recvbuf,
     int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm,
     MPI_Info info, MPI_Request *request)
int MPIX_Scan_init(const void *sendbuf, void *recvbuf, int count,
     MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Scatter_init(const void *sendbuf, int sendcount,
     MPI_Datatype sendtype, void *recvbuf, int recvcount,
     MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Scatterv_init(const void *sendbuf, const int sendcounts[],
     const int displs[], MPI_Datatype sendtype, void *recvbuf,
     int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm,
     MPI_Info info, MPI_Request *request)
int MPIX_Neighbor_allgather_init(const void *sendbuf, int sendcount,
     MPI_Datatype sendtype, void *recvbuf, int recvcount,
     MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Neighbor_allgatherv_init(const void *sendbuf, int sendcount,
     MPI_Datatype sendtype, void *recvbuf, const int recvcounts[],
     const int displs[], MPI_Datatype recvtype, MPI_Comm comm,
     MPI_Info info, MPI_Request *request)
int MPIX_Neighbor_alltoall_init(const void *sendbuf, int sendcount,
     MPI_Datatype sendtype, void *recvbuf, int recvcount,
     MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Neighbor_alltoallv_init(const void *sendbuf,
     const int sendcounts[], const int sdispls[], MPI_Datatype sendtype,
     void *recvbuf, const int recvcounts[], const int rdispls[],
     MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info,
     MPI_Request *request)
int MPIX_Neighbor_alltoallw_init(const void *sendbuf,
     const int sendcounts[], const MPI_Aint sdispls[],
     const MPI_Datatype sendtypes[], void *recvbuf,
     const int recvcounts[], const MPI_Aint rdispls[],
     const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Info info,
     MPI_Request *request)

and that's the whole lineup ✨ the neighborhood ones are the ones with Neighbor_ in the name, iykyk β€” note that MPIX_Neighbor_alltoallw_init is extra special and uses MPI_Aint for its sdispls[] and rdispls[] while all the other displacement arrays are plain int arrays πŸ‘‘ tiny detail, huge importance, don't mix 'em up πŸ’€

🌈 Fortran Syntax 🌈

okay so Fortran bestie, you have two flavours of extra setup to get the extension stuff in scope, and honestly pick whichever one your codebase is already doing β€” no cap:

USE MPI
USE MPI_EXT
! or the older form: INCLUDE 'mpif.h'; INCLUDE 'mpif-ext.h'

the USE MPI + USE MPI_EXT combo is the modern-ish move, and the INCLUDE 'mpif.h'; INCLUDE 'mpif-ext.h' line is the older form β€” it's still there, it still works, it's just giving legacy πŸ’€. lowkey your compiler will tell you which one it wants.

and then deep breath here come all the MPIX_*_INIT declarations. yes, all of them. it's a lot. it's giving "the whole roster walked in at once" πŸ‘‘

allgather, but init

MPIX_ALLGATHER_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT,
          RECVTYPE, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, INFO
       INTEGER   REQUEST, IERROR

allgatherv, but init

MPIX_ALLGATHERV_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF,
          RECVCOUNT, DISPLS, RECVTYPE, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNT, SENDTYPE, RECVCOUNT(*)
       INTEGER   DISPLS(*), RECVTYPE, COMM, INFO, REQUEST, IERROR

notice how RECVCOUNT picked up a (*) here β€” that's the v doing its thing ✨

allreduce, but init

MPIX_ALLREDUCE_INIT(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, INFO,
          REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   COUNT, DATATYPE, OP, COMM, INFO, REQUEST, IERROR

alltoall, but init

MPIX_ALLTOALL_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT,
          RECVTYPE, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE
       INTEGER   COMM, INFO, REQUEST, IERROR

alltoallv, but init

MPIX_ALLTOALLV_INIT(SENDBUF, SENDCOUNTS, SDISPLS, SENDTYPE,
          RECVBUF, RECVCOUNTS, RDISPLS, RECVTYPE, COMM, INFO, REQUEST,
          IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNTS(*), SDISPLS(*), SENDTYPE
       INTEGER   RECVCOUNTS(*), RDISPLS(*), RECVTYPE
       INTEGER   COMM, INFO, REQUEST, IERROR

alltoallw, but init

MPIX_ALLTOALLW_INIT(SENDBUF, SENDCOUNTS, SDISPLS, SENDTYPES,
          RECVBUF, RECVCOUNTS, RDISPLS, RECVTYPES, COMM, INFO, REQUEST,
          IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNTS(*), SDISPLS(*), SENDTYPES(*)
       INTEGER   RECVCOUNTS(*), RDISPLS(*), RECVTYPES(*)
       INTEGER   COMM, INFO, REQUEST, IERROR

the w version is the one with arrays of types, plural, SENDTYPES(*) and RECVTYPES(*) β€” she's extra and we love her 🫢

barrier, but init

MPIX_BARRIER_INIT(COMM, INFO, REQUEST, IERROR)
       INTEGER   COMM, INFO, REQUEST, IERROR

look at her. four arguments. no sendbuf, no recvbuf, nothing. the minimalist icon of this entire list 🌸

bcast, but init

MPIX_BCAST_INIT(BUFFER, COUNT, DATATYPE, ROOT, COMM, INFO, REQUEST,
          IERROR)
       <type>    BUFFER(*)
       INTEGER   COUNT, DATATYPE, ROOT, COMM, INFO, REQUEST, IERROR

exscan, but init

MPIX_EXSCAN_INIT(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, INFO,
          REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   COUNT, DATATYPE, OP, COMM, INFO, REQUEST, IERROR

gather, but init

MPIX_GATHER_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT,
          RECVTYPE, ROOT, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, ROOT
       INTEGER   COMM, INFO, REQUEST, IERROR

gatherv, but init

MPIX_GATHERV_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNTS,
          DISPLS, RECVTYPE, ROOT, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNT, SENDTYPE, RECVCOUNTS(*), DISPLS(*)
       INTEGER   RECVTYPE, ROOT, COMM, INFO, REQUEST, IERROR

reduce, but init

MPIX_REDUCE_INIT(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, ROOT, COMM,
          INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   COUNT, DATATYPE, OP, ROOT, COMM, INFO, REQUEST, IERROR

reduce_scatter, but init

MPIX_REDUCE_SCATTER_INIT(SENDBUF, RECVBUF, RECVCOUNTS, DATATYPE, OP,
          COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   RECVCOUNTS(*), DATATYPE, OP, COMM, INFO, REQUEST, IERROR

reduce_scatter_block, but init

MPIX_REDUCE_SCATTER_BLOCK_INIT(SENDBUF, RECVBUF, RECVCOUNT, DATATYPE,
          OP, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   RECVCOUNT, DATATYPE, OP, COMM, INFO, REQUEST, IERROR

the _BLOCK one trades the array RECVCOUNTS(*) for a single plain RECVCOUNT. one number, no drama. we stan a straightforward queen πŸ’…

scan, but init

MPIX_SCAN_INIT(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, INFO,
          REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   COUNT, DATATYPE, OP, COMM, INFO, REQUEST, IERROR

scatter, but init

MPIX_SCATTER_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT,
          RECVTYPE, ROOT, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, ROOT
       INTEGER   COMM, INFO, REQUEST, IERROR

scatterv, but init

MPIX_SCATTERV_INIT(SENDBUF, SENDCOUNTS, DISPLS, SENDTYPE, RECVBUF,
          RECVCOUNT, RECVTYPE, ROOT, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNTS(*), DISPLS(*), SENDTYPE
       INTEGER   RECVCOUNT, RECVTYPE, ROOT, COMM, INFO, REQUEST, IERROR

neighbor_allgather, but init

MPIX_NEIGHBOR_ALLGATHER_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF,
          RECVCOUNT, RECVTYPE, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM,
       INTEGER   INFO, REQUEST, IERROR

okay bestie don't panic at that COMM, line ending with a comma and then another INTEGER line β€” that's literally how it's printed in the page. I'm not touching it. it's canon πŸŽ€

neighbor_allgatherv, but init

MPIX_NEIGHBOR_ALLGATHERV_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF,
          RECVCOUNT, DISPLS, RECVTYPE, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNT, SENDTYPE, RECVCOUNT(*),
       INTEGER   DISPLS(*), RECVTYPE, COMM, INFO, REQUEST, IERROR

same situation, same energy, RECVCOUNT(*), with a lil trailing comma. ship it as-is πŸ’–

neighbor_alltoall, but init

MPIX_NEIGHBOR_ALLTOALL_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF,
          RECVCOUNT, RECVTYPE, COMM, INFO, REQUEST, IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE
       INTEGER   COMM, INFO, REQUEST, IERROR

neighbor_alltoallv, but init

MPIX_NEIGHBOR_ALLTOALLV_INIT(SENDBUF, SENDCOUNTS, SDISPLS, SENDTYPE,
          RECVBUF, RECVCOUNTS, RDISPLS, RECVTYPE, COMM, INFO, REQUEST,
          IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNTS(*), SDISPLS(*), SENDTYPE
       INTEGER   RECVCOUNTS(*), RDISPLS(*), RECVTYPE
       INTEGER   COMM, INFO, REQUEST, IERROR

neighbor_alltoallw, but init

MPIX_NEIGHBOR_ALLTOALLW_INIT(SENDBUF, SENDCOUNTS, SDISPLS, SENDTYPES,
          RECVBUF, RECVCOUNTS, RDISPLS, RECVTYPES, COMM, INFO, REQUEST,
          IERROR)
       <type>    SENDBUF(*), RECVBUF(*)
       INTEGER   SENDCOUNTS(*), SENDTYPES(*)
       INTEGER   RECVCOUNTS(*), RECVTYPES(*)
       INTEGER(KIND=MPI_ADDRESS_KIND) SDISPLS(*), RDISPLS(*)
       INTEGER   COMM, INFO, REQUEST, IERROR

wait β€” clock this one πŸ‘€. the displacements here are INTEGER(KIND=MPI_ADDRESS_KIND) SDISPLS(*), RDISPLS(*), not plain INTEGER. that's the detail people miss and then spend three hours debugging. put it in your notes, screenshot it, tattoo it, whatever works πŸ¦‹


✨ Fortran 2008 Syntax ✨

now for the mpi_f08 girlies β€” this is where it gets typed and honestly it ate:

USE mpi_f08
USE mpi_f08_ext

see how it's lowercase mpi_f08 and mpi_f08_ext? yeah. that's the vibe. don't capitalise it, the compiler will simply know 😭

MPIX_Allgather_init

MPIX_Allgather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount,
          recvtype, comm, info, request, ierror)
       TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
       TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
       INTEGER, INTENT(IN) :: sendcount, recvcount
       TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
       TYPE(MPI_Comm), INTENT(IN) :: comm
       TYPE(MPI_Info), INTENT(IN) :: info
       TYPE(MPI_Request), INTENT(OUT) :: request
       INTEGER, OPTIONAL, INTENT(OUT) :: ierror

MPIX_Allgatherv_init

MPIX_Allgatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts,
          displs, recvtype, comm, info, request, ierror)
       TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
       TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
       INTEGER, INTENT(IN) :: sendcount
       INTEGER, INTENT(IN), ASYNCHRONOUS :: recvcounts(*), displs(*)
       TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
       TYPE(MPI_Comm), INTENT(IN) :: comm
       TYPE(MPI_Info), INTENT(IN) :: info
       TYPE(MPI_Request), INTENT(OUT) :: request
       INTEGER, OPTIONAL, INTENT(OUT) :: ierror

MPIX_Allreduce_init

MPIX_Allreduce_init(sendbuf, recvbuf, count, datatype, op, comm, info,
          request, ierror)
       TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
       TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
       INTEGER, INTENT(IN) :: count
       TYPE(MPI_Datatype), INTENT(IN) :: datatype
       TYPE(MPI_Op), INTENT(IN) :: op
       TYPE(MPI_Comm), INTENT(IN) :: comm
       TYPE(MPI_Info), INTENT(IN) :: info
       TYPE(MPI_Request), INTENT(OUT) :: request
       INTEGER, OPTIONAL, INTENT(OUT) :: ierror

MPIX_Alltoall_init

MPIX_Alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount,
          recvtype, comm, info, request, ierror)
       TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
       TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
       INTEGER, INTENT(IN) :: sendcount, recvcount
       TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
       TYPE(MPI_Comm), INTENT(IN) :: comm
       TYPE(MPI_Info), INTENT(IN) :: info
       TYPE(MPI_Request), INTENT(OUT) :: request
       INTEGER, OPTIONAL, INTENT(OUT) :: ierror

MPIX_Alltoallv_init

MPIX_Alltoallv_init(sendbuf, sendcounts, sdispls, sendtype, recvbuf,
          recvcounts, rdispls, recvtype, comm, info, request, ierror)
       TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
       TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
       INTEGER, INTENT(IN), ASYNCHRONOUS :: sendcounts(*), sdispls(*),
       recvcounts(*), rdispls(*)
       TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
       TYPE(MPI_Comm), INTENT(IN) :: comm
       TYPE(MPI_Info), INTENT(IN) :: info
       TYPE(MPI_Request), INTENT(OUT) :: request
       INTEGER, OPTIONAL, INTENT(OUT) :: ierror

MPIX_Alltoallw_init

MPIX_Alltoallw_init(sendbuf, sendcounts, sdispls, sendtypes, recvbuf,
          recvcounts, rdispls, recvtypes, comm, info, request, ierror)
       TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
       TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
       INTEGER, INTENT(IN), ASYNCHRONOUS :: sendcounts(*), sdispls(*),
       recvcounts(*), rdispls(*)
       TYPE(MPI_Datatype), INTENT(IN), ASYNCHRONOUS :: sendtypes(*),
       recvtypes(*)
       TYPE(MPI_Comm), INTENT(IN) :: comm
       TYPE(MPI_Info), INTENT(IN) :: info
       TYPE(MPI_Request), INTENT(OUT) :: request
       INTEGER, OPTIONAL, INTENT(OUT) :: ierror

again with the w: sendtypes(*) and recvtypes(*) both get ASYNCHRONOUS on the type β€” she's got layers, she's got INTENT(IN), ASYNCHRONOUS on the same line, she's that girl πŸ”₯

MPIX_Barrier_init

MPIX_Barrier_init(comm, info, request, ierror)
       TYPE(MPI_Comm), INTENT(IN) :: comm
       TYPE(MPI_Info), INTENT(IN) :: info
       TYPE(MPI_Request), INTENT(OUT) :: request
       INTEGER, OPTIONAL, INTENT(OUT) :: ierror

four args, fully typed, zero buffers. the clean girl aesthetic of collective ops 🌸 and yes ierror is OPTIONAL β€” she's optional in every single one of these, that's not a typo, that's a lifestyle.

MPIX_Bcast_init

MPIX_Bcast_init(buffer, count, datatype, root, comm, info, request,
          ierror)
       TYPE(*), DIMENSION(..), ASYNCHRONOUS :: buffer
       INTEGER, INTENT(IN) :: count, root
       TYPE(MPI_Datatype), INTENT(IN) :: datatype
       TYPE(MPI_Comm), INTENT(IN) :: comm
       TYPE(MPI_Info), INTENT(IN) :: info
       TYPE(MPI_Request), INTENT(OUT) :: request
       INTEGER, OPTIONAL, INTENT(OUT) :: ierror

quick thing to clock 🫢: buffer here is just TYPE(*), DIMENSION(..), ASYNCHRONOUS β€” no INTENT(IN), because bcast writes into it for non-root ranks. the sendbufs in the lists above all have INTENT(IN), this one doesn't. it's giving "I contain multitudes" πŸ’œ

MPIX_Exscan_init

MPIX_Exscan_init(sendbuf, recvbuf, count, datatype, op, comm, info,
          request, ierror)
       TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
       TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
       INTEGER, INTENT(IN) :: count
       TYPE(MPI_Datatype), INTENT(IN) :: datatype
       TYPE(MPI_Op), INTENT(IN) :: op
       TYPE(MPI_Comm), INTENT(IN) :: comm
       TYPE(MPI_Info), INTENT(IN) :: info
       TYPE(MPI_Request), INTENT(OUT) :: request
       INTEGER, OPTIONAL, INTENT(OUT) :: ierror

and that's where this part wraps the mpi_f08 roster β€” but we are so not done, bestie, because there's still a whole MPIX_*_init situation to finish and you already know there's more coming πŸ‘‘βœ¨

       MPIX_Gather_init(sendbuf, sendcount, sendtype, recvbuf,
                 recvcount, recvtype, root, comm, info, request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN) :: sendcount, recvcount, root
            TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Gatherv_init(sendbuf, sendcount, sendtype, recvbuf, recvcounts,
                 displs, recvtype, root, comm, info, request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN) :: sendcount, root
            INTEGER, INTENT(IN), ASYNCHRONOUS :: recvcounts(*), displs(*)
            TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Reduce_init(sendbuf, recvbuf, count, datatype, op, root, comm,
                 info, request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN) :: count, root
            TYPE(MPI_Datatype), INTENT(IN) :: datatype
            TYPE(MPI_Op), INTENT(IN) :: op
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Reduce_scatter_init(sendbuf, recvbuf, recvcounts, datatype, op,
                 comm, info, request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN), ASYNCHRONOUS :: recvcounts(*)
            TYPE(MPI_Datatype), INTENT(IN) :: datatype
            TYPE(MPI_Op), INTENT(IN) :: op
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Reduce_scatter_block_init(sendbuf, recvbuf, recvcount, datatype,
                 op, comm, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN) :: recvcount
            TYPE(MPI_Datatype), INTENT(IN) :: datatype
            TYPE(MPI_Op), INTENT(IN) :: op
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Reduce_scatter_block_init(sendbuf, recvbuf, recvcount, datatype, op,
                 comm, info, request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN) :: recvcount
            TYPE(MPI_Datatype), INTENT(IN) :: datatype
            TYPE(MPI_Op), INTENT(IN) :: op
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Scan_init(sendbuf, recvbuf, count, datatype, op, comm, info,
                 request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN) :: count
            TYPE(MPI_Datatype), INTENT(IN) :: datatype
            TYPE(MPI_Op), INTENT(IN) :: op
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Scatter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount,
                 recvtype, root, comm, info, request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN) :: sendcount, recvcount, root
            TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Scatterv_init(sendbuf, sendcounts, displs, sendtype, recvbuf,
                 recvcount, recvtype, root, comm, info, request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN), ASYNCHRONOUS :: sendcounts(*), displs(*)
            INTEGER, INTENT(IN) :: recvcount, root
            TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Neighbor_allgather_init(sendbuf, sendcount, sendtype, recvbuf,
                 recvcount, recvtype, comm, info, request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN) :: sendcount, recvcount
            TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Neighbor_allgatherv_init(sendbuf, sendcount, sendtype, recvbuf,
                 recvcounts, displs, recvtype, comm, info, request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN) :: sendcount
            INTEGER, INTENT(IN), ASYNCHRONOUS :: recvcounts(*), displs(*)
            TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Neighbor_alltoall_init(sendbuf, sendcount, sendtype, recvbuf,
                 recvcount, recvtype, comm, info, request, ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN) :: sendcount, recvcount
            TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Neighbor_alltoallv_init(sendbuf, sendcounts, sdispls, sendtype,
                 recvbuf, recvcounts, rdispls, recvtype, comm, info, request,
                 ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN), ASYNCHRONOUS :: sendcounts(*), sdispls(*),
            recvcounts(*), rdispls(*)
            TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

       MPIX_Neighbor_alltoallw_init(sendbuf, sendcounts, sdispls, sendtypes,
                 recvbuf, recvcounts, rdispls, recvtypes, comm, info, request,
                 ierror)
            TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
            TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
            INTEGER, INTENT(IN), ASYNCHRONOUS :: sendcounts(*), recvcounts(*)
            INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN), ASYNCHRONOUS ::
            sdispls(*), rdispls(*)
            TYPE(MPI_Datatype), INTENT(IN), ASYNCHRONOUS :: sendtypes(*),
            recvtypes(*)
            TYPE(MPI_Comm), INTENT(IN) :: comm
            TYPE(MPI_Info), INTENT(IN) :: info
            TYPE(MPI_Request), INTENT(OUT) :: request
            INTEGER, OPTIONAL, INTENT(OUT) :: ierror

Okay so that was a lot of signatures, but like β€” bestie β€” that's the whole point πŸ’… every single MPIX_*_init girlie gets her moment, and they all take the same basic shape so honestly once you've read one you've read them all. Slay.


✨ DESCRIPTION ✨

Okay so like, what does this actually do? πŸŽ€

It creates a persistent communication request for a collective operation or neighborhood collective operation. That's the whole vibe. You're not sending anything yet β€” you're just setting up the request so it's ready to go. Iconic behavior, honestly.

Now for the lore πŸ”₯: as of Nov. 2018, the feature of persistent collective communication operations and persistent collective neighborhood communication operations is planned to be included in the next MPI Standard after MPI-3.1.

Bestie please read this part!! This is draft territory, okay? Like the standard literally hasn't landed yet, so don't @ me if things shift.

The relevant issue thread, in all its glory:

https://github.com/mpi-forum/mpi-issues/issues/25

Open MPI implements 2018 Draft Specification of the MPI standard shown in the following URL. Go read it if you're that kind of girl (respect, honestly 🫢):

https://www.mpi-forum.org/docs/drafts/mpi-2018-draft-report.pdf

And here's the part where I hold your hand: the interface may still change in the standard. That's the whole reason for the MPIX_ prefix instead of MPI_ on these request creation routines. The X is literally a little "this is provisional, babes" flag 🚩 β€” not a permanent name, not a typo, not me being cute.

To start, complete, and free the created request? You just use the usual MPI routines (MPI_Start etc.). No new lifecycle, no special dance, no cap. Your existing muscle memory still eats πŸ’…

Future versions of Open MPI will switch to the MPI_ prefix and will not require the C header file mpi-ext.h, the Fortran modules mpi_ext and mpi_f08_ext, and the Fortran header file mpif-ext.h once the MPI Standard which includes this feature is published.

So like β€” those extra headers and modules exist because we're living in the draft era. When the standard officially drops, they pack up and leave. Until then, you need them. Noted and memorized πŸ“βœ¨


🌸 EXAMPLE 🌸

Here's the moment you've been waiting for β€” a real live snippet, looking all main character energy:

    MPI_Request req;
    MPIX_Barrier_init(MPI_COMM_WORLD, MPI_INFO_NULL, &req);
    MPI_Start(&req);
    MPI_Wait(&req, MPI_STATUS_IGNORE);
    MPI_Request_free(&req);

See? Init it, start it, wait on it, free it. Four little lines and you're done. It's giving effortless. The way that MPI_Request_free(&req) at the end is lowkey the most important part though β€” don't ghost your requests, bestie 😭


πŸ’– SEE ALSO πŸ’–

Go off, read these too, they're all in the same friend group:

  • MPI_Start
  • MPI_Startall
  • MPI_Request_free

And that's the whole page, bestie!! πŸ¦‹ No cap, you made it to the end of an extremely long man page and I'm so proud. This one came from the gitclone source tree, version Unreleased developer copy, page MPIX_Barrier_init(3) β€” so like, yeah, developer copy, meaning it's the ✨live from the source✨ edition. Handle with care and go start some requests responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from
  • arch rolling: nvhpc-comm-libs 26.9-1 Β· LicenseRef-NVIDIA-HPC-SDK
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms