1 /*
2 (C) 2004 by Argonne National Laboratory.
3 See COPYRIGHT in top-level directory.
4 */
5 #include "collchk.h"
6
MPI_Comm_split(MPI_Comm comm,int color,int key,MPI_Comm * newcomm)7 int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm)
8 {
9 int g2g = 1;
10 char call[COLLCHK_SM_STRLEN];
11
12 sprintf(call, "COMM_SPLIT");
13
14 /* Check if init has been called */
15 g2g = CollChk_is_init();
16
17 if(g2g) {
18 /* check for call consistancy */
19 CollChk_same_call(comm, call);
20
21 /* make the call */
22 return PMPI_Comm_split(comm, color, key, newcomm);
23 }
24 else {
25 /* init not called */
26 return CollChk_err_han("MPI_Init() has not been called!",
27 COLLCHK_ERR_NOT_INIT, call, comm);
28 }
29 }
30