int MPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcounts[], int displs[], MPI_Datatype recvtype, int root, MPI_Comm comm) { int i, size, err; MEMCHECKER( int rank; ptrdiff_t ext; size = ompi_comm_remote_size(comm); rank = ompi_comm_rank(comm); ompi_datatype_type_extent(recvtype, &ext); memchecker_comm(comm); if(OMPI_COMM_IS_INTRA(comm)) { if(ompi_comm_rank(comm) == root) { /* check whether root's send buffer is defined. */ if (MPI_IN_PLACE == sendbuf) { for (i = 0; i < size; i++) { memchecker_call(&opal_memchecker_base_isdefined, (char *)(recvbuf)+displs[i]*ext, recvcounts[i], recvtype); } } else { memchecker_datatype(sendtype); memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); } memchecker_datatype(recvtype); /* check whether root's receive buffer is addressable. */ for (i = 0; i < size; i++) { memchecker_call(&opal_memchecker_base_isaddressable, (char *)(recvbuf)+displs[i]*ext, recvcounts[i], recvtype); } } else { memchecker_datatype(sendtype); /* check whether send buffer is defined on other processes. */ memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); } } else { if (MPI_ROOT == root) { memchecker_datatype(recvtype); /* check whether root's receive buffer is addressable. */ for (i = 0; i < size; i++) { memchecker_call(&opal_memchecker_base_isaddressable, (char *)(recvbuf)+displs[i]*ext, recvcounts[i], recvtype); } } else if (MPI_PROC_NULL != root) { memchecker_datatype(sendtype); /* check whether send buffer is defined. */ memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); } } );
int MPI_Accumulate(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) { int rc; ompi_win_t *ompi_win = (ompi_win_t*) win; MEMCHECKER( memchecker_datatype(origin_datatype); memchecker_datatype(target_datatype); memchecker_call(&opal_memchecker_base_isdefined, origin_addr, origin_count, origin_datatype); );
int MPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) { int rc; ompi_win_t *ompi_win = (ompi_win_t*) win; MEMCHECKER( memchecker_datatype(origin_datatype); memchecker_datatype(target_datatype); memchecker_call(&opal_memchecker_base_isdefined, (void *) origin_addr, origin_count, origin_datatype); );
int MPI_Alltoall(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) { int err; MEMCHECKER( memchecker_datatype(sendtype); memchecker_datatype(recvtype); memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcount, recvtype); memchecker_comm(comm); );
int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) { int i, err, size, count; MEMCHECKER( int rank; int count; size = ompi_comm_size(comm); rank = ompi_comm_rank(comm); for (count = i = 0; i < size; ++i) { if (0 == recvcounts[i]) { count += recvcounts[i]; } } memchecker_comm(comm); memchecker_datatype(datatype); /* check receive buffer of current proccess, whether it's addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcounts[rank], datatype); /* check whether the actual send buffer is defined. */ if(MPI_IN_PLACE == sendbuf) { memchecker_call(&opal_memchecker_base_isdefined, recvbuf, count, datatype); } else { memchecker_call(&opal_memchecker_base_isdefined, sendbuf, count, datatype); } );
int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request) { int err; MEMCHECKER( memchecker_datatype(datatype); memchecker_comm(comm); if(OMPI_COMM_IS_INTRA(comm)) { if(ompi_comm_rank(comm) == root) { /* check whether root's send buffer is defined. */ if (MPI_IN_PLACE == sendbuf) { memchecker_call(&opal_memchecker_base_isdefined, recvbuf, count, datatype); } else { memchecker_call(&opal_memchecker_base_isdefined, sendbuf, count, datatype); } /* check whether root's receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, count, datatype); } else { /* check whether send buffer is defined on other processes. */ memchecker_call(&opal_memchecker_base_isdefined, sendbuf, count, datatype); } } else { if (MPI_ROOT == root) { /* check whether root's receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, count, datatype); } else if (MPI_PROC_NULL != root) { /* check whether send buffer is defined. */ memchecker_call(&opal_memchecker_base_isdefined, sendbuf, count, datatype); } } );
int MPI_Type_get_extent(MPI_Datatype type, MPI_Aint *lb, MPI_Aint *extent) { int rc; MEMCHECKER( memchecker_datatype(type); );
int MPI_Type_delete_attr (MPI_Datatype type, int type_keyval) { int ret; MEMCHECKER( memchecker_datatype(type); );
int MPI_Type_set_name (MPI_Datatype type, const char *type_name) { int length; MEMCHECKER( memchecker_datatype(type); );
int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) { size_t sendtype_size, recvtype_size; int err; MEMCHECKER( memchecker_comm(comm); if (MPI_IN_PLACE != sendbuf) { memchecker_datatype(sendtype); memchecker_call(&opal_memchecker_base_isdefined, (void *)sendbuf, sendcount, sendtype); } memchecker_datatype(recvtype); memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcount, recvtype); );
int MPI_Type_free(MPI_Datatype *type) { int rc; MEMCHECKER( memchecker_datatype(*type); );
int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) { int err; MEMCHECKER( memchecker_datatype(datatype); memchecker_comm(comm); if (OMPI_COMM_IS_INTRA(comm)) { if (ompi_comm_rank(comm) == root) { /* check whether root's send buffer is defined. */ memchecker_call(&opal_memchecker_base_isdefined, buffer, count, datatype); } /* check whether receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, buffer, count, datatype); } else { if (MPI_ROOT == root) { /* check whether root's send buffer is defined. */ memchecker_call(&opal_memchecker_base_isdefined, buffer, count, datatype); } else if (MPI_PROC_NULL != root) { /* check whether receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, buffer, count, datatype); } } );
int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status) { ompi_request_t* req; int rc = MPI_SUCCESS; SPC_RECORD(OMPI_SPC_SENDRECV, 1); MEMCHECKER( memchecker_datatype(sendtype); memchecker_datatype(recvtype); memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); memchecker_comm(comm); );
int MPI_Scatterv(void *sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) { int i, size, err; MEMCHECKER( ptrdiff_t ext; size = ompi_comm_size(comm); ompi_ddt_type_extent(recvtype, &ext); memchecker_comm(comm); if(OMPI_COMM_IS_INTRA(comm)) { if(ompi_comm_rank(comm) == root) { memchecker_datatype(sendtype); /* check whether root's send buffer is defined. */ for (i = 0; i < size; i++) { memchecker_call(&opal_memchecker_base_isdefined, (char *)(sendbuf)+displs[i]*ext, sendcounts[i], sendtype); } if(MPI_IN_PLACE != recvbuf) { memchecker_datatype(recvtype); /* check whether receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcount, recvtype); } } else { memchecker_datatype(recvtype); /* check whether receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcount, recvtype); } } else { if(MPI_ROOT == root) { memchecker_datatype(sendtype); /* check whether root's send buffer is defined. */ for (i = 0; i < size; i++) { memchecker_call(&opal_memchecker_base_isdefined, (char *)(sendbuf)+displs[i]*ext, sendcounts[i], sendtype); } } else if (MPI_PROC_NULL != root) { /* check whether receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcount, recvtype); } } );
int MPI_File_iread_shared(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request) { int rc; MEMCHECKER( memchecker_datatype(datatype); );
int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, const char *datarep, MPI_Info info) { int rc; MEMCHECKER( memchecker_datatype(etype); );
int MPI_File_read_shared(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) { int rc; MEMCHECKER( memchecker_datatype(datatype); );
int MPI_Pack_external_size(const char datarep[], int incount, MPI_Datatype datatype, MPI_Aint *size) { int rc = MPI_SUCCESS; MEMCHECKER( memchecker_datatype(datatype); );
int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, MPI_Aint *extent) { int rc; MEMCHECKER( memchecker_datatype(datatype); );
int MPI_File_read_all_begin(MPI_File fh, void *buf, int count, MPI_Datatype datatype) { int rc; MEMCHECKER( memchecker_datatype(datatype); );
int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request) { int rc; MEMCHECKER( memchecker_datatype(datatype); );
int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) { int err; MEMCHECKER( int rank; ptrdiff_t ext; rank = ompi_comm_rank(comm); ompi_datatype_type_extent(recvtype, &ext); memchecker_comm(comm); if(OMPI_COMM_IS_INTRA(comm)) { if(ompi_comm_rank(comm) == root) { /* check whether root's send buffer is defined. */ if (MPI_IN_PLACE == sendbuf) { memchecker_call(&opal_memchecker_base_isdefined, (char *)(recvbuf)+rank*ext, recvcount, recvtype); } else { memchecker_datatype(sendtype); memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); } memchecker_datatype(recvtype); /* check whether root's receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcount, recvtype); } else { memchecker_datatype(sendtype); /* check whether send buffer is defined on other processes. */ memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); } } else { if (MPI_ROOT == root) { memchecker_datatype(recvtype); /* check whether root's receive buffer is addressable. */ memchecker_call(&opal_memchecker_base_isaddressable, recvbuf, recvcount, recvtype); } else if (MPI_PROC_NULL != root) { memchecker_datatype(sendtype); /* check whether send buffer is defined. */ memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype); } } );
int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) { int rc; MEMCHECKER( memchecker_datatype(datatype); );
MPI_Fint MPI_Type_c2f(MPI_Datatype datatype) { OPAL_CR_NOOP_PROGRESS(); MEMCHECKER( memchecker_datatype(datatype); );
int MPI_File_write_ordered_begin(MPI_File fh, const void *buf, int count, MPI_Datatype datatype) { int rc; MEMCHECKER( memchecker_datatype(datatype); memchecker_call(&opal_memchecker_base_isdefined, buf, count, datatype); );
int MPI_Bsend(void *buf, int count, MPI_Datatype type, int dest, int tag, MPI_Comm comm) { int rc = MPI_SUCCESS; MEMCHECKER( memchecker_datatype(type); memchecker_call(&opal_memchecker_base_isdefined, buf, count, type); memchecker_comm(comm); );
int MPI_File_write(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status) { int rc; MEMCHECKER( memchecker_datatype(datatype); memchecker_call(&opal_memchecker_base_isdefined, buf, count, datatype); );
int MPI_Irecv(void *buf, int count, MPI_Datatype type, int source, int tag, MPI_Comm comm, MPI_Request *request) { int rc = MPI_SUCCESS; MEMCHECKER( memchecker_datatype(type); memchecker_comm(comm); );
int MPI_Type_ub(MPI_Datatype mtype, MPI_Aint *ub) { MPI_Aint lb; MPI_Aint extent; int status; MEMCHECKER( memchecker_datatype(mtype); );
int MPI_Pack_external_size(char *datarep, int incount, MPI_Datatype datatype, MPI_Aint *size) { ompi_convertor_t local_convertor; size_t length; MEMCHECKER( memchecker_datatype(datatype); );