AdjoinableMPI
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
modified.c File Reference
#include <stdlib.h>
#include <assert.h>
#include <mpi.h>
#include "ampi/userIF/modified.h"
Include dependency graph for modified.c:

Go to the source code of this file.

Functions

int AMPI_Init (int *argc, char ***argv)
 
int AMPI_Finalize (int *argc, char ***argv)
 
int AMPI_Buffer_attach (void *buffer, int size)
 
int AMPI_Buffer_detach (void *buffer, int *size)
 
int AMPI_Send (void *buf, int count, MPI_Datatype datatype, int dest, int tag, AMPI_PairedWith pairedWith, MPI_Comm comm)
 
int AMPI_Recv (void *buf, int count, MPI_Datatype datatype, int src, int tag, AMPI_PairedWith pairedWith, MPI_Comm comm, MPI_Status *status)
 
int AMPI_Isend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, AMPI_PairedWith pairedWith, MPI_Comm comm, AMPI_Request *request)
 
int AMPI_Irecv (void *buf, int count, MPI_Datatype datatype, int src, int tag, AMPI_PairedWith pairedWith, MPI_Comm comm, AMPI_Request *request)
 
int AMPI_Bsend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, AMPI_PairedWith pairedWith, MPI_Comm comm)
 
int AMPI_Rsend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, AMPI_PairedWith pairedWith, MPI_Comm comm)
 
