Skip to content

Commit

Permalink
More MPI functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jussienko committed Sep 14, 2021
1 parent 02b123d commit 0d8aa9c
Showing 1 changed file with 115 additions and 0 deletions.
115 changes: 115 additions & 0 deletions docs/mpi-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,54 @@ int MPI_Waitall(int count, MPI_Request *array_of_requests, MPI_Status *array_of_
int MPI_Cart_create(MPI_Comm old_comm, int ndims, int *dims, int *periods, int reorder,
MPI_Comm *comm_cart)

int MPI_Dims_create(int ntasks, int ndims, int *dims);

int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdim, int *coords)

int MPI_Cart_rank(MPI_Comm comm, int *coords, int rank)

int MPI_Cart_shift( MPI_Comm comm, int direction, int displ, int *low, int *high )
```
# C interfaces for persistent communication
```c
int MPI_Send_init(void *buf, int count, MPI_Datatype datatype, int dest, int tag,
MPI_Comm comm, MPI_Request *request )
int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int tag,
MPI_Comm comm, MPI_Request *request )
int MPI_Start(MPI_Request *request)
int MPI_Startall(int count, MPI_Request *array_of_requests);
```

# C interfaces for neighborhood collectives

```c
int MPI_Neighbor_allgather(void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int recvcount, MPI_datatype recvtype, MPI_Comm comm);

int MPI_Neighbor_allgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int* recvcounts, int* displs, MPI_datatype recvtype,
MPI_Comm comm);

int MPI_Neighbor_alltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int recvcount, MPI_datatype recvtype,
MPI_Comm comm);

int MPI_Neighbor_alltoallv(void* sendbuf, int* sendcounts, int* senddispls, MPI_Datatype sendtype,
void* recvbuf, int* recvcounts, int* recvdispls, MPI_datatype recvtype,
MPI_Comm comm);

int MPI_Neighbor_alltoallw(void* sendbuf, int* sendcounts, int* senddispls, MPI_Datatype* sendtypes,
void* recvbuf, int* recvcounts, int* recvdispls, MPI_datatype* recvtypes,
MPI_Comm comm);

```
# C interfaces for datatype routines
```c
Expand Down Expand Up @@ -496,6 +537,9 @@ mpi_cart_create(old_comm, ndims, dims, periods, reorder, comm_cart, ierror)
type(mpi_comm) :: old_comm, comm_cart
logical :: reorder, periods(:)
mpi_dims_create(ntasks, ndims, dims, ierror)
integer :: ntasks, ndims, dims(:), ierror
mpi_cart_coords(comm, rank, maxdim, coords, ierror)
integer :: rank, maxdim, coords(:), ierror
type(mpi_comm) :: comm
Expand All @@ -509,6 +553,77 @@ mpi_cart_shift(comm, direction, displ, low, high, ierror)
type(mpi_comm) :: comm
```

# Fortran interfaces for persistent communication

<small>
```fortran
mpi_send_init(buf, count, datatype, dest, tag, comm, request,ierror)
<type> :: buf(*)
integer :: count, dest, tag, ierror
type(mpi_datatype) :: datatype
type(mpi_request) :: request
type(mpi_comm) :: comm
mpi_recv_init(buf, count, datatype, source, tag, comm, request,ierror)
<type> :: buf(*)
integer :: count, source, tag, ierror
type(mpi_datatype) :: datatype
type(mpi_request) :: request
type(mpi_comm) :: comm
mpi_start(request, ierror)
integer :: ierror
type(mpi_request) :: request
mpi_startall(count, array_of_requests, ierror)
integer :: count, ierror
type(mpi_request) :: array_of_requests(:)
```
</small>

# Fortran interfaces for neighborhood collectives

```fortran
mpi_neighbor_allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror)
<type> :: sendbuf(*), recvbuf(*)
integer :: sendcount, recvcount, ierror
type(mpi_datatype) :: sendtype, recvtype
type(mpi_comm) :: comm
mpi_neighbor_allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, &
comm, ierror)
<type> :: sendbuf(*), recvbuf(*)
integer :: sendcount, recvcounts(:), displs(:), ierror
type(mpi_datatype) :: sendtype, recvtype
type(mpi_comm) :: comm
mpi_neighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror)
<type> :: sendbuf(*), recvbuf(*)
integer :: sendcount, recvcount, ierror
type(mpi_datatype) :: sendtype, recvtype
type(mpi_comm) :: comm
```

# Fortran interfaces for neighborhood collectives

```fortran
mpi_neighbor_alltoallv(sendbuf, sendcounts, sendtype, senddispls, &
recvbuf, recvcounts, recvdispls, recvtype, comm, ierror)
<type> :: sendbuf(*), recvbuf(*)
integer :: sendcounts(:), recvcounts(:), senddispls(:), recvdispls(:), ierror
type(mpi_datatype) :: sendtype, recvtype
type(mpi_comm) :: comm
mpi_neighbor_alltoallw(sendbuf, sendcounts, sendtypes, senddispls, &
recvbuf, recvcounts, recvdispls, recvtypes, comm, ierror)
<type> :: sendbuf(*), recvbuf(*)
integer :: sendcounts(:), recvcounts(:), senddispls(:), recvdispls(:), ierror
type(mpi_datatype) :: sendtypes(:), recvtypes(:)
type(mpi_comm) :: comm
```


# Fortran interfaces for datatype routines

Expand Down

0 comments on commit 0d8aa9c

Please sign in to comment.