Skip to content

Commit

Permalink
Added stub code for MPI_Intercomm_merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Katetc committed Jun 3, 2016
1 parent 41ffe22 commit d757b65
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ SRCS_C = mpi.c \
handles.c \
comm.c \
error.c \
ic_merge.c \
group.c \
time.c \
pack.c \
Expand Down
15 changes: 15 additions & 0 deletions ic_merge.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

#include "mpiP.h"

/*
* MPI_Intercomm_merge - Creates an intracommunicator from an intercommunicator
* This is just a stub for now to support mpi function calls even in Serial
* applications. In the case of a serial program, this function is a no-op and
* only ever returns MPI_SUCCESS
*/

int MPI_Intercomm_merge( MPI_Comm intercomm, int high, MPI_Comm *newintracomm )
{
newintracomm = (MPI_Comm *)intercomm;
return(MPI_SUCCESS);
}
3 changes: 2 additions & 1 deletion mpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ typedef int MPI_Info; /* handle */
extern int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader,
MPI_Comm peer_comm, int remote_leader,
int tag, MPI_Comm *newintercomm);

extern int MPI_Intercomm_merge(MPI_Comm intercomm, int high,
MPI_Comm *newintercomm);
extern int MPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims,
int *periods, int reorder, MPI_Comm *comm_cart);
extern int MPI_Cart_get(MPI_Comm comm, int maxdims, int *dims,
Expand Down

0 comments on commit d757b65

Please sign in to comment.