Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cart.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int FC_FUNC( mpi_cart_create , MPI_CART_CREATE )
}


int MPI_Cart_create( MPI_Comm comm_old, int ndims, int *dims, int *periods,
int MPI_Cart_create( MPI_Comm comm_old, int ndims, const int dims[], const int periods[],
int reorder, MPI_Comm *comm_cart)
{
int i;
Expand Down Expand Up @@ -54,8 +54,8 @@ int FC_FUNC( mpi_cart_get , MPI_CART_GET )
}


int MPI_Cart_get(MPI_Comm comm, int maxdims, int *dims,
int *periods, int *coords)
int MPI_Cart_get(MPI_Comm comm, int maxdims, int dims[],
int periods[], int coords[])
{
int i;
for (i=0;i<maxdims;i++)
Expand Down Expand Up @@ -84,7 +84,7 @@ int FC_FUNC( mpi_cart_coords , MPI_CART_COORDS)
}


int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int *coords)
int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[])
{
int i;

Expand Down Expand Up @@ -116,7 +116,7 @@ int FC_FUNC( mpi_dims_create , MPI_DIMS_CREATE )
}


int MPI_Dims_create(int nnodes, int ndims, int *dims)
int MPI_Dims_create(int nnodes, int ndims, int dims[])
{
int i;

Expand Down
42 changes: 21 additions & 21 deletions collective.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int FC_FUNC( mpi_gather , MPI_GATHER )
}


int MPI_Gather(void* sendbuf, int sendcount, MPI_Datatype sendtype,
int MPI_Gather(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm)
{
Expand Down Expand Up @@ -104,8 +104,8 @@ int FC_FUNC( mpi_gatherv , MPI_GATHERV )
}


int MPI_Gatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int *recvcounts, int *displs,
int MPI_Gatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, const int recvcounts[], const int displs[],
MPI_Datatype recvtype, int root, MPI_Comm comm)
{
int offset;
Expand Down Expand Up @@ -151,7 +151,7 @@ int FC_FUNC( mpi_allgather , MPI_ALLGATHER )
}


int MPI_Allgather(void* sendbuf, int sendcount, MPI_Datatype sendtype,
int MPI_Allgather(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int recvcount, MPI_Datatype recvtype,
MPI_Comm comm)
{
Expand Down Expand Up @@ -182,8 +182,8 @@ int FC_FUNC( mpi_allgatherv , MPI_ALLGATHERV )
}


int MPI_Allgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, int *recvcounts, int *displs,
int MPI_Allgatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype,
void* recvbuf, const int recvcounts[], const int displs[],
MPI_Datatype recvtype, MPI_Comm comm)
{
int offset;
Expand Down Expand Up @@ -222,7 +222,7 @@ int FC_FUNC( mpi_scatter, MPI_SCATTER )
return MPI_SUCCESS;
}