int AMPI_Bcast (void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
 
int AMPI_Reduce (void *sbuf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
 
int AMPI_Allreduce (void *sbuf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
 
int AMPI_Wait (AMPI_Request *request, MPI_Status *status)
 
int AMPI_Waitall (int count, AMPI_Request requests[], MPI_Status statuses[])
 
int AMPI_Awaitall (int count, AMPI_Request requests[], MPI_Status statuses[])
 
int AMPI_Barrier (MPI_Comm comm)
 
int AMPI_Gather (void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPI_Comm comm)
 
int AMPI_Scatter (void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPI_Comm comm)
 
int AMPI_Allgather (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
 
int AMPI_Gatherv (void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int *recvcnts, int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm)
 
int AMPI_Scatterv (void *sendbuf, int *sendcnts, int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPI_Comm comm)
 
int AMPI_Allgatherv (void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int *recvcnts, int *displs, MPI_Datatype recvtype, MPI_Comm comm)
 

Variables

MPI_Datatype AMPI_ADOUBLE_PRECISION
 
MPI_Datatype AMPI_AREAL
 

Function Documentation

int AMPI_Allgather ( void *  sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void *  recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
sendbuf
sendcount
sendtypesee Datatype consistency
recvbuf
recvcount
recvtypesee Datatype consistency
comm
Returns

Definition at line 318 of file modified.c.

int AMPI_Allgatherv ( void *  sendbuf,
int  sendcnt,
MPI_Datatype  sendtype,
void *  recvbuf,
int *  recvcnts,
int *  displs,
MPI_Datatype  recvtype,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
sendbuf
sendcnt
sendtypesee Datatype consistency
recvbuf
recvcnts
displs
recvtypesee Datatype consistency
comm
Returns

Definition at line 373 of file modified.c.

int AMPI_Allreduce ( void *  sbuf,
void *  rbuf,
int  count,
MPI_Datatype  datatype,
MPI_Op  op,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
sbuf
rbuf
count
datatypesee Datatype consistency
op
comm
Returns

Definition at line 228 of file modified.c.

int AMPI_Awaitall ( int  count,
AMPI_Request  requests[],
MPI_Status  statuses[] 
)
Parameters
count
requestssee Request Type
statuses
Returns

Definition at line 272 of file modified.c.

int AMPI_Barrier ( MPI_Comm  comm)

all parameters as in the MPI standard with exceptions as listed

Parameters
comm
Returns

Definition at line 278 of file modified.c.

int AMPI_Bcast ( void *  buf,
int  count,
MPI_Datatype  datatype,
int  root,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
buf
count
datatypesee Datatype consistency
root
comm
Returns

Definition at line 196 of file modified.c.

int AMPI_Bsend ( void *  buf,
int  count,
MPI_Datatype  datatype,
int  dest,
int  tag,
AMPI_PairedWith  pairedWith,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
buf
count
datatypesee Datatype consistency
dest
tag
pairedWithsee Pairings
comm
Returns

Definition at line 156 of file modified.c.

References AMPI_TO_IRECV_WAIT, and AMPI_TO_RECV.

int AMPI_Buffer_attach ( void *  buffer,
int  size 
)

adjoint needs to detach; signature identical to original MPI call

Definition at line 28 of file modified.c.

int AMPI_Buffer_detach ( void *  buffer,
int *  size 
)

adjoint needs to attach; signature identical to original MPI call

Definition at line 35 of file modified.c.

int AMPI_Finalize ( int *  argc,
char ***  argv 
)

adjoint needs to MPI_Init; signature identical to AMPI_Init (adjoint symmetry)

Definition at line 23 of file modified.c.

int AMPI_Gather ( void *  sendbuf,
int  sendcnt,
MPI_Datatype  sendtype,
void *  recvbuf,
int  recvcnt,
MPI_Datatype  recvtype,
int  root,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
sendbuf
sendcnt
sendtypesee Datatype consistency
recvbuf
recvcnt
recvtypesee Datatype consistency
root
comm
Returns

Definition at line 282 of file modified.c.

int AMPI_Gatherv ( void *  sendbuf,
int  sendcnt,
MPI_Datatype  sendtype,
void *  recvbuf,
int *  recvcnts,
int *  displs,
MPI_Datatype  recvtype,
int  root,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
sendbuf
sendcnt
sendtypesee Datatype consistency
recvbuf
recvcnts
displs
recvtypesee Datatype consistency
root
comm
Returns

Definition at line 334 of file modified.c.

int AMPI_Init ( int *  argc,
char ***  argv 
)

adjoint needs to MPI_Finalize; signature identical to original MPI call

Definition at line 18 of file modified.c.

int AMPI_Irecv ( void *  buf,
int  count,
MPI_Datatype  datatype,
int  src,
int  tag,
AMPI_PairedWith  pairedWith,
MPI_Comm  comm,
AMPI_Request request 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
buf
count
datatypesee Datatype consistency
src
tag
pairedWithsee Pairings
comm
requestsee Request Type
Returns

Definition at line 123 of file modified.c.

References AMPI_FROM_BSEND, AMPI_FROM_ISEND_WAIT, AMPI_FROM_ISEND_WAITALL, AMPI_FROM_RSEND, AMPI_FROM_SEND, and AMPI_Request_S::plainRequest.

Referenced by ampi_irecv_().

int AMPI_Isend ( void *  buf,
int  count,
MPI_Datatype  datatype,
int  dest,
int  tag,
AMPI_PairedWith  pairedWith,
MPI_Comm  comm,
AMPI_Request request 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
buf
count
datatypesee Datatype consistency
dest
tag
pairedWithsee Pairings
comm
requestsee Request Type
Returns

Definition at line 94 of file modified.c.

References AMPI_TO_IRECV_WAIT, AMPI_TO_IRECV_WAITALL, AMPI_TO_RECV, and AMPI_Request_S::plainRequest.

Referenced by ampi_isend_().

int AMPI_Recv ( void *  buf,
int  count,
MPI_Datatype  datatype,
int  src,
int  tag,
AMPI_PairedWith  pairedWith,
MPI_Comm  comm,
MPI_Status *  status 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
buf
count
datatypesee Datatype consistency
src
tag
pairedWithsee Pairings
comm
status
Returns

Definition at line 65 of file modified.c.

References AMPI_FROM_BSEND, AMPI_FROM_ISEND_WAIT, AMPI_FROM_ISEND_WAITALL, AMPI_FROM_RSEND, and AMPI_FROM_SEND.

Referenced by ampi_recv_().

int AMPI_Reduce ( void *  sbuf,
void *  rbuf,
int  count,
MPI_Datatype  datatype,
MPI_Op  op,
int  root,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
sbuf
rbuf
count
datatypesee Datatype consistency
op
root
comm
Returns

Definition at line 209 of file modified.c.

int AMPI_Rsend ( void *  buf,
int  count,
MPI_Datatype  datatype,
int  dest,
int  tag,
AMPI_PairedWith  pairedWith,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
buf
count
datatypesee Datatype consistency
dest
tag
pairedWithsee Pairings
comm
Returns

Definition at line 176 of file modified.c.

References AMPI_TO_IRECV_WAIT, and AMPI_TO_RECV.

int AMPI_Scatter ( void *  sendbuf,
int  sendcnt,
MPI_Datatype  sendtype,
void *  recvbuf,
int  recvcnt,
MPI_Datatype  recvtype,
int  root,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
sendbuf
sendcnt
sendtypesee Datatype consistency
recvbuf
recvcnt
recvtypesee Datatype consistency
root
comm
Returns

Definition at line 300 of file modified.c.

int AMPI_Scatterv ( void *  sendbuf,
int *  sendcnts,
int *  displs,
MPI_Datatype  sendtype,
void *  recvbuf,
int  recvcnt,
MPI_Datatype  recvtype,
int  root,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
sendbuf
sendcnts
displs
sendtypesee Datatype consistency
recvbuf
recvcnt
recvtypesee Datatype consistency
root
comm
Returns

Definition at line 354 of file modified.c.

int AMPI_Send ( void *  buf,
int  count,
MPI_Datatype  datatype,
int  dest,
int  tag,
AMPI_PairedWith  pairedWith,
MPI_Comm  comm 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
buf
count
datatypesee Datatype consistency
dest
tag
pairedWithsee Pairings
comm
Returns

Definition at line 42 of file modified.c.

References AMPI_TO_IRECV_WAIT, AMPI_TO_IRECV_WAITALL, and AMPI_TO_RECV.

Referenced by ampi_send_().

int AMPI_Wait ( AMPI_Request request,
MPI_Status *  status 
)

before we start reverse we need to make sure there are no pending requests in our userIF bookkeeping

Definition at line 242 of file modified.c.

References AMPI_Request_S::plainRequest.

Referenced by ampi_wait_().

int AMPI_Waitall ( int  count,
AMPI_Request  requests[],
MPI_Status  statuses[] 
)

all parameters as in the MPI standard with exceptions as listed

Parameters
count
requestssee Request Type
statuses
Returns

Definition at line 253 of file modified.c.

References AMPI_Request_stack::count.

Variable Documentation

MPI_Datatype AMPI_ADOUBLE_PRECISION
MPI_Datatype AMPI_AREAL