Skip to content

Commit

Permalink
Merge pull request #11 from jedwards4b/master
Browse files Browse the repository at this point in the history
add mpi_in_place to mpi_allreduce, add return code to mpi_info_create
  • Loading branch information
rloy committed Apr 22, 2015
2 parents f538fd5 + c168dc0 commit 3a61862
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mpi-serial/collective.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ FC_FUNC( mpi_allreduce , MPI_ALLREDUCE )
int MPI_Allreduce(void* sendbuf, void* recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
{
if (sendbuf==MPI_IN_PLACE)
return(MPI_SUCCESS);

copy_data2(sendbuf, count, datatype, recvbuf, count, datatype);
// memcpy(recvbuf,sendbuf,count * datatype);

Expand Down
17 changes: 17 additions & 0 deletions mpi-serial/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ int MPI_Info_create(MPI_Info *info)
{
/* For now, we aren't storing anything, so don't bother with a real handle */
*info=0;
return 0;
}


Expand All @@ -34,3 +35,19 @@ int MPI_Info_set(MPI_Info info, char *key, char *value)
/* for now, don't bother storing anything */
return(MPI_SUCCESS);
}

/***/

FC_FUNC( mpi_info_free , MPI_INFO_FREE ) (int *info, int *ierror)
{
*ierror=MPI_Info_free(info);
}



int MPI_Info_free(MPI_Info *info)
{
/* For now, we aren't storing anything, so don't bother with a real handle */
*info=0;
return 0;
}

0 comments on commit 3a61862

Please sign in to comment.