int MPI_Scatter(void * sendbuf, int sendcount, MPI_Datatype sendtype,
int MPI_Scatter(const void * sendbuf, int sendcount, MPI_Datatype sendtype,
void * recvbuf, int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm)
{
Expand Down Expand Up @@ -262,7 +262,7 @@ int FC_FUNC( mpi_scatterv , MPI_SCATTERV )



int MPI_Scatterv(void* sendbuf, int *sendcounts, int *displs,
int MPI_Scatterv(const void* sendbuf, const int sendcounts[], const int displs[],
MPI_Datatype sendtype, void* recvbuf, int recvcount,
MPI_Datatype recvtype, int root, MPI_Comm comm)
{
Expand Down Expand Up @@ -307,7 +307,7 @@ int FC_FUNC( mpi_reduce , MPI_REDUCE )



int MPI_Reduce(void* sendbuf, void* recvbuf, int count,
int MPI_Reduce(const void* sendbuf, void* recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)

{
Expand Down Expand Up @@ -338,7 +338,7 @@ int FC_FUNC( mpi_allreduce , MPI_ALLREDUCE )
}


int MPI_Allreduce(void* sendbuf, void* recvbuf, int count,
int MPI_Allreduce(const void* sendbuf, void* recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
{
if (sendbuf==MPI_IN_PLACE)
Expand Down Expand Up @@ -369,7 +369,7 @@ int FC_FUNC(mpi_reduce_scatter, MPI_REDUCE_SCATTER)
}


int MPI_Reduce_scatter(void* sendbuf, void* recvbuf, int *recvcounts,
int MPI_Reduce_scatter(const void* sendbuf, void* recvbuf, const int recvcounts[],
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
{
copy_data2(sendbuf, recvcounts[0], datatype, recvbuf, recvcounts[0], datatype);
Expand All @@ -392,7 +392,7 @@ int FC_FUNC( mpi_scan , MPI_SCAN)



int MPI_Scan(void* sendbuf, void* recvbuf, int count,
int MPI_Scan(const void* sendbuf, void* recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm )
{
copy_data2(sendbuf, count, datatype, recvbuf, count, datatype);
Expand All @@ -415,7 +415,7 @@ int FC_FUNC( mpi_alltoall , MPI_ALLTOALL )
}


int MPI_Alltoall(void *sendbuf, int sendcount, MPI_Datatype sendtype,
int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype,
MPI_Comm comm)
{
Expand All @@ -442,10 +442,10 @@ int FC_FUNC( mpi_alltoallv , MPI_ALLTOALLV )
return MPI_SUCCESS;
}

int MPI_Alltoallv(void *sendbuf, int *sendcounts,
int *sdispls, MPI_Datatype sendtype,
void *recvbuf, int *recvcounts,
int *rdispls, MPI_Datatype recvtype,
int MPI_Alltoallv(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)

{
Expand Down Expand Up @@ -488,10 +488,10 @@ int FC_FUNC( mpi_alltoallw , MPI_ALLTOALLW )
}


int MPI_Alltoallw(void *sendbuf, int *sendcounts,
int *sdispls, MPI_Datatype *sendtypes,
void *recvbuf, int *recvcounts,
int *rdispls, MPI_Datatype *recvtypes,
int MPI_Alltoallw(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)

{
Expand Down
6 changes: 3 additions & 3 deletions copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
* fix this issue later...
*/

extern int Pcopy_data2(void *source, int src_count, Datatype src_type,
extern int Pcopy_data2(const void *source, int src_count, Datatype src_type,
void *dest, int dest_count, Datatype dest_type);


int copy_data2(void *source, int src_count, MPI_Datatype src_type,
int copy_data2(const void *source, int src_count, MPI_Datatype src_type,
void *dest, int dest_count, MPI_Datatype dest_type)
{
Datatype src_ptr = *(Datatype*) mpi_handle_to_datatype(src_type);
Expand All @@ -39,7 +39,7 @@ int copy_data2(void *source, int src_count, MPI_Datatype src_type,



int Pcopy_data2(void *source, int src_count, Datatype src_type,
int Pcopy_data2(const void *source, int src_count, Datatype src_type,
void *dest, int dest_count, Datatype dest_type)
{
int i;
Expand Down
4 changes: 2 additions & 2 deletions group.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int FC_FUNC( mpi_group_incl, MPI_GROUP_INCL )
}


int MPI_Group_incl(MPI_Group group, int n, int *ranks, MPI_Group *newgroup)
int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup)
{

if (group==MPI_GROUP_NULL)
Expand Down Expand Up @@ -211,7 +211,7 @@ int FC_FUNC( mpi_group_translate_ranks, MPI_GROUP_TRANSLATE_RANKS )



int MPI_Group_translate_ranks(MPI_Group group1, int n, int *ranks1,
int MPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[],
MPI_Group group2, int *ranks2)
{
int i;
Expand Down
2 changes: 1 addition & 1 deletion info.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int FC_FUNC( mpi_info_set , MPI_INFO_SET ) (int *info, char *key, char *value, i
}


int MPI_Info_set(MPI_Info info, char *key, char *value)
int MPI_Info_set(MPI_Info info, const char *key, const char *value)
{
/* for now, don't bother storing anything */
return(MPI_SUCCESS);
Expand Down
8 changes: 4 additions & 4 deletions mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ int MPI_Init_thread(int *argc, char **argv[], int required, int *provided)
return MPI_Init(argc, argv);
}

int MPI_Init(int *argc, char **argv[])
int MPI_Init(int *argc, char ***argv)
{
MPI_Comm my_comm_world;

Expand Down Expand Up @@ -333,10 +333,10 @@ void FC_FUNC( mpi_get_library_version, MPI_GET_LIBRARY_VERSION) (char *version,



int MPI_Get_Version(int *mpi_vers, int *mpi_subvers)
int MPI_Get_Version(int *version, int *subversion)
{
*mpi_vers = 1;
*mpi_subvers = 0;
*version = 1;
*subversion = 0;

return (MPI_SUCCESS);
}
Expand Down
Loading