diff --git a/maint/gen_coll.py b/maint/gen_coll.py index f92a09a8c65..471a1b50cce 100644 --- a/maint/gen_coll.py +++ b/maint/gen_coll.py @@ -434,6 +434,8 @@ def dump_mpir_impl_persistent(name): dump_split(0, "int MPIR_%s_impl(%s)" % (Name, func_params)) dump_open('{') G.out.append("int mpi_errno = MPI_SUCCESS;") + if not re.match(r'Neighbor_', Name): + G.out.append("int collattr = 0;") G.out.append("") G.out.append("MPIR_Request *req = MPIR_Request_create(MPIR_REQUEST_KIND__PREQUEST_COLL);") G.out.append("MPIR_ERR_CHKANDJUMP(!req, mpi_errno, MPI_ERR_OTHER, \"**nomem\");") @@ -646,12 +648,13 @@ def get_algo_args(args, algo, kind): if 'extra_params' in algo: algo_args += ", " + get_algo_extra_args(algo, kind) + if not re.match(r'i?neighbor', algo['func-commkind']): + algo_args += ', collattr' + if algo['name'].startswith('tsp_'): algo_args += ", *sched_p" elif algo['func-commkind'].startswith('i'): algo_args += ", *sched_p" - elif not algo['func-commkind'].startswith('neighbor_'): - algo_args += ", errflag" return algo_args @@ -660,12 +663,13 @@ def get_algo_params(params, algo): if 'extra_params' in algo: algo_params += ", " + get_algo_extra_params(algo) + if not re.match(r'i?neighbor_', algo['func-commkind']): + algo_params += ', int collattr' + if algo['name'].startswith('tsp_'): algo_params += ", MPIR_TSP_sched_t sched" elif algo['func-commkind'].startswith('i'): algo_params += ", MPIR_Sched_t s" - elif not algo['func-commkind'].startswith('neighbor_'): - algo_params += ", MPIR_Errflag_t errflag" return algo_params @@ -680,9 +684,12 @@ def get_algo_name(algo): def get_func_params(params, name, kind): func_params = params + + if not (name.startswith('neighbor_') or kind == "persistent"): + func_params += ', int collattr' + if kind == "blocking": - if not name.startswith('neighbor_'): - func_params += ", MPIR_Errflag_t errflag" + pass elif kind == "nonblocking": func_params += ", MPIR_Request ** request" elif kind == "persistent": @@ -700,9 +707,11 @@ def get_func_params(params, name, kind): def get_func_args(args, name, kind): func_args = args + if not (name.startswith('neighbor_') or kind == "persistent"): + func_args += ", collattr" + if kind == "blocking": - if not name.startswith('neighbor_'): - func_args += ", errflag" + pass elif kind == "nonblocking": func_args += ", request" elif kind == "persistent": diff --git a/maint/local_python/binding_c.py b/maint/local_python/binding_c.py index 0270a0be0d3..87937381367 100644 --- a/maint/local_python/binding_c.py +++ b/maint/local_python/binding_c.py @@ -1366,9 +1366,14 @@ def push_impl_decl(func, impl_name=None): if func['_impl_param_list']: params = ', '.join(func['_impl_param_list']) if func['dir'] == 'coll': - # block collective use an extra errflag - if not RE.match(r'MPI_(I.*|Neighbor.*|.*_init)$', func['name']): - params = params + ", MPIR_Errflag_t errflag" + if RE.match(r'MPI_(Neighbor.*|Ineighbor.*|.*_init)$', func['name']): + pass + elif RE.match(r'MPI_I\w+', func['name']): + # non-blocking + params = re.sub(r'MPIR_Request', 'int collattr, MPIR_Request', params) + else: + # blocking + params = params + ", int collattr" else: params="void" @@ -1378,9 +1383,6 @@ def push_impl_decl(func, impl_name=None): G.impl_declares.append("int %s(%s);" % (mpir_name, params)) # dump MPIR_Xxx_impl(...) G.impl_declares.append("int %s(%s);" % (impl_name, params)) - if func['dir'] == 'coll': - mpir_name = re.sub(r'^MPIX?_', 'MPIR_', func['name']) - G.impl_declares.append("int %s(%s);" % (mpir_name, params)) def dump_CHECKENUM(var, errname, t, type="ENUM"): val_list = t.split() @@ -1401,6 +1403,15 @@ def dump_body_coll(func): mpir_name = re.sub(r'^MPIX?_', 'MPIR_', func['name']) args = ", ".join(func['_impl_arg_list']) + if RE.match(r'mpi_(i?neighbor_.*|.*_init)$', func['name'], re.IGNORECASE): + pass + elif RE.match(r'mpi_i', func['name'], re.IGNORECASE): + # non-blocking + args = re.sub(r'&request_ptr', 'MPIR_COLL_ATTR_NONE, &request_ptr', args) + else: + # blocking + args += ", MPIR_COLL_ATTR_NONE" + if RE.match(r'MPI_(I.*|.*_init)$', func['name'], re.IGNORECASE): # non-blocking collectives @@ -1411,12 +1422,9 @@ def dump_body_coll(func): G.out.append(" request_ptr = MPIR_Request_create_complete(MPIR_REQUEST_KIND__COLL);") G.out.append("}") G.out.append("*request = request_ptr->handle;") - elif RE.match(r'mpi_neighbor_', func['name'], re.IGNORECASE): - dump_line_with_break("mpi_errno = %s(%s);" % (mpir_name, args)) - dump_error_check("") else: # blocking collectives - dump_line_with_break("mpi_errno = %s(%s, MPIR_ERR_NONE);" % (mpir_name, args)) + dump_line_with_break("mpi_errno = %s(%s);" % (mpir_name, args)) dump_error_check("") def dump_coll_v_swap(func): diff --git a/src/include/mpir_coll.h b/src/include/mpir_coll.h index 52c601a2315..5054090e5a2 100644 --- a/src/include/mpir_coll.h +++ b/src/include/mpir_coll.h @@ -9,6 +9,47 @@ #include "coll_impl.h" #include "coll_algos.h" +/* collective attr bits allocation: + * 0-7: errflag + * 8-15: subcomm type + * 16-23: subcomm index + */ + +#define MPIR_COLL_ATTR_NONE 0 +#define MPIR_COLL_ATTR_GET_ERRFLAG(attr) ((attr) & 0xff) +#define MPIR_COLL_ATTR_GET_SUBCOMM_TYPE(attr) (((attr) >> 8) & 0xff) +#define MPIR_COLL_ATTR_GET_SUBCOMM_INDEX(attr) (((attr) >> 16) & 0xff) + +#define MPIR_COLL_SUBCOMM_TYPE_NONE 0 +#define MPIR_COLL_SUBCOMM_TYPE_CHILD 1 +#define MPIR_COLL_SUBCOMM_TYPE_ROOTS 2 + +#define MPIR_COLL_GET_RANK_SIZE(comm_ptr, collattr, rank_, size_) \ + do { \ + int subcomm_type = MPIR_COLL_ATTR_GET_SUBCOMM_TYPE(collattr); \ + if (subcomm_type) { \ + int subcomm_index = MPIR_COLL_ATTR_GET_SUBCOMM_INDEX(collattr); \ + switch(subcomm_type) { \ + case MPIR_COLL_SUBCOMM_TYPE_CHILD: \ + rank_ = comm_ptr->child_subcomm[subcomm_index].rank; \ + size_ = comm_ptr->child_subcomm[subcomm_index].size; \ + break; \ + case MPIR_COLL_SUBCOMM_TYPE_ROOTS: \ + rank_ = comm_ptr->roots_subcomm[subcomm_index].rank; \ + size_ = comm_ptr->roots_subcomm[subcomm_index].size; \ + break; \ + default: \ + MPIR_Assert(0); \ + rank_ = -1; \ + size_ = 0; \ + } \ + } else { \ + rank_ = (comm_ptr)->rank; \ + size_ = (comm_ptr)->local_size; \ + } \ + } while (0) + + /* During init, not all algorithms are safe to use. For example, the csel * may not have been initialized. We define a set of fallback routines that * are safe to use during init. They are all intra algorithms. @@ -28,40 +69,43 @@ int MPIC_Wait(MPIR_Request * request_ptr); int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status * status); int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag); + MPIR_Comm * comm_ptr, int collattr); int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag, - MPIR_Comm * comm_ptr, MPI_Status * status); + MPIR_Comm * comm_ptr, int collattr, MPI_Status * status); int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag); + MPIR_Comm * comm_ptr, int collattr); int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int source, int recvtag, - MPIR_Comm * comm_ptr, MPI_Status * status, MPIR_Errflag_t errflag); + MPIR_Comm * comm_ptr, MPI_Status * status, int collattr); int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int sendtag, int source, int recvtag, - MPIR_Comm * comm_ptr, MPI_Status * status, MPIR_Errflag_t errflag); + MPIR_Comm * comm_ptr, MPI_Status * status, int collattr); int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_Request ** request, MPIR_Errflag_t errflag); + MPIR_Comm * comm_ptr, MPIR_Request ** request, int collattr); int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_Request ** request, MPIR_Errflag_t errflag); + MPIR_Comm * comm_ptr, MPIR_Request ** request, int collattr); int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, - int tag, MPIR_Comm * comm_ptr, MPIR_Request ** request); + int tag, MPIR_Comm * comm_ptr, int collattr, MPIR_Request ** request); int MPIC_Waitall(int numreq, MPIR_Request * requests[], MPI_Status statuses[]); int MPIR_Reduce_local(const void *inbuf, void *inoutbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op); -int MPIR_Barrier_intra_dissemination(MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag); +int MPIR_Barrier_intra_dissemination(MPIR_Comm * comm_ptr, int collattr); /* TSP auto */ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_TSP_sched_t sched); + MPIR_Comm * comm, int collattr, + MPIR_TSP_sched_t sched); int MPIR_TSP_Ibcast_sched_intra_tsp_auto(void *buffer, MPI_Aint count, MPI_Datatype datatype, - int root, MPIR_Comm * comm_ptr, MPIR_TSP_sched_t sched); -int MPIR_TSP_Ibarrier_sched_intra_tsp_auto(MPIR_Comm * comm, MPIR_TSP_sched_t sched); + int root, MPIR_Comm * comm_ptr, int collattr, + MPIR_TSP_sched_t sched); +int MPIR_TSP_Ibarrier_sched_intra_tsp_auto(MPIR_Comm * comm, int collattr, MPIR_TSP_sched_t sched); int MPIR_TSP_Ireduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm_ptr, MPIR_TSP_sched_t sched); + MPIR_Comm * comm_ptr, int collattr, + MPIR_TSP_sched_t sched); #endif /* MPIR_COLL_H_INCLUDED */ diff --git a/src/include/mpir_comm.h b/src/include/mpir_comm.h index 362a4a36325..8e599bb3884 100644 --- a/src/include/mpir_comm.h +++ b/src/include/mpir_comm.h @@ -102,6 +102,16 @@ enum MPIR_COMM_HINT_PREDEFINED_t { MPIR_COMM_HINT_PREDEFINED_COUNT }; +/* lightweight comm struct defines a sub-comm for collectives */ +typedef struct MPIR_sub_comm { + int rank; /* rank in this sub-comm */ + int size; /* size of this sub-comm */ + int *ranklist; /* A list of ranks (as in parent comm) in this sub-comm. + * NULL is interpreted as identity array */ +} MPIR_sub_comm; + +#define MPIR_MAX_SUBCOMM_DEPTH 1 + /*S MPIR_Comm - Description of the Communicator data structure @@ -180,6 +190,9 @@ struct MPIR_Comm { struct MPIR_Comm *node_comm; /* Comm of processes in this comm that are on * the same node as this process. */ struct MPIR_Comm *node_roots_comm; /* Comm of root processes for other nodes. */ + int subcomm_depth; + MPIR_sub_comm child_subcomm[MPIR_MAX_SUBCOMM_DEPTH]; + MPIR_sub_comm roots_subcomm[MPIR_MAX_SUBCOMM_DEPTH]; int *intranode_table; /* intranode_table[i] gives the rank in * node_comm of rank i in this comm or -1 if i * is not in this process' node_comm. @@ -264,6 +277,7 @@ struct MPIR_Comm { MPID_DEV_COMM_DECL #endif }; + extern MPIR_Object_alloc_t MPIR_Comm_mem; /* this function should not be called by normal code! */ diff --git a/src/include/mpir_nbc.h b/src/include/mpir_nbc.h index eb08995fe04..b6981d01adc 100644 --- a/src/include/mpir_nbc.h +++ b/src/include/mpir_nbc.h @@ -69,13 +69,13 @@ int MPIR_Sched_start(MPIR_Sched_t s, MPIR_Comm * comm, MPIR_Request ** req); /* send and recv take a comm ptr to enable hierarchical collectives */ int MPIR_Sched_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, - MPIR_Comm * comm, MPIR_Sched_t s); + MPIR_Comm * comm, int collattr, MPIR_Sched_t s); int MPIR_Sched_recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, MPIR_Comm * comm, - MPIR_Sched_t s); + int collattr, MPIR_Sched_t s); /* just like MPI_Issend, can't complete until the matching recv is posted */ int MPIR_Sched_ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, - MPIR_Comm * comm, MPIR_Sched_t s); + MPIR_Comm * comm, int collattr, MPIR_Sched_t s); int MPIR_Sched_reduce(const void *inbuf, void *inoutbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Sched_t s); @@ -104,12 +104,12 @@ int MPIR_Sched_barrier(MPIR_Sched_t s); * is no known use case. The recv count is just an upper bound, not an exact * amount to be received, so an oversized recv is used instead of deferral. */ int MPIR_Sched_send_defer(const void *buf, const MPI_Aint * count, MPI_Datatype datatype, int dest, - MPIR_Comm * comm, MPIR_Sched_t s); + MPIR_Comm * comm, int collattr, MPIR_Sched_t s); /* Just like MPIR_Sched_recv except it populates the given status object with * the received count and error information, much like a normal recv. Often * useful in conjunction with MPIR_Sched_send_defer. */ int MPIR_Sched_recv_status(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, - MPIR_Comm * comm, MPI_Status * status, MPIR_Sched_t s); + MPIR_Comm * comm, MPI_Status * status, int collattr, MPIR_Sched_t s); /* buffer management, fancy reductions, etc */ int MPIR_Sched_cb(MPIR_Sched_cb_t * cb_p, void *cb_state, MPIR_Sched_t s); diff --git a/src/mpi/coll/algorithms/recexchalgo/recexchalgo.h b/src/mpi/coll/algorithms/recexchalgo/recexchalgo.h index 8b8fb8fc40d..bf8cc962479 100644 --- a/src/mpi/coll/algorithms/recexchalgo/recexchalgo.h +++ b/src/mpi/coll/algorithms/recexchalgo/recexchalgo.h @@ -27,7 +27,7 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch_step2(int step1_sendto, int step2_n size_t recv_extent, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, int is_dist_halving, MPIR_Comm * comm, - MPIR_TSP_sched_t sched); + int collattr, MPIR_TSP_sched_t sched); int MPIR_TSP_Ireduce_scatter_sched_intra_recexch_step2(void *tmp_results, void *tmp_recvbuf, const MPI_Aint * recvcounts, MPI_Aint * displs, MPI_Datatype datatype, @@ -36,6 +36,6 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch_step2(void *tmp_results, void * int step2_nphases, int **step2_nbrs, int rank, int nranks, int sink_id, int is_out_vtcs, int *reduce_id_, - MPIR_TSP_sched_t sched); + int collattr, MPIR_TSP_sched_t sched); #endif /* RECEXCHALGO_H_INCLUDED */ diff --git a/src/mpi/coll/allgather/allgather_allcomm_nb.c b/src/mpi/coll/allgather/allgather_allcomm_nb.c index 37800564381..265a320bb19 100644 --- a/src/mpi/coll/allgather/allgather_allcomm_nb.c +++ b/src/mpi/coll/allgather/allgather_allcomm_nb.c @@ -7,15 +7,14 @@ int MPIR_Allgather_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; /* just call the nonblocking version and wait on it */ - mpi_errno = - MPIR_Iallgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm_ptr, - &req_ptr); + mpi_errno = MPIR_Iallgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, + comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c b/src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c index d93e0780d76..a6ee47a3e91 100644 --- a/src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c +++ b/src/mpi/coll/allgather/allgather_inter_local_gather_remote_bcast.c @@ -15,10 +15,11 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int rank, local_size, remote_size, mpi_errno = MPI_SUCCESS, root; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint sendtype_sz; void *tmp_buf = NULL; MPIR_Comm *newcomm_ptr = NULL; @@ -48,7 +49,7 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, MPI_Aint if (sendcount != 0) { mpi_errno = MPIR_Gather(sendbuf, sendcount, sendtype, tmp_buf, sendcount * sendtype_sz, - MPI_BYTE, 0, newcomm_ptr, errflag); + MPI_BYTE, 0, newcomm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -59,7 +60,7 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, MPI_Aint if (sendcount != 0) { root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Bcast(tmp_buf, sendcount * sendtype_sz * local_size, - MPI_BYTE, root, comm_ptr, errflag); + MPI_BYTE, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -67,7 +68,7 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, MPI_Aint if (recvcount != 0) { root = 0; mpi_errno = MPIR_Bcast(recvbuf, recvcount * remote_size, - recvtype, root, comm_ptr, errflag); + recvtype, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } else { @@ -75,7 +76,7 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, MPI_Aint if (recvcount != 0) { root = 0; mpi_errno = MPIR_Bcast(recvbuf, recvcount * remote_size, - recvtype, root, comm_ptr, errflag); + recvtype, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -83,7 +84,7 @@ int MPIR_Allgather_inter_local_gather_remote_bcast(const void *sendbuf, MPI_Aint if (sendcount != 0) { root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Bcast(tmp_buf, sendcount * sendtype_sz * local_size, - MPI_BYTE, root, comm_ptr, errflag); + MPI_BYTE, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/allgather/allgather_intra_brucks.c b/src/mpi/coll/allgather/allgather_intra_brucks.c index 5e1af54c29d..5d3d42b7d9f 100644 --- a/src/mpi/coll/allgather/allgather_intra_brucks.c +++ b/src/mpi/coll/allgather/allgather_intra_brucks.c @@ -19,11 +19,12 @@ int MPIR_Allgather_intra_brucks(const void *sendbuf, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int comm_size, rank; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint recvtype_extent, recvtype_sz; int pof2, src, rem; void *tmp_buf = NULL; @@ -68,7 +69,8 @@ int MPIR_Allgather_intra_brucks(const void *sendbuf, MPIR_ALLGATHER_TAG, ((char *) tmp_buf + curr_cnt * recvtype_sz), curr_cnt * recvtype_sz, MPI_BYTE, - src, MPIR_ALLGATHER_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + src, MPIR_ALLGATHER_TAG, comm_ptr, MPI_STATUS_IGNORE, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); curr_cnt *= 2; pof2 *= 2; @@ -85,7 +87,8 @@ int MPIR_Allgather_intra_brucks(const void *sendbuf, dst, MPIR_ALLGATHER_TAG, ((char *) tmp_buf + curr_cnt * recvtype_sz), rem * recvcount * recvtype_sz, MPI_BYTE, - src, MPIR_ALLGATHER_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + src, MPIR_ALLGATHER_TAG, comm_ptr, MPI_STATUS_IGNORE, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/allgather/allgather_intra_k_brucks.c b/src/mpi/coll/allgather/allgather_intra_k_brucks.c index 2b7a2b8bfcd..4c4365c1b33 100644 --- a/src/mpi/coll/allgather/allgather_intra_k_brucks.c +++ b/src/mpi/coll/allgather/allgather_intra_k_brucks.c @@ -23,10 +23,11 @@ int MPIR_Allgather_intra_k_brucks(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, int k, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int i, j; int nphases = 0; int src, dst, p_of_k = 0; /* Largest power of k that is smaller than 'size' */ @@ -142,7 +143,7 @@ MPIR_Allgather_intra_k_brucks(const void *sendbuf, MPI_Aint sendcount, /* Receive at the exact location. */ mpi_errno = MPIC_Irecv((char *) tmp_recvbuf + j * recvcount * delta * recvtype_extent, count, recvtype, src, MPIR_ALLGATHER_TAG, comm, - &reqs[num_reqs++]); + collattr, &reqs[num_reqs++]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, @@ -154,7 +155,7 @@ MPIR_Allgather_intra_k_brucks(const void *sendbuf, MPI_Aint sendcount, /* Send from the start of recv till `count` amount of data. */ mpi_errno = MPIC_Isend(tmp_recvbuf, count, recvtype, dst, MPIR_ALLGATHER_TAG, comm, - &reqs[num_reqs++], errflag); + &reqs[num_reqs++], collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, diff --git a/src/mpi/coll/allgather/allgather_intra_recursive_doubling.c b/src/mpi/coll/allgather/allgather_intra_recursive_doubling.c index 84c1096eb76..148826f786e 100644 --- a/src/mpi/coll/allgather/allgather_intra_recursive_doubling.c +++ b/src/mpi/coll/allgather/allgather_intra_recursive_doubling.c @@ -23,11 +23,12 @@ int MPIR_Allgather_intra_recursive_doubling(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int comm_size, rank; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint recvtype_extent; int j, i; MPI_Aint curr_cnt, last_recv_cnt = 0; @@ -82,7 +83,7 @@ int MPIR_Allgather_intra_recursive_doubling(const void *sendbuf, ((char *) recvbuf + recv_offset), (comm_size - dst_tree_root) * recvcount, recvtype, dst, - MPIR_ALLGATHER_TAG, comm_ptr, &status, errflag); + MPIR_ALLGATHER_TAG, comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (mpi_errno) { last_recv_cnt = 0; @@ -140,7 +141,8 @@ int MPIR_Allgather_intra_recursive_doubling(const void *sendbuf, && (dst >= tree_root + nprocs_completed)) { mpi_errno = MPIC_Send(((char *) recvbuf + offset), last_recv_cnt, - recvtype, dst, MPIR_ALLGATHER_TAG, comm_ptr, errflag); + recvtype, dst, MPIR_ALLGATHER_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } /* recv only if this proc. doesn't have data and sender @@ -150,7 +152,8 @@ int MPIR_Allgather_intra_recursive_doubling(const void *sendbuf, (rank >= tree_root + nprocs_completed)) { mpi_errno = MPIC_Recv(((char *) recvbuf + offset), (comm_size - (my_tree_root + mask)) * recvcount, - recvtype, dst, MPIR_ALLGATHER_TAG, comm_ptr, &status); + recvtype, dst, MPIR_ALLGATHER_TAG, comm_ptr, collattr, + &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* nprocs_completed is also equal to the * no. of processes whose data we don't have */ diff --git a/src/mpi/coll/allgather/allgather_intra_ring.c b/src/mpi/coll/allgather/allgather_intra_ring.c index 5421f251ee8..0f533a58d96 100644 --- a/src/mpi/coll/allgather/allgather_intra_ring.c +++ b/src/mpi/coll/allgather/allgather_intra_ring.c @@ -25,11 +25,12 @@ int MPIR_Allgather_intra_ring(const void *sendbuf, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int comm_size, rank; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint recvtype_extent; int j, i; int left, right, jnext; @@ -64,7 +65,8 @@ int MPIR_Allgather_intra_ring(const void *sendbuf, ((char *) recvbuf + jnext * recvcount * recvtype_extent), recvcount, recvtype, left, - MPIR_ALLGATHER_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + MPIR_ALLGATHER_TAG, comm_ptr, MPI_STATUS_IGNORE, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); j = jnext; jnext = (comm_size + jnext - 1) % comm_size; diff --git a/src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c b/src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c index 1a7fc1430b3..e2ca1c172b7 100644 --- a/src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c +++ b/src/mpi/coll/allgatherv/allgatherv_allcomm_nb.c @@ -7,7 +7,7 @@ int MPIR_Allgatherv_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; @@ -15,7 +15,7 @@ int MPIR_Allgatherv_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Data /* just call the nonblocking version and wait on it */ mpi_errno = MPIR_Iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, - comm_ptr, &req_ptr); + comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c b/src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c index 1e2fcd29f56..c655f3771a7 100644 --- a/src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c +++ b/src/mpi/coll/allgatherv/allgatherv_inter_remote_gather_local_bcast.c @@ -19,10 +19,11 @@ int MPIR_Allgatherv_inter_remote_gather_local_bcast(const void *sendbuf, MPI_Ain MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int remote_size, mpi_errno, root, rank; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPIR_Comm *newcomm_ptr = NULL; MPI_Datatype newtype = MPI_DATATYPE_NULL; @@ -35,23 +36,23 @@ int MPIR_Allgatherv_inter_remote_gather_local_bcast(const void *sendbuf, MPI_Ain /* gatherv from right group */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Gatherv(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm_ptr, errflag); + recvcounts, displs, recvtype, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* gatherv to right group */ root = 0; mpi_errno = MPIR_Gatherv(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm_ptr, errflag); + recvcounts, displs, recvtype, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* gatherv to left group */ root = 0; mpi_errno = MPIR_Gatherv(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm_ptr, errflag); + recvcounts, displs, recvtype, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* gatherv from left group */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Gatherv(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm_ptr, errflag); + recvcounts, displs, recvtype, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -72,7 +73,7 @@ int MPIR_Allgatherv_inter_remote_gather_local_bcast(const void *sendbuf, MPI_Ain mpi_errno = MPIR_Type_commit_impl(&newtype); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIR_Bcast_allcomm_auto(recvbuf, 1, newtype, 0, newcomm_ptr, errflag); + mpi_errno = MPIR_Bcast_allcomm_auto(recvbuf, 1, newtype, 0, newcomm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPIR_Type_free_impl(&newtype); diff --git a/src/mpi/coll/allgatherv/allgatherv_intra_brucks.c b/src/mpi/coll/allgatherv/allgatherv_intra_brucks.c index 0b8050a40a0..c16365e35e0 100644 --- a/src/mpi/coll/allgatherv/allgatherv_intra_brucks.c +++ b/src/mpi/coll/allgatherv/allgatherv_intra_brucks.c @@ -22,12 +22,12 @@ int MPIR_Allgatherv_intra_brucks(const void *sendbuf, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, - MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int comm_size, rank, j, i; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; MPI_Aint recvtype_extent, recvtype_sz; int pof2, src, rem, send_cnt; @@ -79,7 +79,7 @@ int MPIR_Allgatherv_intra_brucks(const void *sendbuf, MPIR_ALLGATHERV_TAG, ((char *) tmp_buf + curr_cnt * recvtype_sz), (total_count - curr_cnt) * recvtype_sz, MPI_BYTE, - src, MPIR_ALLGATHERV_TAG, comm_ptr, &status, errflag); + src, MPIR_ALLGATHERV_TAG, comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (mpi_errno) { recv_cnt = 0; @@ -106,7 +106,8 @@ int MPIR_Allgatherv_intra_brucks(const void *sendbuf, dst, MPIR_ALLGATHERV_TAG, ((char *) tmp_buf + curr_cnt * recvtype_sz), (total_count - curr_cnt) * recvtype_sz, MPI_BYTE, - src, MPIR_ALLGATHERV_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + src, MPIR_ALLGATHERV_TAG, comm_ptr, MPI_STATUS_IGNORE, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c b/src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c index eac0c4ce2e1..688e7804efb 100644 --- a/src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c +++ b/src/mpi/coll/allgatherv/allgatherv_intra_recursive_doubling.c @@ -25,11 +25,12 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int comm_size, rank, j, i; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; MPI_Aint recvtype_extent, recvtype_sz; MPI_Aint curr_cnt, last_recv_cnt; @@ -113,7 +114,7 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, MPIR_ALLGATHERV_TAG, ((char *) tmp_buf + recv_offset * recvtype_sz), (total_count - recv_offset) * recvtype_sz, MPI_BYTE, dst, - MPIR_ALLGATHERV_TAG, comm_ptr, &status, errflag); + MPIR_ALLGATHERV_TAG, comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (mpi_errno) { last_recv_cnt = 0; @@ -176,7 +177,8 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, mpi_errno = MPIC_Send(((char *) tmp_buf + offset * recvtype_sz), last_recv_cnt * recvtype_sz, - MPI_BYTE, dst, MPIR_ALLGATHERV_TAG, comm_ptr, errflag); + MPI_BYTE, dst, MPIR_ALLGATHERV_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* last_recv_cnt was set in the previous * receive. that's the amount of data to be @@ -194,7 +196,7 @@ int MPIR_Allgatherv_intra_recursive_doubling(const void *sendbuf, mpi_errno = MPIC_Recv(((char *) tmp_buf + offset * recvtype_sz), (total_count - offset) * recvtype_sz, MPI_BYTE, - dst, MPIR_ALLGATHERV_TAG, comm_ptr, &status); + dst, MPIR_ALLGATHERV_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (mpi_errno) { last_recv_cnt = 0; diff --git a/src/mpi/coll/allgatherv/allgatherv_intra_ring.c b/src/mpi/coll/allgatherv/allgatherv_intra_ring.c index 680181bbba2..09f37e75628 100644 --- a/src/mpi/coll/allgatherv/allgatherv_intra_ring.c +++ b/src/mpi/coll/allgatherv/allgatherv_intra_ring.c @@ -28,11 +28,12 @@ int MPIR_Allgatherv_intra_ring(const void *sendbuf, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int comm_size, rank, i, left, right; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; MPI_Aint recvtype_extent; int total_count; @@ -110,18 +111,20 @@ int MPIR_Allgatherv_intra_ring(const void *sendbuf, * consecutive processes contribute 0 bytes each. */ } else if (!sendnow) { /* If there's no data to send, just do a recv call */ mpi_errno = - MPIC_Recv(rbuf, recvnow, recvtype, left, MPIR_ALLGATHERV_TAG, comm_ptr, &status); + MPIC_Recv(rbuf, recvnow, recvtype, left, MPIR_ALLGATHERV_TAG, comm_ptr, collattr, + &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); torecv -= recvnow; } else if (!recvnow) { /* If there's no data to receive, just do a send call */ mpi_errno = - MPIC_Send(sbuf, sendnow, recvtype, right, MPIR_ALLGATHERV_TAG, comm_ptr, errflag); + MPIC_Send(sbuf, sendnow, recvtype, right, MPIR_ALLGATHERV_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); tosend -= sendnow; } else { /* There's data to be sent and received */ mpi_errno = MPIC_Sendrecv(sbuf, sendnow, recvtype, right, MPIR_ALLGATHERV_TAG, rbuf, recvnow, recvtype, left, MPIR_ALLGATHERV_TAG, - comm_ptr, &status, errflag); + comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); tosend -= sendnow; torecv -= recvnow; diff --git a/src/mpi/coll/allreduce/allreduce_allcomm_nb.c b/src/mpi/coll/allreduce/allreduce_allcomm_nb.c index c076b2bcd8e..a92d2b6d281 100644 --- a/src/mpi/coll/allreduce/allreduce_allcomm_nb.c +++ b/src/mpi/coll/allreduce/allreduce_allcomm_nb.c @@ -6,14 +6,14 @@ #include "mpiimpl.h" int MPIR_Allreduce_allcomm_nb(const void *sendbuf, void *recvbuf, MPI_Aint count, - MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; /* just call the nonblocking version and wait on it */ - mpi_errno = MPIR_Iallreduce(sendbuf, recvbuf, count, datatype, op, comm_ptr, &req_ptr); + mpi_errno = + MPIR_Iallreduce(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c b/src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c index 267a057ca61..f694316376a 100644 --- a/src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c +++ b/src/mpi/coll/allreduce/allreduce_inter_reduce_exchange_bcast.c @@ -15,10 +15,11 @@ int MPIR_Allreduce_inter_reduce_exchange_bcast(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint true_extent, true_lb, extent; void *tmp_buf = NULL; MPIR_Comm *newcomm_ptr = NULL; @@ -40,19 +41,20 @@ int MPIR_Allreduce_inter_reduce_exchange_bcast(const void *sendbuf, void *recvbu newcomm_ptr = comm_ptr->local_comm; /* Do a local reduce on this intracommunicator */ - mpi_errno = MPIR_Reduce(sendbuf, tmp_buf, count, datatype, op, 0, newcomm_ptr, errflag); + mpi_errno = + MPIR_Reduce(sendbuf, tmp_buf, count, datatype, op, 0, newcomm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* Do a exchange between local and remote rank 0 on this intercommunicator */ if (comm_ptr->rank == 0) { mpi_errno = MPIC_Sendrecv(tmp_buf, count, datatype, 0, MPIR_REDUCE_TAG, recvbuf, count, datatype, 0, MPIR_REDUCE_TAG, - comm_ptr, MPI_STATUS_IGNORE, errflag); + comm_ptr, MPI_STATUS_IGNORE, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } /* Do a local broadcast on this intracommunicator */ - mpi_errno = MPIR_Bcast(recvbuf, count, datatype, 0, newcomm_ptr, errflag); + mpi_errno = MPIR_Bcast(recvbuf, count, datatype, 0, newcomm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); fn_exit: diff --git a/src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c b/src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c index 537ffa7c280..7aa3d2ad8c6 100644 --- a/src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c +++ b/src/mpi/coll/allreduce/allreduce_intra_k_reduce_scatter_allgather.c @@ -15,9 +15,10 @@ int MPIR_Allreduce_intra_k_reduce_scatter_allgather(const void *sendbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, int k, - int single_phase_recv, MPIR_Errflag_t errflag) + int single_phase_recv, int collattr) { int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int rank, nranks, nbr; int rem = 0, idx = 0, dst = 0, rank_for_offset; MPI_Aint true_extent, true_lb, extent; @@ -106,13 +107,13 @@ int MPIR_Allreduce_intra_k_reduce_scatter_allgather(const void *sendbuf, if (!in_step2) { /* even */ /* non-participating rank sends the data to a participating rank */ mpi_errno = MPIC_Send(recvbuf, count, - datatype, step1_sendto, MPIR_ALLREDUCE_TAG, comm, errflag); + datatype, step1_sendto, MPIR_ALLREDUCE_TAG, comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* odd */ for (i = 0; i < step1_nrecvs; i++) { /* participating rank gets data from non-partcipating ranks */ mpi_errno = MPIC_Recv(tmp_recvbuf, count, datatype, step1_recvfrom[i], MPIR_ALLREDUCE_TAG, comm, - MPI_STATUS_IGNORE); + collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* Do reduction of reduced data */ mpi_errno = MPIR_Reduce_local(tmp_recvbuf, recvbuf, count, datatype, op); @@ -163,7 +164,7 @@ int MPIR_Allreduce_intra_k_reduce_scatter_allgather(const void *sendbuf, mpi_errno = MPIC_Isend((char *) recvbuf + send_offset, send_cnt, datatype, dst, MPIR_ALLREDUCE_TAG, comm, &recv_reqs[num_rreq++], - errflag); + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); rank_for_offset = MPII_Recexchalgo_reverse_digits_step2(rank, nranks, k); @@ -176,7 +177,7 @@ int MPIR_Allreduce_intra_k_reduce_scatter_allgather(const void *sendbuf, recv_cnt += cnts[offset + x]; mpi_errno = MPIC_Irecv((char *) tmp_recvbuf + recv_offset, recv_cnt, datatype, - dst, MPIR_ALLREDUCE_TAG, comm, &recv_reqs[num_rreq++]); + dst, MPIR_ALLREDUCE_TAG, comm, collattr, &recv_reqs[num_rreq++]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); mpi_errno = MPIC_Waitall(num_rreq, recv_reqs, MPI_STATUSES_IGNORE); @@ -209,7 +210,8 @@ int MPIR_Allreduce_intra_k_reduce_scatter_allgather(const void *sendbuf, for (x = 0; x < current_cnt; x++) recv_count += cnts[offset + x]; mpi_errno = MPIC_Irecv(((char *) recvbuf + recv_offset), recv_count, datatype, - nbr, MPIR_ALLREDUCE_TAG, comm, &recv_reqs[num_rreq++]); + nbr, MPIR_ALLREDUCE_TAG, comm, collattr, + &recv_reqs[num_rreq++]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } recv_phase--; @@ -226,7 +228,7 @@ int MPIR_Allreduce_intra_k_reduce_scatter_allgather(const void *sendbuf, send_count += cnts[offset + x]; mpi_errno = MPIC_Isend(((char *) recvbuf + send_offset), send_count, datatype, nbr, MPIR_ALLREDUCE_TAG, comm, &send_reqs[num_sreq++], - errflag); + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } /* wait on prev recvs */ @@ -249,7 +251,8 @@ int MPIR_Allreduce_intra_k_reduce_scatter_allgather(const void *sendbuf, send_count += cnts[offset + x]; mpi_errno = MPIC_Isend(((char *) recvbuf + send_offset), send_count, datatype, nbr, - MPIR_ALLREDUCE_TAG, comm, &send_reqs[num_sreq++], errflag); + MPIR_ALLREDUCE_TAG, comm, &send_reqs[num_sreq++], + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } /* wait on prev recvs */ @@ -268,14 +271,14 @@ int MPIR_Allreduce_intra_k_reduce_scatter_allgather(const void *sendbuf, * send the data to non-partcipating rans */ if (step1_sendto != -1) { /* I am a Step 2 non-participating rank */ mpi_errno = MPIC_Recv(recvbuf, count, datatype, step1_sendto, MPIR_ALLREDUCE_TAG, comm, - MPI_STATUS_IGNORE); + collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { if (step1_nrecvs > 0) { for (i = 0; i < step1_nrecvs; i++) { mpi_errno = MPIC_Isend(recvbuf, count, datatype, step1_recvfrom[i], MPIR_ALLREDUCE_TAG, - comm, &send_reqs[i], errflag); + comm, &send_reqs[i], collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/allreduce/allreduce_intra_recexch.c b/src/mpi/coll/allreduce/allreduce_intra_recexch.c index 9a1e9a60bf8..b7f73c4f184 100644 --- a/src/mpi/coll/allreduce/allreduce_intra_recexch.c +++ b/src/mpi/coll/allreduce/allreduce_intra_recexch.c @@ -15,9 +15,10 @@ int MPIR_Allreduce_intra_recexch(const void *sendbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, int k, int single_phase_recv, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int is_commutative, rank, nranks, nbr, myidx; int buf = 0; MPI_Aint true_extent, true_lb, extent; @@ -148,14 +149,14 @@ int MPIR_Allreduce_intra_recexch(const void *sendbuf, if (!in_step2) { /* even */ /* non-participating rank sends the data to a participating rank */ mpi_errno = MPIC_Send(recvbuf, count, - datatype, step1_sendto, MPIR_ALLREDUCE_TAG, comm, errflag); + datatype, step1_sendto, MPIR_ALLREDUCE_TAG, comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* odd */ if (step1_nrecvs) { for (i = 0; i < step1_nrecvs; i++) { /* participating rank gets data from non-partcipating ranks */ mpi_errno = MPIC_Irecv(nbr_buffer[i], count, datatype, step1_recvfrom[i], - MPIR_ALLREDUCE_TAG, comm, &recv_reqs[recv_nreq++]); + MPIR_ALLREDUCE_TAG, comm, collattr, &recv_reqs[recv_nreq++]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } mpi_errno = MPIC_Waitall(recv_nreq, recv_reqs, MPI_STATUSES_IGNORE); @@ -187,7 +188,7 @@ int MPIR_Allreduce_intra_recexch(const void *sendbuf, nbr = step2_nbrs[phase + j][i]; mpi_errno = MPIC_Irecv(nbr_buffer[buf++], count, datatype, nbr, MPIR_ALLREDUCE_TAG, - comm, &recv_reqs[recv_nreq++]); + comm, collattr, &recv_reqs[recv_nreq++]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } @@ -198,7 +199,7 @@ int MPIR_Allreduce_intra_recexch(const void *sendbuf, for (i = 0; i < k - 1; i++) { nbr = step2_nbrs[phase][i]; mpi_errno = MPIC_Isend(recvbuf, count, datatype, nbr, MPIR_ALLREDUCE_TAG, comm, - &send_reqs[send_nreq++], errflag); + &send_reqs[send_nreq++], collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (rank > nbr) { myidx = i + 1; @@ -243,7 +244,7 @@ int MPIR_Allreduce_intra_recexch(const void *sendbuf, mpi_errno = MPIC_Isend(recvbuf, count, datatype, nbr, MPIR_ALLREDUCE_TAG, comm, - &send_reqs[send_nreq++], errflag); + &send_reqs[send_nreq++], collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (rank > nbr) { myidx = i + 1; @@ -286,13 +287,13 @@ int MPIR_Allreduce_intra_recexch(const void *sendbuf, * send the data to non-partcipating rans */ if (step1_sendto != -1) { /* I am a Step 2 non-participating rank */ mpi_errno = MPIC_Recv(recvbuf, count, datatype, step1_sendto, MPIR_ALLREDUCE_TAG, comm, - MPI_STATUS_IGNORE); + collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { for (i = 0; i < step1_nrecvs; i++) { mpi_errno = MPIC_Isend(recvbuf, count, datatype, step1_recvfrom[i], MPIR_ALLREDUCE_TAG, - comm, &send_reqs[i], errflag); + comm, &send_reqs[i], collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c b/src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c index 243888ae1f7..96067eab8dd 100644 --- a/src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c +++ b/src/mpi/coll/allreduce/allreduce_intra_recursive_doubling.c @@ -21,12 +21,13 @@ int MPIR_Allreduce_intra_recursive_doubling(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { MPIR_CHKLMEM_DECL(1); int comm_size, rank; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int mask, dst, is_commutative, pof2, newrank, rem, newdst; MPI_Aint true_extent, true_lb, extent; void *tmp_buf; @@ -66,7 +67,8 @@ int MPIR_Allreduce_intra_recursive_doubling(const void *sendbuf, if (rank < 2 * rem) { if (rank % 2 == 0) { /* even */ mpi_errno = MPIC_Send(recvbuf, count, - datatype, rank + 1, MPIR_ALLREDUCE_TAG, comm_ptr, errflag); + datatype, rank + 1, MPIR_ALLREDUCE_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* temporarily set the rank to -1 so that this @@ -76,7 +78,7 @@ int MPIR_Allreduce_intra_recursive_doubling(const void *sendbuf, } else { /* odd */ mpi_errno = MPIC_Recv(tmp_buf, count, datatype, rank - 1, - MPIR_ALLREDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_ALLREDUCE_TAG, comm_ptr, collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* do the reduction on received data. since the @@ -112,7 +114,8 @@ int MPIR_Allreduce_intra_recursive_doubling(const void *sendbuf, mpi_errno = MPIC_Sendrecv(recvbuf, count, datatype, dst, MPIR_ALLREDUCE_TAG, tmp_buf, count, datatype, dst, - MPIR_ALLREDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + MPIR_ALLREDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* tmp_buf contains data received in this step. @@ -140,11 +143,12 @@ int MPIR_Allreduce_intra_recursive_doubling(const void *sendbuf, if (rank < 2 * rem) { if (rank % 2) /* odd */ mpi_errno = MPIC_Send(recvbuf, count, - datatype, rank - 1, MPIR_ALLREDUCE_TAG, comm_ptr, errflag); + datatype, rank - 1, MPIR_ALLREDUCE_TAG, comm_ptr, + collattr | errflag); else /* even */ mpi_errno = MPIC_Recv(recvbuf, count, datatype, rank + 1, - MPIR_ALLREDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_ALLREDUCE_TAG, comm_ptr, collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } fn_exit: diff --git a/src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c b/src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c index 142d12d971e..a6f606e1d49 100644 --- a/src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c +++ b/src/mpi/coll/allreduce/allreduce_intra_reduce_scatter_allgather.c @@ -42,13 +42,13 @@ int MPIR_Allreduce_intra_reduce_scatter_allgather(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { MPIR_CHKLMEM_DECL(3); int comm_size, rank; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int mask, dst, pof2, newrank, rem, newdst, i, send_idx, recv_idx, last_idx; MPI_Aint true_extent, true_lb, extent; void *tmp_buf; @@ -86,7 +86,8 @@ int MPIR_Allreduce_intra_reduce_scatter_allgather(const void *sendbuf, if (rank < 2 * rem) { if (rank % 2 == 0) { /* even */ mpi_errno = MPIC_Send(recvbuf, count, - datatype, rank + 1, MPIR_ALLREDUCE_TAG, comm_ptr, errflag); + datatype, rank + 1, MPIR_ALLREDUCE_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* temporarily set the rank to -1 so that this @@ -96,7 +97,7 @@ int MPIR_Allreduce_intra_reduce_scatter_allgather(const void *sendbuf, } else { /* odd */ mpi_errno = MPIC_Recv(tmp_buf, count, datatype, rank - 1, - MPIR_ALLREDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_ALLREDUCE_TAG, comm_ptr, collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* do the reduction on received data. since the @@ -176,7 +177,8 @@ int MPIR_Allreduce_intra_reduce_scatter_allgather(const void *sendbuf, (char *) tmp_buf + disps[recv_idx] * extent, recv_cnt, datatype, dst, - MPIR_ALLREDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + MPIR_ALLREDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* tmp_buf contains data received in this step. @@ -235,7 +237,8 @@ int MPIR_Allreduce_intra_reduce_scatter_allgather(const void *sendbuf, (char *) recvbuf + disps[recv_idx] * extent, recv_cnt, datatype, dst, - MPIR_ALLREDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + MPIR_ALLREDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (newrank > newdst) @@ -250,11 +253,12 @@ int MPIR_Allreduce_intra_reduce_scatter_allgather(const void *sendbuf, if (rank < 2 * rem) { if (rank % 2) /* odd */ mpi_errno = MPIC_Send(recvbuf, count, - datatype, rank - 1, MPIR_ALLREDUCE_TAG, comm_ptr, errflag); + datatype, rank - 1, MPIR_ALLREDUCE_TAG, comm_ptr, + collattr | errflag); else /* even */ mpi_errno = MPIC_Recv(recvbuf, count, datatype, rank + 1, - MPIR_ALLREDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_ALLREDUCE_TAG, comm_ptr, collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } fn_exit: diff --git a/src/mpi/coll/allreduce/allreduce_intra_ring.c b/src/mpi/coll/allreduce/allreduce_intra_ring.c index 1c303b36406..b07629b0d7c 100644 --- a/src/mpi/coll/allreduce/allreduce_intra_ring.c +++ b/src/mpi/coll/allreduce/allreduce_intra_ring.c @@ -10,10 +10,10 @@ #include "mpiimpl.h" int MPIR_Allreduce_intra_ring(const void *sendbuf, void *recvbuf, MPI_Aint count, - MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int i, src, dst; int nranks, is_inplace, rank; size_t extent; @@ -78,11 +78,12 @@ int MPIR_Allreduce_intra_ring(const void *sendbuf, void *recvbuf, MPI_Aint count mpi_errno = MPIR_Sched_next_tag(comm, &tag); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIC_Irecv(tmpbuf, cnts[recv_rank], datatype, src, tag, comm, &reqs[0]); + mpi_errno = + MPIC_Irecv(tmpbuf, cnts[recv_rank], datatype, src, tag, comm, collattr, &reqs[0]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); mpi_errno = MPIC_Isend((char *) recvbuf + displs[send_rank] * extent, cnts[send_rank], - datatype, dst, tag, comm, &reqs[1], errflag); + datatype, dst, tag, comm, &reqs[1], collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); mpi_errno = MPIC_Waitall(2, reqs, MPI_STATUSES_IGNORE); @@ -96,7 +97,7 @@ int MPIR_Allreduce_intra_ring(const void *sendbuf, void *recvbuf, MPI_Aint count /* Phase 3: Allgatherv ring, so everyone has the reduced data */ mpi_errno = MPIR_Allgatherv_intra_ring(MPI_IN_PLACE, -1, MPI_DATATYPE_NULL, recvbuf, cnts, - displs, datatype, comm, errflag); + displs, datatype, comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPL_free(cnts); diff --git a/src/mpi/coll/allreduce/allreduce_intra_smp.c b/src/mpi/coll/allreduce/allreduce_intra_smp.c index 34d8fc524d0..823a9897962 100644 --- a/src/mpi/coll/allreduce/allreduce_intra_smp.c +++ b/src/mpi/coll/allreduce/allreduce_intra_smp.c @@ -6,11 +6,11 @@ #include "mpiimpl.h" int MPIR_Allreduce_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, - MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; /* on each node, do a reduce to the local root */ if (comm_ptr->node_comm != NULL) { @@ -23,11 +23,13 @@ int MPIR_Allreduce_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, * allreduce is in recvbuf. Pass that as the sendbuf to reduce. */ mpi_errno = - MPIR_Reduce(recvbuf, NULL, count, datatype, op, 0, comm_ptr->node_comm, errflag); + MPIR_Reduce(recvbuf, NULL, count, datatype, op, 0, comm_ptr->node_comm, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { mpi_errno = - MPIR_Reduce(sendbuf, recvbuf, count, datatype, op, 0, comm_ptr->node_comm, errflag); + MPIR_Reduce(sendbuf, recvbuf, count, datatype, op, 0, comm_ptr->node_comm, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } else { @@ -42,13 +44,14 @@ int MPIR_Allreduce_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, if (comm_ptr->node_roots_comm != NULL) { mpi_errno = MPIR_Allreduce(MPI_IN_PLACE, recvbuf, count, datatype, op, comm_ptr->node_roots_comm, - errflag); + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } /* now broadcast the result among local processes */ if (comm_ptr->node_comm != NULL) { - mpi_errno = MPIR_Bcast(recvbuf, count, datatype, 0, comm_ptr->node_comm, errflag); + mpi_errno = + MPIR_Bcast(recvbuf, count, datatype, 0, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } goto fn_exit; diff --git a/src/mpi/coll/allreduce/allreduce_intra_tree.c b/src/mpi/coll/allreduce/allreduce_intra_tree.c index 1b6301764c5..9717f23e150 100644 --- a/src/mpi/coll/allreduce/allreduce_intra_tree.c +++ b/src/mpi/coll/allreduce/allreduce_intra_tree.c @@ -16,10 +16,11 @@ int MPIR_Allreduce_intra_tree(const void *sendbuf, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, int tree_type, int k, int chunk_size, - int buffer_per_child, MPIR_Errflag_t errflag) + int buffer_per_child, int collattr) { int comm_size, rank; int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int is_commutative; MPI_Aint true_extent, type_lb; void **child_buffer = NULL; /* Buffer array in which data from children is received */ @@ -113,7 +114,7 @@ int MPIR_Allreduce_intra_tree(const void *sendbuf, mpi_errno = MPIC_Recv(recv_address, msgsize, datatype, child, MPIR_ALLREDUCE_TAG, comm_ptr, - MPI_STATUS_IGNORE); + collattr, MPI_STATUS_IGNORE); /* for communication errors, just record the error but continue */ MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -135,14 +136,14 @@ int MPIR_Allreduce_intra_tree(const void *sendbuf, if (rank != root) { /* send data to the parent */ mpi_errno = MPIC_Isend(reduce_address, msgsize, datatype, my_tree.parent, MPIR_ALLREDUCE_TAG, - comm_ptr, &reqs[num_reqs++], errflag); + comm_ptr, &reqs[num_reqs++], collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } if (my_tree.parent != -1) { mpi_errno = MPIC_Recv(reduce_address, msgsize, datatype, my_tree.parent, MPIR_ALLREDUCE_TAG, comm_ptr, - MPI_STATUS_IGNORE); + collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } if (num_children) { @@ -152,7 +153,8 @@ int MPIR_Allreduce_intra_tree(const void *sendbuf, MPIR_Assert(child != 0); mpi_errno = MPIC_Isend(reduce_address, msgsize, datatype, child, - MPIR_ALLREDUCE_TAG, comm_ptr, &reqs[num_reqs++], errflag); + MPIR_ALLREDUCE_TAG, comm_ptr, &reqs[num_reqs++], + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/allreduce_group/allreduce_group.c b/src/mpi/coll/allreduce_group/allreduce_group.c index 9a7d1a83864..79a598ef50f 100644 --- a/src/mpi/coll/allreduce_group/allreduce_group.c +++ b/src/mpi/coll/allreduce_group/allreduce_group.c @@ -17,11 +17,12 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Group * group_ptr, int tag, MPIR_Errflag_t errflag) + MPIR_Group * group_ptr, int tag, int collattr) { MPI_Aint type_size; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; /* newrank is a rank in group_ptr */ int mask, dst, is_commutative, pof2, newrank, rem, newdst, i, send_idx, recv_idx, last_idx; MPI_Aint true_extent, true_lb, extent; @@ -68,7 +69,8 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count, if (group_rank < 2 * rem) { if (group_rank % 2 == 0) { /* even */ to_comm_rank(cdst, group_rank + 1); - mpi_errno = MPIC_Send(recvbuf, count, datatype, cdst, tag, comm_ptr, errflag); + mpi_errno = + MPIC_Send(recvbuf, count, datatype, cdst, tag, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* temporarily set the rank to -1 so that this @@ -77,7 +79,9 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count, newrank = -1; } else { /* odd */ to_comm_rank(csrc, group_rank - 1); - mpi_errno = MPIC_Recv(tmp_buf, count, datatype, csrc, tag, comm_ptr, MPI_STATUS_IGNORE); + mpi_errno = + MPIC_Recv(tmp_buf, count, datatype, csrc, tag, comm_ptr, collattr, + MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* do the reduction on received data. since the @@ -117,7 +121,7 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count, mpi_errno = MPIC_Sendrecv(recvbuf, count, datatype, cdst, tag, tmp_buf, count, datatype, cdst, - tag, comm_ptr, MPI_STATUS_IGNORE, errflag); + tag, comm_ptr, MPI_STATUS_IGNORE, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (!mpi_errno) { /* tmp_buf contains data received in this step. @@ -198,7 +202,7 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count, (char *) tmp_buf + disps[recv_idx] * extent, recv_cnt, datatype, cdst, - tag, comm_ptr, MPI_STATUS_IGNORE, errflag); + tag, comm_ptr, MPI_STATUS_IGNORE, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* tmp_buf contains data received in this step. @@ -258,7 +262,7 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count, (char *) recvbuf + disps[recv_idx] * extent, recv_cnt, datatype, cdst, - tag, comm_ptr, MPI_STATUS_IGNORE, errflag); + tag, comm_ptr, MPI_STATUS_IGNORE, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (newrank > newdst) @@ -275,10 +279,13 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count, if (group_rank < 2 * rem) { if (group_rank % 2) { /* odd */ to_comm_rank(cdst, group_rank - 1); - mpi_errno = MPIC_Send(recvbuf, count, datatype, cdst, tag, comm_ptr, errflag); + mpi_errno = + MPIC_Send(recvbuf, count, datatype, cdst, tag, comm_ptr, collattr | errflag); } else { /* even */ to_comm_rank(csrc, group_rank + 1); - mpi_errno = MPIC_Recv(recvbuf, count, datatype, csrc, tag, comm_ptr, MPI_STATUS_IGNORE); + mpi_errno = + MPIC_Recv(recvbuf, count, datatype, csrc, tag, comm_ptr, collattr, + MPI_STATUS_IGNORE); } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -293,7 +300,7 @@ int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count, int MPII_Allreduce_group(void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Group * group_ptr, int tag, MPIR_Errflag_t errflag) + MPIR_Group * group_ptr, int tag, int collattr) { int mpi_errno = MPI_SUCCESS; @@ -301,7 +308,7 @@ int MPII_Allreduce_group(void *sendbuf, void *recvbuf, MPI_Aint count, "**commnotintra"); mpi_errno = MPII_Allreduce_group_intra(sendbuf, recvbuf, count, datatype, - op, comm_ptr, group_ptr, tag, errflag); + op, comm_ptr, group_ptr, tag, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: diff --git a/src/mpi/coll/allreduce_group/allreduce_group.h b/src/mpi/coll/allreduce_group/allreduce_group.h index 7ab02897571..525e0be5092 100644 --- a/src/mpi/coll/allreduce_group/allreduce_group.h +++ b/src/mpi/coll/allreduce_group/allreduce_group.h @@ -10,9 +10,9 @@ int MPII_Allreduce_group(void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Group * group_ptr, int tag, MPIR_Errflag_t errflag); + MPIR_Group * group_ptr, int tag, int collattr); int MPII_Allreduce_group_intra(void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Group * group_ptr, int tag, MPIR_Errflag_t errflag); + MPIR_Group * group_ptr, int tag, int collattr); #endif /* ALLREDUCE_GROUP_H_INCLUDED */ diff --git a/src/mpi/coll/alltoall/alltoall_allcomm_nb.c b/src/mpi/coll/alltoall/alltoall_allcomm_nb.c index ecb74cd135f..3c07e971626 100644 --- a/src/mpi/coll/alltoall/alltoall_allcomm_nb.c +++ b/src/mpi/coll/alltoall/alltoall_allcomm_nb.c @@ -7,7 +7,7 @@ int MPIR_Alltoall_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; @@ -15,7 +15,7 @@ int MPIR_Alltoall_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Dataty /* just call the nonblocking version and wait on it */ mpi_errno = MPIR_Ialltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm_ptr, - &req_ptr); + collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c b/src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c index c495204c9c8..d048e40a0ee 100644 --- a/src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c +++ b/src/mpi/coll/alltoall/alltoall_inter_pairwise_exchange.c @@ -18,13 +18,13 @@ int MPIR_Alltoall_inter_pairwise_exchange(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int local_size, remote_size, max_size, i; MPI_Aint sendtype_extent, recvtype_extent; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; int src, dst, rank; char *sendaddr, *recvaddr; @@ -58,7 +58,7 @@ int MPIR_Alltoall_inter_pairwise_exchange(const void *sendbuf, MPI_Aint sendcoun mpi_errno = MPIC_Sendrecv(sendaddr, sendcount, sendtype, dst, MPIR_ALLTOALL_TAG, recvaddr, recvcount, recvtype, src, - MPIR_ALLTOALL_TAG, comm_ptr, &status, errflag); + MPIR_ALLTOALL_TAG, comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/alltoall/alltoall_intra_brucks.c b/src/mpi/coll/alltoall/alltoall_intra_brucks.c index 41387e5fda3..cab282cd903 100644 --- a/src/mpi/coll/alltoall/alltoall_intra_brucks.c +++ b/src/mpi/coll/alltoall/alltoall_intra_brucks.c @@ -23,13 +23,14 @@ int MPIR_Alltoall_intra_brucks(const void *sendbuf, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int comm_size, i, pof2; MPI_Aint sendtype_extent, recvtype_extent; MPI_Aint recvtype_sz; int mpi_errno = MPI_SUCCESS, src, dst, rank; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int block, count; MPI_Aint pack_size; MPI_Datatype newtype = MPI_DATATYPE_NULL; @@ -108,7 +109,8 @@ int MPIR_Alltoall_intra_brucks(const void *sendbuf, mpi_errno = MPIC_Sendrecv(tmp_buf, newtype_sz, MPI_BYTE, dst, MPIR_ALLTOALL_TAG, recvbuf, 1, newtype, - src, MPIR_ALLTOALL_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + src, MPIR_ALLTOALL_TAG, comm_ptr, MPI_STATUS_IGNORE, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPIR_Type_free_impl(&newtype); diff --git a/src/mpi/coll/alltoall/alltoall_intra_k_brucks.c b/src/mpi/coll/alltoall/alltoall_intra_k_brucks.c index d6caec11f82..18c86f201ee 100644 --- a/src/mpi/coll/alltoall/alltoall_intra_k_brucks.c +++ b/src/mpi/coll/alltoall/alltoall_intra_k_brucks.c @@ -108,11 +108,11 @@ int MPIR_Alltoall_intra_k_brucks(const void *sendbuf, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcnt, - MPI_Datatype recvtype, MPIR_Comm * comm, int k, - MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm, int k, int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int i, j; int rank, size; int nphases, max; @@ -252,12 +252,12 @@ int MPIR_Alltoall_intra_k_brucks(const void *sendbuf, mpi_errno = MPIC_Irecv(tmp_rbuf[j - 1], packsize, MPI_BYTE, src, MPIR_ALLTOALL_TAG, comm, - &reqs[num_reqs++]); + collattr, &reqs[num_reqs++]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); mpi_errno = MPIC_Isend(tmp_sbuf[j - 1], packsize, MPI_BYTE, dst, MPIR_ALLTOALL_TAG, comm, - &reqs[num_reqs++], errflag); + &reqs[num_reqs++], collattr | errflag); if (mpi_errno) { MPIR_ERR_POP(mpi_errno); } diff --git a/src/mpi/coll/alltoall/alltoall_intra_pairwise.c b/src/mpi/coll/alltoall/alltoall_intra_pairwise.c index aa45262cf06..2a5e2806f28 100644 --- a/src/mpi/coll/alltoall/alltoall_intra_pairwise.c +++ b/src/mpi/coll/alltoall/alltoall_intra_pairwise.c @@ -27,13 +27,13 @@ int MPIR_Alltoall_intra_pairwise(const void *sendbuf, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int comm_size, i; MPI_Aint sendtype_extent, recvtype_extent; int mpi_errno = MPI_SUCCESS, src, dst, rank; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; comm_size = comm_ptr->local_size; @@ -76,7 +76,7 @@ int MPIR_Alltoall_intra_pairwise(const void *sendbuf, ((char *) recvbuf + src * recvcount * recvtype_extent), recvcount, recvtype, src, - MPIR_ALLTOALL_TAG, comm_ptr, &status, errflag); + MPIR_ALLTOALL_TAG, comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c b/src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c index daae3380903..101e55eb297 100644 --- a/src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c +++ b/src/mpi/coll/alltoall/alltoall_intra_pairwise_sendrecv_replace.c @@ -25,12 +25,13 @@ int MPIR_Alltoall_intra_pairwise_sendrecv_replace(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int comm_size, i, j; MPI_Aint recvtype_extent; int mpi_errno = MPI_SUCCESS, rank; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; comm_size = comm_ptr->local_size; @@ -56,14 +57,14 @@ int MPIR_Alltoall_intra_pairwise_sendrecv_replace(const void *sendbuf, mpi_errno = MPIC_Sendrecv_replace(((char *) recvbuf + j * recvcount * recvtype_extent), recvcount, recvtype, j, MPIR_ALLTOALL_TAG, j, - MPIR_ALLTOALL_TAG, comm_ptr, &status, errflag); + MPIR_ALLTOALL_TAG, comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (rank == j) { /* same as above with i/j args reversed */ mpi_errno = MPIC_Sendrecv_replace(((char *) recvbuf + i * recvcount * recvtype_extent), recvcount, recvtype, i, MPIR_ALLTOALL_TAG, i, - MPIR_ALLTOALL_TAG, comm_ptr, &status, errflag); + MPIR_ALLTOALL_TAG, comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/alltoall/alltoall_intra_scattered.c b/src/mpi/coll/alltoall/alltoall_intra_scattered.c index bf16a9c965b..719c6f567cf 100644 --- a/src/mpi/coll/alltoall/alltoall_intra_scattered.c +++ b/src/mpi/coll/alltoall/alltoall_intra_scattered.c @@ -32,13 +32,13 @@ int MPIR_Alltoall_intra_scattered(const void *sendbuf, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int comm_size, i; MPI_Aint sendtype_extent, recvtype_extent; int mpi_errno = MPI_SUCCESS, dst, rank; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPIR_Request **reqarray; MPI_Status *starray; MPIR_CHKLMEM_DECL(6); @@ -73,7 +73,7 @@ int MPIR_Alltoall_intra_scattered(const void *sendbuf, mpi_errno = MPIC_Irecv((char *) recvbuf + dst * recvcount * recvtype_extent, recvcount, recvtype, dst, - MPIR_ALLTOALL_TAG, comm_ptr, &reqarray[i]); + MPIR_ALLTOALL_TAG, comm_ptr, collattr, &reqarray[i]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -82,7 +82,8 @@ int MPIR_Alltoall_intra_scattered(const void *sendbuf, mpi_errno = MPIC_Isend((char *) sendbuf + dst * sendcount * sendtype_extent, sendcount, sendtype, dst, - MPIR_ALLTOALL_TAG, comm_ptr, &reqarray[i + ss], errflag); + MPIR_ALLTOALL_TAG, comm_ptr, &reqarray[i + ss], + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c b/src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c index 40854e91c20..18b84d8bc75 100644 --- a/src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c +++ b/src/mpi/coll/alltoallv/alltoallv_allcomm_nb.c @@ -8,7 +8,7 @@ int MPIR_Alltoallv_allcomm_nb(const void *sendbuf, const MPI_Aint * sendcounts, const MPI_Aint * sdispls, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; @@ -16,7 +16,7 @@ int MPIR_Alltoallv_allcomm_nb(const void *sendbuf, const MPI_Aint * sendcounts, /* just call the nonblocking version and wait on it */ mpi_errno = MPIR_Ialltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, - recvtype, comm_ptr, &req_ptr); + recvtype, comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c b/src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c index da7c3be6fe9..c019e8342a0 100644 --- a/src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c +++ b/src/mpi/coll/alltoallv/alltoallv_inter_pairwise_exchange.c @@ -23,12 +23,13 @@ int MPIR_Alltoallv_inter_pairwise_exchange(const void *sendbuf, const MPI_Aint * const MPI_Aint * sdispls, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int local_size, remote_size, max_size, i; MPI_Aint send_extent, recv_extent; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; int src, dst, rank; char *sendaddr, *recvaddr; @@ -66,7 +67,8 @@ int MPIR_Alltoallv_inter_pairwise_exchange(const void *sendbuf, const MPI_Aint * mpi_errno = MPIC_Sendrecv(sendaddr, sendcount, sendtype, dst, MPIR_ALLTOALLV_TAG, recvaddr, recvcount, - recvtype, src, MPIR_ALLTOALLV_TAG, comm_ptr, &status, errflag); + recvtype, src, MPIR_ALLTOALLV_TAG, comm_ptr, &status, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c b/src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c index ae2fdadb9a6..7fa9b670108 100644 --- a/src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c +++ b/src/mpi/coll/alltoallv/alltoallv_intra_pairwise_sendrecv_replace.c @@ -22,12 +22,13 @@ int MPIR_Alltoallv_intra_pairwise_sendrecv_replace(const void *sendbuf, const MP const MPI_Aint * sdispls, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int comm_size, i, j; MPI_Aint recv_extent; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; int rank; @@ -59,7 +60,7 @@ int MPIR_Alltoallv_intra_pairwise_sendrecv_replace(const void *sendbuf, const MP recvcounts[j], recvtype, j, MPIR_ALLTOALLV_TAG, j, MPIR_ALLTOALLV_TAG, - comm_ptr, &status, errflag); + comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (rank == j) { @@ -68,7 +69,7 @@ int MPIR_Alltoallv_intra_pairwise_sendrecv_replace(const void *sendbuf, const MP recvcounts[i], recvtype, i, MPIR_ALLTOALLV_TAG, i, MPIR_ALLTOALLV_TAG, - comm_ptr, &status, errflag); + comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/alltoallv/alltoallv_intra_scattered.c b/src/mpi/coll/alltoallv/alltoallv_intra_scattered.c index 14b081309da..7c78673a904 100644 --- a/src/mpi/coll/alltoallv/alltoallv_intra_scattered.c +++ b/src/mpi/coll/alltoallv/alltoallv_intra_scattered.c @@ -24,13 +24,13 @@ int MPIR_Alltoallv_intra_scattered(const void *sendbuf, const MPI_Aint * sendcounts, const MPI_Aint * sdispls, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr) { int comm_size, i; MPI_Aint send_extent, recv_extent; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status *starray; MPIR_Request **reqarray; int dst, rank, req_cnt; @@ -73,7 +73,8 @@ int MPIR_Alltoallv_intra_scattered(const void *sendbuf, const MPI_Aint * sendcou if (type_size) { mpi_errno = MPIC_Irecv((char *) recvbuf + rdispls[dst] * recv_extent, recvcounts[dst], recvtype, dst, - MPIR_ALLTOALLV_TAG, comm_ptr, &reqarray[req_cnt]); + MPIR_ALLTOALLV_TAG, comm_ptr, collattr, + &reqarray[req_cnt]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); req_cnt++; } @@ -89,7 +90,7 @@ int MPIR_Alltoallv_intra_scattered(const void *sendbuf, const MPI_Aint * sendcou mpi_errno = MPIC_Isend((char *) sendbuf + sdispls[dst] * send_extent, sendcounts[dst], sendtype, dst, MPIR_ALLTOALLV_TAG, comm_ptr, - &reqarray[req_cnt], errflag); + &reqarray[req_cnt], collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); req_cnt++; } diff --git a/src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c b/src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c index e3e55da8a89..cce5a40dd4a 100644 --- a/src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c +++ b/src/mpi/coll/alltoallw/alltoallw_allcomm_nb.c @@ -8,8 +8,7 @@ int MPIR_Alltoallw_allcomm_nb(const void *sendbuf, const MPI_Aint sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], - const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; @@ -17,7 +16,7 @@ int MPIR_Alltoallw_allcomm_nb(const void *sendbuf, const MPI_Aint sendcounts[], /* just call the nonblocking version and wait on it */ mpi_errno = MPIR_Ialltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, - recvtypes, comm_ptr, &req_ptr); + recvtypes, comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c b/src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c index f5ec24cf2d1..2cd3ab7bbf2 100644 --- a/src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c +++ b/src/mpi/coll/alltoallw/alltoallw_inter_pairwise_exchange.c @@ -23,11 +23,12 @@ int MPIR_Alltoallw_inter_pairwise_exchange(const void *sendbuf, const MPI_Aint s const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int local_size, remote_size, max_size, i; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; int src, dst, rank; char *sendaddr, *recvaddr; @@ -67,7 +68,7 @@ int MPIR_Alltoallw_inter_pairwise_exchange(const void *sendbuf, const MPI_Aint s mpi_errno = MPIC_Sendrecv(sendaddr, sendcount, sendtype, dst, MPIR_ALLTOALLW_TAG, recvaddr, recvcount, recvtype, src, - MPIR_ALLTOALLW_TAG, comm_ptr, &status, errflag); + MPIR_ALLTOALLW_TAG, comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } return mpi_errno_ret; diff --git a/src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c b/src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c index bfb22a0446f..a780d74adbd 100644 --- a/src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c +++ b/src/mpi/coll/alltoallw/alltoallw_intra_pairwise_sendrecv_replace.c @@ -23,11 +23,12 @@ int MPIR_Alltoallw_intra_pairwise_sendrecv_replace(const void *sendbuf, const MP const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int comm_size, i, j; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; int rank; @@ -56,7 +57,7 @@ int MPIR_Alltoallw_intra_pairwise_sendrecv_replace(const void *sendbuf, const MP recvcounts[j], recvtypes[j], j, MPIR_ALLTOALLW_TAG, j, MPIR_ALLTOALLW_TAG, - comm_ptr, &status, errflag); + comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (rank == j) { /* same as above with i/j args reversed */ @@ -64,7 +65,7 @@ int MPIR_Alltoallw_intra_pairwise_sendrecv_replace(const void *sendbuf, const MP recvcounts[i], recvtypes[i], i, MPIR_ALLTOALLW_TAG, i, MPIR_ALLTOALLW_TAG, - comm_ptr, &status, errflag); + comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/alltoallw/alltoallw_intra_scattered.c b/src/mpi/coll/alltoallw/alltoallw_intra_scattered.c index 9cd2396d648..145613c1cb6 100644 --- a/src/mpi/coll/alltoallw/alltoallw_intra_scattered.c +++ b/src/mpi/coll/alltoallw/alltoallw_intra_scattered.c @@ -23,11 +23,12 @@ int MPIR_Alltoallw_intra_scattered(const void *sendbuf, const MPI_Aint sendcount const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int comm_size, i; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status *starray; MPIR_Request **reqarray; int dst, rank; @@ -71,7 +72,7 @@ int MPIR_Alltoallw_intra_scattered(const void *sendbuf, const MPI_Aint sendcount mpi_errno = MPIC_Irecv((char *) recvbuf + rdispls[dst], recvcounts[dst], recvtypes[dst], dst, MPIR_ALLTOALLW_TAG, comm_ptr, - &reqarray[outstanding_requests]); + collattr, &reqarray[outstanding_requests]); MPIR_ERR_CHECK(mpi_errno); outstanding_requests++; @@ -87,7 +88,7 @@ int MPIR_Alltoallw_intra_scattered(const void *sendbuf, const MPI_Aint sendcount mpi_errno = MPIC_Isend((char *) sendbuf + sdispls[dst], sendcounts[dst], sendtypes[dst], dst, MPIR_ALLTOALLW_TAG, comm_ptr, - &reqarray[outstanding_requests], errflag); + &reqarray[outstanding_requests], collattr | errflag); MPIR_ERR_CHECK(mpi_errno); outstanding_requests++; diff --git a/src/mpi/coll/barrier/barrier_allcomm_nb.c b/src/mpi/coll/barrier/barrier_allcomm_nb.c index 72a579949fd..83b9725a45c 100644 --- a/src/mpi/coll/barrier/barrier_allcomm_nb.c +++ b/src/mpi/coll/barrier/barrier_allcomm_nb.c @@ -5,13 +5,13 @@ #include "mpiimpl.h" -int MPIR_Barrier_allcomm_nb(MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) +int MPIR_Barrier_allcomm_nb(MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; /* just call the nonblocking version and wait on it */ - mpi_errno = MPIR_Ibarrier(comm_ptr, &req_ptr); + mpi_errno = MPIR_Ibarrier(comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/barrier/barrier_inter_bcast.c b/src/mpi/coll/barrier/barrier_inter_bcast.c index f8fa70c94ea..715c7ca1845 100644 --- a/src/mpi/coll/barrier/barrier_inter_bcast.c +++ b/src/mpi/coll/barrier/barrier_inter_bcast.c @@ -17,10 +17,11 @@ * group. */ -int MPIR_Barrier_inter_bcast(MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) +int MPIR_Barrier_inter_bcast(MPIR_Comm * comm_ptr, int collattr) { int rank, mpi_errno = MPI_SUCCESS, root; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int i = 0; MPIR_Comm *newcomm_ptr = NULL; @@ -35,28 +36,28 @@ int MPIR_Barrier_inter_bcast(MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) newcomm_ptr = comm_ptr->local_comm; /* do a barrier on the local intracommunicator */ - mpi_errno = MPIR_Barrier(newcomm_ptr, errflag); + mpi_errno = MPIR_Barrier(newcomm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (comm_ptr->is_low_group) { /* bcast to right */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; - mpi_errno = MPIR_Bcast(&i, 1, MPI_BYTE, root, comm_ptr, errflag); + mpi_errno = MPIR_Bcast(&i, 1, MPI_BYTE, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* receive bcast from right */ root = 0; - mpi_errno = MPIR_Bcast(&i, 1, MPI_BYTE, root, comm_ptr, errflag); + mpi_errno = MPIR_Bcast(&i, 1, MPI_BYTE, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* receive bcast from left */ root = 0; - mpi_errno = MPIR_Bcast(&i, 1, MPI_BYTE, root, comm_ptr, errflag); + mpi_errno = MPIR_Bcast(&i, 1, MPI_BYTE, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* bcast to left */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; - mpi_errno = MPIR_Bcast(&i, 1, MPI_BYTE, root, comm_ptr, errflag); + mpi_errno = MPIR_Bcast(&i, 1, MPI_BYTE, root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } fn_exit: diff --git a/src/mpi/coll/barrier/barrier_intra_k_dissemination.c b/src/mpi/coll/barrier/barrier_intra_k_dissemination.c index 04af6d60ff8..eaa3014f7f3 100644 --- a/src/mpi/coll/barrier/barrier_intra_k_dissemination.c +++ b/src/mpi/coll/barrier/barrier_intra_k_dissemination.c @@ -16,13 +16,13 @@ * process i sends to process (i + 2^k) % p and receives from process * (i - 2^k + p) % p. */ -int MPIR_Barrier_intra_dissemination(MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) +int MPIR_Barrier_intra_dissemination(MPIR_Comm * comm_ptr, int collattr) { int size, rank, src, dst, mask, mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; - size = comm_ptr->local_size; - rank = comm_ptr->rank; + MPIR_COLL_GET_RANK_SIZE(comm_ptr, collattr, rank, size); mask = 0x1; while (mask < size) { @@ -30,7 +30,8 @@ int MPIR_Barrier_intra_dissemination(MPIR_Comm * comm_ptr, MPIR_Errflag_t errfla src = (rank - mask + size) % size; mpi_errno = MPIC_Sendrecv(NULL, 0, MPI_BYTE, dst, MPIR_BARRIER_TAG, NULL, 0, MPI_BYTE, - src, MPIR_BARRIER_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + src, MPIR_BARRIER_TAG, comm_ptr, MPI_STATUS_IGNORE, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); mask <<= 1; } @@ -41,9 +42,10 @@ int MPIR_Barrier_intra_dissemination(MPIR_Comm * comm_ptr, MPIR_Errflag_t errfla /* Algorithm: high radix dissemination * Similar to dissemination algorithm, but generalized with high radix k */ -int MPIR_Barrier_intra_k_dissemination(MPIR_Comm * comm, int k, MPIR_Errflag_t errflag) +int MPIR_Barrier_intra_k_dissemination(MPIR_Comm * comm, int k, int collattr) { int mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int i, j, nranks, rank; int p_of_k; /* minimum power of k that is greater than or equal to number of ranks */ int shift, to, from; @@ -51,8 +53,7 @@ int MPIR_Barrier_intra_k_dissemination(MPIR_Comm * comm, int k, MPIR_Errflag_t e MPIR_Request *sreqs[MAX_RADIX], *rreqs[MAX_RADIX * 2]; MPIR_Request **send_reqs = NULL, **recv_reqs = NULL; - nranks = MPIR_Comm_size(comm); - rank = MPIR_Comm_rank(comm); + MPIR_COLL_GET_RANK_SIZE(comm, collattr, rank, nranks); if (nranks == 1) goto fn_exit; @@ -61,7 +62,7 @@ int MPIR_Barrier_intra_k_dissemination(MPIR_Comm * comm, int k, MPIR_Errflag_t e k = nranks; if (k == 2) { - return MPIR_Barrier_intra_dissemination(comm, errflag); + return MPIR_Barrier_intra_dissemination(comm, collattr); } /* If k value is greater than the maximum radix defined by MAX_RADIX macro, @@ -95,9 +96,8 @@ int MPIR_Barrier_intra_k_dissemination(MPIR_Comm * comm, int k, MPIR_Errflag_t e MPIR_Assert(to >= 0 && to < nranks); /* recv from (k-1) nbrs */ - mpi_errno = - MPIC_Irecv(NULL, 0, MPI_BYTE, from, MPIR_BARRIER_TAG, comm, - &recv_reqs[(j - 1) + ((k - 1) * (i & 1))]); + mpi_errno = MPIC_Irecv(NULL, 0, MPI_BYTE, from, MPIR_BARRIER_TAG, comm, + collattr, &recv_reqs[(j - 1) + ((k - 1) * (i & 1))]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* wait on recvs from prev phase */ if (i > 0 && j == 1) { @@ -106,9 +106,8 @@ int MPIR_Barrier_intra_k_dissemination(MPIR_Comm * comm, int k, MPIR_Errflag_t e MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } - mpi_errno = - MPIC_Isend(NULL, 0, MPI_BYTE, to, MPIR_BARRIER_TAG, comm, &send_reqs[j - 1], - errflag); + mpi_errno = MPIC_Isend(NULL, 0, MPI_BYTE, to, MPIR_BARRIER_TAG, comm, &send_reqs[j - 1], + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } mpi_errno = MPIC_Waitall(k - 1, send_reqs, MPI_STATUSES_IGNORE); diff --git a/src/mpi/coll/barrier/barrier_intra_recexch.c b/src/mpi/coll/barrier/barrier_intra_recexch.c index a46a6e25d8e..fa48af4575f 100644 --- a/src/mpi/coll/barrier/barrier_intra_recexch.c +++ b/src/mpi/coll/barrier/barrier_intra_recexch.c @@ -8,14 +8,13 @@ /* Algorithm: call Allreduce's recursive exchange algorithm */ -int MPIR_Barrier_intra_recexch(MPIR_Comm * comm, int k, int single_phase_recv, - MPIR_Errflag_t errflag) +int MPIR_Barrier_intra_recexch(MPIR_Comm * comm, int k, int single_phase_recv, int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Allreduce_intra_recexch(MPI_IN_PLACE, NULL, 0, MPI_BYTE, MPI_SUM, comm, - k, single_phase_recv, errflag); + k, single_phase_recv, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: diff --git a/src/mpi/coll/barrier/barrier_intra_smp.c b/src/mpi/coll/barrier/barrier_intra_smp.c index eb05bd1ab50..ca2db2bf35e 100644 --- a/src/mpi/coll/barrier/barrier_intra_smp.c +++ b/src/mpi/coll/barrier/barrier_intra_smp.c @@ -5,22 +5,23 @@ #include "mpiimpl.h" -int MPIR_Barrier_intra_smp(MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) +int MPIR_Barrier_intra_smp(MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPIR_Assert(MPIR_Comm_is_parent_comm(comm_ptr)); /* do the intranode barrier on all nodes */ if (comm_ptr->node_comm != NULL) { - mpi_errno = MPIR_Barrier(comm_ptr->node_comm, errflag); + mpi_errno = MPIR_Barrier(comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } /* do the barrier across roots of all nodes */ if (comm_ptr->node_roots_comm != NULL) { - mpi_errno = MPIR_Barrier(comm_ptr->node_roots_comm, errflag); + mpi_errno = MPIR_Barrier(comm_ptr->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -29,7 +30,7 @@ int MPIR_Barrier_intra_smp(MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) * anything) */ if (comm_ptr->node_comm != NULL) { int i = 0; - mpi_errno = MPIR_Bcast(&i, 1, MPI_BYTE, 0, comm_ptr->node_comm, errflag); + mpi_errno = MPIR_Bcast(&i, 1, MPI_BYTE, 0, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/bcast/bcast.h b/src/mpi/coll/bcast/bcast.h index 23d15fc1325..24eef3ae920 100644 --- a/src/mpi/coll/bcast/bcast.h +++ b/src/mpi/coll/bcast/bcast.h @@ -10,6 +10,6 @@ int MPII_Scatter_for_bcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, MPI_Aint nbytes, void *tmp_buf, - int is_contig, MPIR_Errflag_t errflag); + int is_contig, int collattr); #endif /* BCAST_H_INCLUDED */ diff --git a/src/mpi/coll/bcast/bcast_allcomm_nb.c b/src/mpi/coll/bcast/bcast_allcomm_nb.c index 99c615ca658..7a1557338da 100644 --- a/src/mpi/coll/bcast/bcast_allcomm_nb.c +++ b/src/mpi/coll/bcast/bcast_allcomm_nb.c @@ -6,13 +6,13 @@ #include "mpiimpl.h" int MPIR_Bcast_allcomm_nb(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; /* just call the nonblocking version and wait on it */ - mpi_errno = MPIR_Ibcast(buffer, count, datatype, root, comm_ptr, &req_ptr); + mpi_errno = MPIR_Ibcast(buffer, count, datatype, root, comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c b/src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c index 0fc329600ac..69c9d3adc1d 100644 --- a/src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c +++ b/src/mpi/coll/bcast/bcast_inter_remote_send_local_bcast.c @@ -14,10 +14,11 @@ int MPIR_Bcast_inter_remote_send_local_bcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, - int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { int rank, mpi_errno; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; MPIR_Comm *newcomm_ptr = NULL; @@ -29,7 +30,8 @@ int MPIR_Bcast_inter_remote_send_local_bcast(void *buffer, mpi_errno = MPI_SUCCESS; } else if (root == MPI_ROOT) { /* root sends to rank 0 on remote group and returns */ - mpi_errno = MPIC_Send(buffer, count, datatype, 0, MPIR_BCAST_TAG, comm_ptr, errflag); + mpi_errno = + MPIC_Send(buffer, count, datatype, 0, MPIR_BCAST_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* remote group. rank 0 on remote group receives from root */ @@ -37,7 +39,9 @@ int MPIR_Bcast_inter_remote_send_local_bcast(void *buffer, rank = comm_ptr->rank; if (rank == 0) { - mpi_errno = MPIC_Recv(buffer, count, datatype, root, MPIR_BCAST_TAG, comm_ptr, &status); + mpi_errno = + MPIC_Recv(buffer, count, datatype, root, MPIR_BCAST_TAG, comm_ptr, collattr, + &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -51,7 +55,8 @@ int MPIR_Bcast_inter_remote_send_local_bcast(void *buffer, /* now do the usual broadcast on this intracommunicator * with rank 0 as root. */ - mpi_errno = MPIR_Bcast_allcomm_auto(buffer, count, datatype, 0, newcomm_ptr, errflag); + mpi_errno = + MPIR_Bcast_allcomm_auto(buffer, count, datatype, 0, newcomm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/bcast/bcast_intra_binomial.c b/src/mpi/coll/bcast/bcast_intra_binomial.c index 8b846f8e392..866b31fcb24 100644 --- a/src/mpi/coll/bcast/bcast_intra_binomial.c +++ b/src/mpi/coll/bcast/bcast_intra_binomial.c @@ -12,13 +12,13 @@ */ int MPIR_Bcast_intra_binomial(void *buffer, MPI_Aint count, - MPI_Datatype datatype, - int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, int collattr) { int rank, comm_size, src, dst; int relative_rank, mask; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint nbytes = 0; MPI_Status *status_p; #ifdef HAVE_ERROR_CHECKING @@ -93,10 +93,10 @@ int MPIR_Bcast_intra_binomial(void *buffer, src += comm_size; if (!is_contig) mpi_errno = MPIC_Recv(tmp_buf, nbytes, MPI_BYTE, src, - MPIR_BCAST_TAG, comm_ptr, status_p); + MPIR_BCAST_TAG, comm_ptr, collattr, status_p); else mpi_errno = MPIC_Recv(buffer, count, datatype, src, - MPIR_BCAST_TAG, comm_ptr, status_p); + MPIR_BCAST_TAG, comm_ptr, collattr, status_p); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); #ifdef HAVE_ERROR_CHECKING /* check that we received as much as we expected */ @@ -127,10 +127,10 @@ int MPIR_Bcast_intra_binomial(void *buffer, dst -= comm_size; if (!is_contig) mpi_errno = MPIC_Send(tmp_buf, nbytes, MPI_BYTE, dst, - MPIR_BCAST_TAG, comm_ptr, errflag); + MPIR_BCAST_TAG, comm_ptr, collattr | errflag); else mpi_errno = MPIC_Send(buffer, count, datatype, dst, - MPIR_BCAST_TAG, comm_ptr, errflag); + MPIR_BCAST_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } mask >>= 1; diff --git a/src/mpi/coll/bcast/bcast_intra_pipelined_tree.c b/src/mpi/coll/bcast/bcast_intra_pipelined_tree.c index 13ca0040a81..d71687ce5cc 100644 --- a/src/mpi/coll/bcast/bcast_intra_pipelined_tree.c +++ b/src/mpi/coll/bcast/bcast_intra_pipelined_tree.c @@ -16,12 +16,13 @@ int MPIR_Bcast_intra_pipelined_tree(void *buffer, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, int tree_type, int branching_factor, int is_nb, int chunk_size, - int recv_pre_posted, MPIR_Errflag_t errflag) + int recv_pre_posted, int collattr) { int rank, comm_size, i, j, k, *p, src = -1, dst, offset = 0; int is_contig; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; MPI_Aint type_size, num_chunks, chunk_size_floor, chunk_size_ceil; MPI_Aint true_lb, true_extent, recvd_size, actual_packed_unpacked_bytes, nbytes = 0; @@ -103,7 +104,7 @@ int MPIR_Bcast_intra_pipelined_tree(void *buffer, if (src != -1) { /* post receive from parent */ mpi_errno = MPIC_Irecv((char *) sendbuf + offset, msgsize, MPI_BYTE, - src, MPIR_BCAST_TAG, comm_ptr, &reqs[num_req++]); + src, MPIR_BCAST_TAG, comm_ptr, collattr, &reqs[num_req++]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } offset += msgsize; @@ -116,7 +117,7 @@ int MPIR_Bcast_intra_pipelined_tree(void *buffer, if (src != -1) { mpi_errno = MPIC_Irecv((char *) sendbuf + offset, msgsize, MPI_BYTE, - src, MPIR_BCAST_TAG, comm_ptr, &reqs[num_req++]); + src, MPIR_BCAST_TAG, comm_ptr, collattr, &reqs[num_req++]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } offset += msgsize; @@ -149,7 +150,7 @@ int MPIR_Bcast_intra_pipelined_tree(void *buffer, if (src != -1) { mpi_errno = MPIC_Recv((char *) sendbuf + offset, msgsize, MPI_BYTE, - src, MPIR_BCAST_TAG, comm_ptr, &status); + src, MPIR_BCAST_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPIR_Get_count_impl(&status, MPI_BYTE, &recvd_size); MPIR_ERR_COLL_CHECK_SIZE(recvd_size, msgsize, errflag, mpi_errno_ret); @@ -167,11 +168,11 @@ int MPIR_Bcast_intra_pipelined_tree(void *buffer, if (!is_nb) { mpi_errno = MPIC_Send((char *) sendbuf + offset, msgsize, MPI_BYTE, dst, - MPIR_BCAST_TAG, comm_ptr, errflag); + MPIR_BCAST_TAG, comm_ptr, collattr | errflag); } else { mpi_errno = MPIC_Isend((char *) sendbuf + offset, msgsize, MPI_BYTE, dst, - MPIR_BCAST_TAG, comm_ptr, &reqs[num_req++], errflag); + MPIR_BCAST_TAG, comm_ptr, &reqs[num_req++], collattr | errflag); } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -183,11 +184,11 @@ int MPIR_Bcast_intra_pipelined_tree(void *buffer, dst = *p; if (!is_nb) { mpi_errno = MPIC_Send((char *) sendbuf + offset, msgsize, MPI_BYTE, dst, - MPIR_BCAST_TAG, comm_ptr, errflag); + MPIR_BCAST_TAG, comm_ptr, collattr | errflag); } else { mpi_errno = MPIC_Isend((char *) sendbuf + offset, msgsize, MPI_BYTE, dst, - MPIR_BCAST_TAG, comm_ptr, &reqs[num_req++], errflag); + MPIR_BCAST_TAG, comm_ptr, &reqs[num_req++], collattr | errflag); } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c b/src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c index fcb8e40bdfd..69dc1532517 100644 --- a/src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c +++ b/src/mpi/coll/bcast/bcast_intra_scatter_recursive_doubling_allgather.c @@ -29,14 +29,14 @@ int MPIR_Bcast_intra_scatter_recursive_doubling_allgather(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { MPI_Status status; int rank, comm_size, dst; int relative_rank, mask; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint curr_size, recv_size = 0; int j, k, i, tmp_mask, is_contig; MPI_Aint type_size, nbytes; @@ -80,7 +80,7 @@ int MPIR_Bcast_intra_scatter_recursive_doubling_allgather(void *buffer, scatter_size = (nbytes + comm_size - 1) / comm_size; /* ceiling division */ mpi_errno = MPII_Scatter_for_bcast(buffer, count, datatype, root, comm_ptr, - nbytes, tmp_buf, is_contig, errflag); + nbytes, tmp_buf, is_contig, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* curr_size is the amount of data that this process now has stored in @@ -120,7 +120,8 @@ int MPIR_Bcast_intra_scatter_recursive_doubling_allgather(void *buffer, curr_size, MPI_BYTE, dst, MPIR_BCAST_TAG, ((char *) tmp_buf + recv_offset), (nbytes - recv_offset < 0 ? 0 : nbytes - recv_offset), - MPI_BYTE, dst, MPIR_BCAST_TAG, comm_ptr, &status, errflag); + MPI_BYTE, dst, MPIR_BCAST_TAG, comm_ptr, &status, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (mpi_errno) { recv_size = 0; @@ -185,7 +186,7 @@ int MPIR_Bcast_intra_scatter_recursive_doubling_allgather(void *buffer, * fflush(stdout); */ mpi_errno = MPIC_Send(((char *) tmp_buf + offset), recv_size, MPI_BYTE, dst, - MPIR_BCAST_TAG, comm_ptr, errflag); + MPIR_BCAST_TAG, comm_ptr, collattr | errflag); /* recv_size was set in the previous * receive. that's the amount of data to be * sent now. */ @@ -200,7 +201,8 @@ int MPIR_Bcast_intra_scatter_recursive_doubling_allgather(void *buffer, * relative_rank, dst); */ mpi_errno = MPIC_Recv(((char *) tmp_buf + offset), nbytes - offset < 0 ? 0 : nbytes - offset, - MPI_BYTE, dst, MPIR_BCAST_TAG, comm_ptr, &status); + MPI_BYTE, dst, MPIR_BCAST_TAG, comm_ptr, collattr, + &status); /* nprocs_completed is also equal to the no. of processes * whose data we don't have */ MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); diff --git a/src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c b/src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c index f03633ce756..4e2f70f747d 100644 --- a/src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c +++ b/src/mpi/coll/bcast/bcast_intra_scatter_ring_allgather.c @@ -24,11 +24,12 @@ int MPIR_Bcast_intra_scatter_ring_allgather(void *buffer, MPI_Aint count, MPI_Datatype datatype, - int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { int rank, comm_size; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint scatter_size; int j, i, is_contig; MPI_Aint nbytes, type_size; @@ -71,7 +72,7 @@ int MPIR_Bcast_intra_scatter_ring_allgather(void *buffer, scatter_size = (nbytes + comm_size - 1) / comm_size; /* ceiling division */ mpi_errno = MPII_Scatter_for_bcast(buffer, count, datatype, root, comm_ptr, - nbytes, tmp_buf, is_contig, errflag); + nbytes, tmp_buf, is_contig, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* long-message allgather or medium-size but non-power-of-two. use ring algorithm. */ @@ -104,7 +105,8 @@ int MPIR_Bcast_intra_scatter_ring_allgather(void *buffer, mpi_errno = MPIC_Sendrecv((char *) tmp_buf + right_disp, right_count, MPI_BYTE, right, MPIR_BCAST_TAG, (char *) tmp_buf + left_disp, left_count, - MPI_BYTE, left, MPIR_BCAST_TAG, comm_ptr, &status, errflag); + MPI_BYTE, left, MPIR_BCAST_TAG, comm_ptr, &status, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPIR_Get_count_impl(&status, MPI_BYTE, &recvd_size); curr_size += recvd_size; diff --git a/src/mpi/coll/bcast/bcast_intra_smp.c b/src/mpi/coll/bcast/bcast_intra_smp.c index 2844b76522b..d049f3b1cee 100644 --- a/src/mpi/coll/bcast/bcast_intra_smp.c +++ b/src/mpi/coll/bcast/bcast_intra_smp.c @@ -11,10 +11,11 @@ * be able to make changes along these lines almost exclusively in this function * and some new functions. [goodell@ 2008/01/07] */ int MPIR_Bcast_intra_smp(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint type_size, nbytes = 0; MPI_Status *status_p; #ifdef HAVE_ERROR_CHECKING @@ -41,12 +42,12 @@ int MPIR_Bcast_intra_smp(void *buffer, MPI_Aint count, MPI_Datatype datatype, in if (comm_ptr->node_comm != NULL && MPIR_Get_intranode_rank(comm_ptr, root) > 0) { /* is not the node root (0) and is on our node (!-1) */ if (root == comm_ptr->rank) { mpi_errno = MPIC_Send(buffer, count, datatype, 0, - MPIR_BCAST_TAG, comm_ptr->node_comm, errflag); + MPIR_BCAST_TAG, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (0 == comm_ptr->node_comm->rank) { mpi_errno = MPIC_Recv(buffer, count, datatype, MPIR_Get_intranode_rank(comm_ptr, root), - MPIR_BCAST_TAG, comm_ptr->node_comm, status_p); + MPIR_BCAST_TAG, comm_ptr->node_comm, collattr, status_p); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); #ifdef HAVE_ERROR_CHECKING /* check that we received as much as we expected */ @@ -61,13 +62,14 @@ int MPIR_Bcast_intra_smp(void *buffer, MPI_Aint count, MPI_Datatype datatype, in if (comm_ptr->node_roots_comm != NULL) { mpi_errno = MPIR_Bcast(buffer, count, datatype, MPIR_Get_internode_rank(comm_ptr, root), - comm_ptr->node_roots_comm, errflag); + comm_ptr->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } /* perform the intranode broadcast on all except for the root's node */ if (comm_ptr->node_comm != NULL) { - mpi_errno = MPIR_Bcast(buffer, count, datatype, 0, comm_ptr->node_comm, errflag); + mpi_errno = + MPIR_Bcast(buffer, count, datatype, 0, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } else { /* (nbytes > MPIR_CVAR_BCAST_SHORT_MSG_SIZE) && (comm_ptr->size >= MPIR_CVAR_BCAST_MIN_PROCS) */ @@ -85,7 +87,7 @@ int MPIR_Bcast_intra_smp(void *buffer, MPI_Aint count, MPI_Datatype datatype, in * right algorithms here. */ mpi_errno = MPIR_Bcast(buffer, count, datatype, MPIR_Get_intranode_rank(comm_ptr, root), - comm_ptr->node_comm, errflag); + comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -93,7 +95,7 @@ int MPIR_Bcast_intra_smp(void *buffer, MPI_Aint count, MPI_Datatype datatype, in if (comm_ptr->node_roots_comm != NULL) { mpi_errno = MPIR_Bcast(buffer, count, datatype, MPIR_Get_internode_rank(comm_ptr, root), - comm_ptr->node_roots_comm, errflag); + comm_ptr->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -102,7 +104,8 @@ int MPIR_Bcast_intra_smp(void *buffer, MPI_Aint count, MPI_Datatype datatype, in /* FIXME binomial may not be the best algorithm for on-node * bcast. We need a more comprehensive system for selecting the * right algorithms here. */ - mpi_errno = MPIR_Bcast(buffer, count, datatype, 0, comm_ptr->node_comm, errflag); + mpi_errno = + MPIR_Bcast(buffer, count, datatype, 0, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } else { /* large msg or non-pof2 */ @@ -112,7 +115,7 @@ int MPIR_Bcast_intra_smp(void *buffer, MPI_Aint count, MPI_Datatype datatype, in * communication. */ mpi_errno = MPIR_Bcast_intra_scatter_ring_allgather(buffer, count, datatype, root, comm_ptr, - errflag); + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/bcast/bcast_intra_tree.c b/src/mpi/coll/bcast/bcast_intra_tree.c index afcc6e6e2fa..3466828690d 100644 --- a/src/mpi/coll/bcast/bcast_intra_tree.c +++ b/src/mpi/coll/bcast/bcast_intra_tree.c @@ -13,12 +13,13 @@ int MPIR_Bcast_intra_tree(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, int tree_type, - int branching_factor, int is_nb, MPIR_Errflag_t errflag) + int branching_factor, int is_nb, int collattr) { int rank, comm_size, src, dst, *p, j, k, lrank, is_contig; int parent = -1, num_children = 0, num_req = 0, is_root = 0; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint nbytes = 0, type_size, actual_packed_unpacked_bytes, recvd_size; MPI_Aint saved_count = count; MPI_Status status; @@ -91,7 +92,8 @@ int MPIR_Bcast_intra_tree(void *buffer, if ((parent != -1 && tree_type != MPIR_TREE_TYPE_KARY) || (!is_root && tree_type == MPIR_TREE_TYPE_KARY)) { src = parent; - mpi_errno = MPIC_Recv(send_buf, count, dtype, src, MPIR_BCAST_TAG, comm_ptr, &status); + mpi_errno = + MPIC_Recv(send_buf, count, dtype, src, MPIR_BCAST_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* check that we received as much as we expected */ MPIR_Get_count_impl(&status, MPI_BYTE, &recvd_size); @@ -107,10 +109,12 @@ int MPIR_Bcast_intra_tree(void *buffer, if (!is_nb) { mpi_errno = - MPIC_Send(send_buf, count, dtype, dst, MPIR_BCAST_TAG, comm_ptr, errflag); + MPIC_Send(send_buf, count, dtype, dst, MPIR_BCAST_TAG, comm_ptr, + collattr | errflag); } else { mpi_errno = MPIC_Isend(send_buf, count, dtype, dst, - MPIR_BCAST_TAG, comm_ptr, &reqs[num_req++], errflag); + MPIR_BCAST_TAG, comm_ptr, &reqs[num_req++], + collattr | errflag); } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -121,10 +125,12 @@ int MPIR_Bcast_intra_tree(void *buffer, if (!is_nb) { mpi_errno = - MPIC_Send(send_buf, count, dtype, dst, MPIR_BCAST_TAG, comm_ptr, errflag); + MPIC_Send(send_buf, count, dtype, dst, MPIR_BCAST_TAG, comm_ptr, + collattr | errflag); } else { mpi_errno = MPIC_Isend(send_buf, count, dtype, dst, - MPIR_BCAST_TAG, comm_ptr, &reqs[num_req++], errflag); + MPIR_BCAST_TAG, comm_ptr, &reqs[num_req++], + collattr | errflag); } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/bcast/bcast_utils.c b/src/mpi/coll/bcast/bcast_utils.c index 9892e7f954a..a338938725c 100644 --- a/src/mpi/coll/bcast/bcast_utils.c +++ b/src/mpi/coll/bcast/bcast_utils.c @@ -21,13 +21,14 @@ int MPII_Scatter_for_bcast(void *buffer ATTRIBUTE((unused)), MPI_Datatype datatype ATTRIBUTE((unused)), int root, MPIR_Comm * comm_ptr, - MPI_Aint nbytes, void *tmp_buf, int is_contig, MPIR_Errflag_t errflag) + MPI_Aint nbytes, void *tmp_buf, int is_contig, int collattr) { MPI_Status status; int rank, comm_size, src, dst; int relative_rank, mask; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint scatter_size, recv_size = 0; MPI_Aint curr_size, send_size; @@ -67,7 +68,8 @@ int MPII_Scatter_for_bcast(void *buffer ATTRIBUTE((unused)), } else { mpi_errno = MPIC_Recv(((char *) tmp_buf + relative_rank * scatter_size), - recv_size, MPI_BYTE, src, MPIR_BCAST_TAG, comm_ptr, &status); + recv_size, MPI_BYTE, src, MPIR_BCAST_TAG, comm_ptr, collattr, + &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (mpi_errno) { curr_size = 0; @@ -97,7 +99,8 @@ int MPII_Scatter_for_bcast(void *buffer ATTRIBUTE((unused)), dst -= comm_size; mpi_errno = MPIC_Send(((char *) tmp_buf + scatter_size * (relative_rank + mask)), - send_size, MPI_BYTE, dst, MPIR_BCAST_TAG, comm_ptr, errflag); + send_size, MPI_BYTE, dst, MPIR_BCAST_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); curr_size -= send_size; diff --git a/src/mpi/coll/exscan/exscan_allcomm_nb.c b/src/mpi/coll/exscan/exscan_allcomm_nb.c index a1050eb428f..53f54be2e8c 100644 --- a/src/mpi/coll/exscan/exscan_allcomm_nb.c +++ b/src/mpi/coll/exscan/exscan_allcomm_nb.c @@ -6,14 +6,13 @@ #include "mpiimpl.h" int MPIR_Exscan_allcomm_nb(const void *sendbuf, void *recvbuf, MPI_Aint count, - MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; /* just call the nonblocking version and wait on it */ - mpi_errno = MPIR_Iexscan(sendbuf, recvbuf, count, datatype, op, comm_ptr, &req_ptr); + mpi_errno = MPIR_Iexscan(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/exscan/exscan_intra_recursive_doubling.c b/src/mpi/coll/exscan/exscan_intra_recursive_doubling.c index 91e78f27e14..e521cef0b48 100644 --- a/src/mpi/coll/exscan/exscan_intra_recursive_doubling.c +++ b/src/mpi/coll/exscan/exscan_intra_recursive_doubling.c @@ -48,12 +48,13 @@ int MPIR_Exscan_intra_recursive_doubling(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { MPI_Status status; int rank, comm_size; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int mask, dst, is_commutative, flag; MPI_Aint true_extent, true_lb, extent; void *partial_scan, *tmp_buf; @@ -94,7 +95,7 @@ int MPIR_Exscan_intra_recursive_doubling(const void *sendbuf, mpi_errno = MPIC_Sendrecv(partial_scan, count, datatype, dst, MPIR_EXSCAN_TAG, tmp_buf, count, datatype, dst, - MPIR_EXSCAN_TAG, comm_ptr, &status, errflag); + MPIR_EXSCAN_TAG, comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (rank > dst) { diff --git a/src/mpi/coll/gather/gather_allcomm_nb.c b/src/mpi/coll/gather/gather_allcomm_nb.c index 91f4f71b68a..a576621eb04 100644 --- a/src/mpi/coll/gather/gather_allcomm_nb.c +++ b/src/mpi/coll/gather/gather_allcomm_nb.c @@ -7,7 +7,7 @@ int MPIR_Gather_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; @@ -15,7 +15,7 @@ int MPIR_Gather_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype /* just call the nonblocking version and wait on it */ mpi_errno = MPIR_Igather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, - &req_ptr); + collattr, &req_ptr); mpi_errno = MPIC_Wait(req_ptr); MPIR_ERR_CHECK(mpi_errno); diff --git a/src/mpi/coll/gather/gather_inter_linear.c b/src/mpi/coll/gather/gather_inter_linear.c index 5c9802203c5..2e6902202fb 100644 --- a/src/mpi/coll/gather/gather_inter_linear.c +++ b/src/mpi/coll/gather/gather_inter_linear.c @@ -15,10 +15,11 @@ int MPIR_Gather_inter_linear(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int remote_size, mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int i; MPI_Status status; MPI_Aint extent; @@ -36,12 +37,13 @@ int MPIR_Gather_inter_linear(const void *sendbuf, MPI_Aint sendcount, MPI_Dataty for (i = 0; i < remote_size; i++) { mpi_errno = MPIC_Recv(((char *) recvbuf + recvcount * i * extent), recvcount, recvtype, i, - MPIR_GATHER_TAG, comm_ptr, &status); + MPIR_GATHER_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } else { mpi_errno = - MPIC_Send(sendbuf, sendcount, sendtype, root, MPIR_GATHER_TAG, comm_ptr, errflag); + MPIC_Send(sendbuf, sendcount, sendtype, root, MPIR_GATHER_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/gather/gather_inter_local_gather_remote_send.c b/src/mpi/coll/gather/gather_inter_local_gather_remote_send.c index 7b3d241cd45..cf42bf1fbbd 100644 --- a/src/mpi/coll/gather/gather_inter_local_gather_remote_send.c +++ b/src/mpi/coll/gather/gather_inter_local_gather_remote_send.c @@ -16,10 +16,11 @@ int MPIR_Gather_inter_local_gather_remote_send(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int rank, local_size, remote_size, mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; MPIR_Comm *newcomm_ptr = NULL; MPIR_CHKLMEM_DECL(1); @@ -36,7 +37,7 @@ int MPIR_Gather_inter_local_gather_remote_send(const void *sendbuf, MPI_Aint sen /* root receives data from rank 0 on remote group */ mpi_errno = MPIC_Recv(recvbuf, recvcount * remote_size, recvtype, 0, MPIR_GATHER_TAG, comm_ptr, - &status); + collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* remote group. Rank 0 allocates temporary buffer, does @@ -68,12 +69,12 @@ int MPIR_Gather_inter_local_gather_remote_send(const void *sendbuf, MPI_Aint sen /* now do the a local gather on this intracommunicator */ mpi_errno = MPIR_Gather(sendbuf, sendcount, sendtype, tmp_buf, sendcount * sendtype_sz, MPI_BYTE, 0, newcomm_ptr, - errflag); + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (rank == 0) { mpi_errno = MPIC_Send(tmp_buf, sendcount * local_size * sendtype_sz, MPI_BYTE, - root, MPIR_GATHER_TAG, comm_ptr, errflag); + root, MPIR_GATHER_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/gather/gather_intra_binomial.c b/src/mpi/coll/gather/gather_intra_binomial.c index 1f8dfbbee6f..57207f053f1 100644 --- a/src/mpi/coll/gather/gather_intra_binomial.c +++ b/src/mpi/coll/gather/gather_intra_binomial.c @@ -39,11 +39,12 @@ */ int MPIR_Gather_intra_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int comm_size, rank; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int relative_rank; int mask, src, dst, relative_src; MPI_Aint curr_cnt = 0, nbytes, sendtype_size, recvtype_size; @@ -139,13 +140,15 @@ int MPIR_Gather_intra_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Data (((rank + mask) % comm_size) * (MPI_Aint) recvcount * extent)), (MPI_Aint) recvblks * recvcount, - recvtype, src, MPIR_GATHER_TAG, comm_ptr, &status); + recvtype, src, MPIR_GATHER_TAG, comm_ptr, collattr, + &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (nbytes < MPIR_CVAR_GATHER_VSMALL_MSG_SIZE) { /* small transfer size case. cast ok */ MPIR_Assert(recvblks * nbytes == (int) (recvblks * nbytes)); mpi_errno = MPIC_Recv(tmp_buf, (int) (recvblks * nbytes), - MPI_BYTE, src, MPIR_GATHER_TAG, comm_ptr, &status); + MPI_BYTE, src, MPIR_GATHER_TAG, comm_ptr, collattr, + &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); copy_offset = rank + mask; copy_blks = recvblks; @@ -165,7 +168,7 @@ int MPIR_Gather_intra_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Data MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Recv(recvbuf, 1, tmp_type, src, - MPIR_GATHER_TAG, comm_ptr, &status); + MPIR_GATHER_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPIR_Type_free_impl(&tmp_type); @@ -186,7 +189,7 @@ int MPIR_Gather_intra_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Data offset = (mask - 1) * nbytes; mpi_errno = MPIC_Recv(((char *) tmp_buf + offset), recvblks * nbytes, MPI_BYTE, src, - MPIR_GATHER_TAG, comm_ptr, &status); + MPIR_GATHER_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); curr_cnt += (recvblks * nbytes); } @@ -198,11 +201,11 @@ int MPIR_Gather_intra_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Data if (!tmp_buf_size) { /* leaf nodes send directly from sendbuf */ mpi_errno = MPIC_Send(sendbuf, sendcount, sendtype, dst, - MPIR_GATHER_TAG, comm_ptr, errflag); + MPIR_GATHER_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (nbytes < MPIR_CVAR_GATHER_VSMALL_MSG_SIZE) { mpi_errno = MPIC_Send(tmp_buf, curr_cnt, MPI_BYTE, dst, - MPIR_GATHER_TAG, comm_ptr, errflag); + MPIR_GATHER_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { MPI_Aint blocks[2]; @@ -227,7 +230,7 @@ int MPIR_Gather_intra_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Data MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Send(MPI_BOTTOM, 1, tmp_type, dst, - MPIR_GATHER_TAG, comm_ptr, errflag); + MPIR_GATHER_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPIR_Type_free_impl(&tmp_type); if (types[1] != MPI_BYTE) diff --git a/src/mpi/coll/gatherv/gatherv_allcomm_linear.c b/src/mpi/coll/gatherv/gatherv_allcomm_linear.c index 6fc78479807..875dadeef08 100644 --- a/src/mpi/coll/gatherv/gatherv_allcomm_linear.c +++ b/src/mpi/coll/gatherv/gatherv_allcomm_linear.c @@ -41,12 +41,12 @@ int MPIR_Gatherv_allcomm_linear(const void *sendbuf, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, - MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, int collattr) { int comm_size, rank; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint extent; int i, reqs; int min_procs; @@ -84,7 +84,7 @@ int MPIR_Gatherv_allcomm_linear(const void *sendbuf, } else { mpi_errno = MPIC_Irecv(((char *) recvbuf + displs[i] * extent), recvcounts[i], recvtype, i, - MPIR_GATHERV_TAG, comm_ptr, &reqarray[reqs++]); + MPIR_GATHERV_TAG, comm_ptr, collattr, &reqarray[reqs++]); MPIR_ERR_CHECK(mpi_errno); } } @@ -109,11 +109,11 @@ int MPIR_Gatherv_allcomm_linear(const void *sendbuf, if (comm_size >= min_procs) { mpi_errno = MPIC_Ssend(sendbuf, sendcount, sendtype, root, - MPIR_GATHERV_TAG, comm_ptr, errflag); + MPIR_GATHERV_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { mpi_errno = MPIC_Send(sendbuf, sendcount, sendtype, root, - MPIR_GATHERV_TAG, comm_ptr, errflag); + MPIR_GATHERV_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/gatherv/gatherv_allcomm_nb.c b/src/mpi/coll/gatherv/gatherv_allcomm_nb.c index 3a49ce11a4e..b59204b581f 100644 --- a/src/mpi/coll/gatherv/gatherv_allcomm_nb.c +++ b/src/mpi/coll/gatherv/gatherv_allcomm_nb.c @@ -7,8 +7,7 @@ int MPIR_Gatherv_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, - MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; @@ -16,7 +15,7 @@ int MPIR_Gatherv_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatyp /* just call the nonblocking version and wait on it */ mpi_errno = MPIR_Igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, - comm_ptr, &req_ptr); + comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c index b15b77ed365..8727bfc790a 100644 --- a/src/mpi/coll/helper_fns.c +++ b/src/mpi/coll/helper_fns.c @@ -10,6 +10,23 @@ #define MPIC_REQUEST_PTR_ARRAY_SIZE 64 #endif +#define FIND_AND_REPLACE_SUBCOMM_RANK(comm, collattr, rank) \ + do { \ + int subcomm_type = MPIR_COLL_ATTR_GET_SUBCOMM_TYPE(collattr); \ + if (subcomm_type) { \ + int subcomm_index = MPIR_COLL_ATTR_GET_SUBCOMM_INDEX(collattr); \ + MPIR_Assert(subcomm_index < comm->subcomm_depth); \ + switch(subcomm_type) { \ + case MPIR_COLL_SUBCOMM_TYPE_CHILD: \ + rank = comm_ptr->child_subcomm[subcomm_index].ranklist[rank]; \ + break; \ + case MPIR_COLL_SUBCOMM_TYPE_ROOTS: \ + rank = comm_ptr->roots_subcomm[subcomm_index].ranklist[rank]; \ + break; \ + } \ + } \ + } while (0) + /* These functions are used in the implementation of collective operations. They are wrappers around MPID send/recv functions. They do sends/receives by setting the context offset MPIR_CONTEXT_COLL_OFFSET. @@ -98,7 +115,7 @@ int MPIC_Wait(MPIR_Request * request_ptr) this is OK since there is no data that can be received corrupted. */ int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int attr = 0; @@ -115,7 +132,9 @@ int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, "**countneg", "**countneg %d", count); MPIR_PT2PT_ATTR_SET_CONTEXT_OFFSET(attr, MPIR_CONTEXT_COLL_OFFSET); - MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, errflag); + MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, MPIR_COLL_ATTR_GET_ERRFLAG(collattr)); + + FIND_AND_REPLACE_SUBCOMM_RANK(comm_ptr, collattr, dest); mpi_errno = MPID_Send(buf, count, datatype, dest, tag, comm_ptr, attr, &request_ptr); MPIR_ERR_CHECK(mpi_errno); @@ -139,7 +158,7 @@ int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, } int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag, - MPIR_Comm * comm_ptr, MPI_Status * status) + MPIR_Comm * comm_ptr, int collattr, MPI_Status * status) { int mpi_errno = MPI_SUCCESS; int attr = 0; @@ -162,6 +181,8 @@ int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int if (status == MPI_STATUS_IGNORE) status = &mystatus; + FIND_AND_REPLACE_SUBCOMM_RANK(comm_ptr, collattr, source); + mpi_errno = MPID_Recv(buf, count, datatype, source, tag, comm_ptr, attr, status, &request_ptr); MPIR_ERR_CHECK(mpi_errno); if (request_ptr) { @@ -193,7 +214,7 @@ int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int } int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int attr = 0; @@ -210,9 +231,11 @@ int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, "**countneg", "**countneg %d", count); MPIR_PT2PT_ATTR_SET_CONTEXT_OFFSET(attr, MPIR_CONTEXT_COLL_OFFSET); - MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, errflag); + MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, MPIR_COLL_ATTR_GET_ERRFLAG(collattr)); MPIR_PT2PT_ATTR_SET_SYNCFLAG(attr); + FIND_AND_REPLACE_SUBCOMM_RANK(comm_ptr, collattr, dest); + mpi_errno = MPID_Send(buf, count, datatype, dest, tag, comm_ptr, attr, &request_ptr); MPIR_ERR_CHECK(mpi_errno); if (request_ptr) { @@ -237,7 +260,7 @@ int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int source, int recvtag, - MPIR_Comm * comm_ptr, MPI_Status * status, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, MPI_Status * status, int collattr) { int mpi_errno = MPI_SUCCESS; int attr = 0; @@ -253,6 +276,9 @@ int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype MPIR_PT2PT_ATTR_SET_CONTEXT_OFFSET(attr, MPIR_CONTEXT_COLL_OFFSET); + FIND_AND_REPLACE_SUBCOMM_RANK(comm_ptr, collattr, dest); + FIND_AND_REPLACE_SUBCOMM_RANK(comm_ptr, collattr, source); + if (status == MPI_STATUS_IGNORE) status = &mystatus; @@ -274,7 +300,7 @@ int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype MPIR_ERR_CHKANDSTMT(send_req_ptr == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); } else { - MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, errflag); + MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, MPIR_COLL_ATTR_GET_ERRFLAG(collattr)); mpi_errno = MPID_Isend(sendbuf, sendcount, sendtype, dest, sendtag, comm_ptr, attr, &send_req_ptr); MPIR_ERR_CHECK(mpi_errno); @@ -318,7 +344,7 @@ int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int sendtag, int source, int recvtag, - MPIR_Comm * comm_ptr, MPI_Status * status, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, MPI_Status * status, int collattr) { int mpi_errno = MPI_SUCCESS; MPI_Status mystatus; @@ -337,15 +363,9 @@ int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype, if (status == MPI_STATUS_IGNORE) status = &mystatus; - switch (errflag) { - case MPIR_ERR_NONE: - break; - case MPIR_ERR_PROC_FAILED: - MPIR_TAG_SET_PROC_FAILURE_BIT(sendtag); - /* fall through */ - default: - MPIR_TAG_SET_ERROR_BIT(sendtag); - } + + FIND_AND_REPLACE_SUBCOMM_RANK(comm_ptr, collattr, dest); + FIND_AND_REPLACE_SUBCOMM_RANK(comm_ptr, collattr, source); MPIR_PT2PT_ATTR_SET_CONTEXT_OFFSET(attr, MPIR_CONTEXT_COLL_OFFSET); @@ -375,7 +395,7 @@ int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype, sreq = MPIR_Request_create_complete(MPIR_REQUEST_KIND__SEND); MPIR_ERR_CHKANDSTMT(sreq == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail, "**nomemreq"); } else { - MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, errflag); + MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, MPIR_COLL_ATTR_GET_ERRFLAG(collattr)); mpi_errno = MPID_Isend(tmpbuf, actual_pack_bytes, MPI_PACKED, dest, sendtag, comm_ptr, attr, &sreq); MPIR_ERR_CHECK(mpi_errno); @@ -422,7 +442,7 @@ int MPIC_Sendrecv_replace(void *buf, MPI_Aint count, MPI_Datatype datatype, } int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_Request ** request_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, MPIR_Request ** request_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int attr = 0; @@ -441,7 +461,9 @@ int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, "**countneg", "**countneg %d", count); MPIR_PT2PT_ATTR_SET_CONTEXT_OFFSET(attr, MPIR_CONTEXT_COLL_OFFSET); - MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, errflag); + MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, MPIR_COLL_ATTR_GET_ERRFLAG(collattr)); + + FIND_AND_REPLACE_SUBCOMM_RANK(comm_ptr, collattr, dest); mpi_errno = MPID_Isend(buf, count, datatype, dest, tag, comm_ptr, attr, request_ptr); MPIR_ERR_CHECK(mpi_errno); @@ -456,7 +478,7 @@ int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, } int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_Request ** request_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, MPIR_Request ** request_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int attr = 0; @@ -475,9 +497,11 @@ int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest "**countneg", "**countneg %d", count); MPIR_PT2PT_ATTR_SET_CONTEXT_OFFSET(attr, MPIR_CONTEXT_COLL_OFFSET); - MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, errflag); + MPIR_PT2PT_ATTR_SET_ERRFLAG(attr, MPIR_COLL_ATTR_GET_ERRFLAG(collattr)); MPIR_PT2PT_ATTR_SET_SYNCFLAG(attr); + FIND_AND_REPLACE_SUBCOMM_RANK(comm_ptr, collattr, dest); + mpi_errno = MPID_Isend(buf, count, datatype, dest, tag, comm_ptr, attr, request_ptr); MPIR_ERR_CHECK(mpi_errno); @@ -491,7 +515,7 @@ int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest } int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, - int tag, MPIR_Comm * comm_ptr, MPIR_Request ** request_ptr) + int tag, MPIR_Comm * comm_ptr, int collattr, MPIR_Request ** request_ptr) { int mpi_errno = MPI_SUCCESS; int attr = 0; @@ -512,6 +536,8 @@ int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, MPIR_PT2PT_ATTR_SET_CONTEXT_OFFSET(attr, MPIR_CONTEXT_COLL_OFFSET); + FIND_AND_REPLACE_SUBCOMM_RANK(comm_ptr, collattr, source); + mpi_errno = MPID_Irecv(buf, count, datatype, source, tag, comm_ptr, attr, request_ptr); MPIR_ERR_CHECK(mpi_errno); diff --git a/src/mpi/coll/iallgather/iallgather_inter_sched_local_gather_remote_bcast.c b/src/mpi/coll/iallgather/iallgather_inter_sched_local_gather_remote_bcast.c index 62e702e4679..6b0509486f0 100644 --- a/src/mpi/coll/iallgather/iallgather_inter_sched_local_gather_remote_bcast.c +++ b/src/mpi/coll/iallgather/iallgather_inter_sched_local_gather_remote_bcast.c @@ -14,7 +14,8 @@ int MPIR_Iallgather_inter_sched_local_gather_remote_bcast(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, local_size, remote_size, root; @@ -46,7 +47,7 @@ int MPIR_Iallgather_inter_sched_local_gather_remote_bcast(const void *sendbuf, M if (sendcount != 0) { mpi_errno = MPIR_Igather_intra_sched_auto(sendbuf, sendcount, sendtype, tmp_buf, sendcount * sendtype_sz, MPI_BYTE, 0, - newcomm_ptr, s); + newcomm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -58,7 +59,7 @@ int MPIR_Iallgather_inter_sched_local_gather_remote_bcast(const void *sendbuf, M if (sendcount != 0) { root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Ibcast_inter_sched_auto(tmp_buf, sendcount * local_size * sendtype_sz, - MPI_BYTE, root, comm_ptr, s); + MPI_BYTE, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } @@ -68,7 +69,7 @@ int MPIR_Iallgather_inter_sched_local_gather_remote_bcast(const void *sendbuf, M if (recvcount != 0) { root = 0; mpi_errno = MPIR_Ibcast_inter_sched_auto(recvbuf, recvcount * remote_size, - recvtype, root, comm_ptr, s); + recvtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } MPIR_SCHED_BARRIER(s); @@ -77,7 +78,7 @@ int MPIR_Iallgather_inter_sched_local_gather_remote_bcast(const void *sendbuf, M if (recvcount != 0) { root = 0; mpi_errno = MPIR_Ibcast_inter_sched_auto(recvbuf, recvcount * remote_size, - recvtype, root, comm_ptr, s); + recvtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } @@ -87,7 +88,7 @@ int MPIR_Iallgather_inter_sched_local_gather_remote_bcast(const void *sendbuf, M if (sendcount != 0) { root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Ibcast_inter_sched_auto(tmp_buf, sendcount * local_size * sendtype_sz, - MPI_BYTE, root, comm_ptr, s); + MPI_BYTE, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/iallgather/iallgather_intra_sched_brucks.c b/src/mpi/coll/iallgather/iallgather_intra_sched_brucks.c index 955a1447ce5..beee72fcc77 100644 --- a/src/mpi/coll/iallgather/iallgather_intra_sched_brucks.c +++ b/src/mpi/coll/iallgather/iallgather_intra_sched_brucks.c @@ -16,7 +16,8 @@ */ int MPIR_Iallgather_intra_sched_brucks(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int pof2, rem, src, dst; @@ -56,11 +57,12 @@ int MPIR_Iallgather_intra_sched_brucks(const void *sendbuf, MPI_Aint sendcount, src = (rank + pof2) % comm_size; dst = (rank - pof2 + comm_size) % comm_size; - mpi_errno = MPIR_Sched_send(tmp_buf, curr_cnt * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(tmp_buf, curr_cnt * recvtype_sz, MPI_BYTE, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* logically sendrecv, so no barrier here */ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + curr_cnt * recvtype_sz), - curr_cnt * recvtype_sz, MPI_BYTE, src, comm_ptr, s); + curr_cnt * recvtype_sz, MPI_BYTE, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -76,11 +78,13 @@ int MPIR_Iallgather_intra_sched_brucks(const void *sendbuf, MPI_Aint sendcount, dst = (rank - pof2 + comm_size) % comm_size; mpi_errno = - MPIR_Sched_send(tmp_buf, rem * recvcount * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + MPIR_Sched_send(tmp_buf, rem * recvcount * recvtype_sz, MPI_BYTE, dst, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); /* logically sendrecv, so no barrier here */ mpi_errno = MPIR_Sched_recv((char *) tmp_buf + curr_cnt * recvtype_sz, - rem * recvcount * recvtype_sz, MPI_BYTE, src, comm_ptr, s); + rem * recvcount * recvtype_sz, MPI_BYTE, src, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/iallgather/iallgather_intra_sched_recursive_doubling.c b/src/mpi/coll/iallgather/iallgather_intra_sched_recursive_doubling.c index 81d670ebd5c..f57b2ac8896 100644 --- a/src/mpi/coll/iallgather/iallgather_intra_sched_recursive_doubling.c +++ b/src/mpi/coll/iallgather/iallgather_intra_sched_recursive_doubling.c @@ -44,7 +44,8 @@ static int dtp_release_ref(MPIR_Comm * comm, int tag, void *state) int MPIR_Iallgather_intra_sched_recursive_doubling(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; struct shared_state *ss = NULL; @@ -110,12 +111,13 @@ int MPIR_Iallgather_intra_sched_recursive_doubling(const void *sendbuf, MPI_Aint if (dst < comm_size) { mpi_errno = MPIR_Sched_send_defer(((char *) recvbuf + send_offset), - &ss->curr_count, recvtype, dst, comm_ptr, s); + &ss->curr_count, recvtype, dst, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); /* send-recv, no sched barrier here */ mpi_errno = MPIR_Sched_recv_status(((char *) recvbuf + recv_offset), ((comm_size - dst_tree_root) * recvcount), - recvtype, dst, comm_ptr, &ss->status, s); + recvtype, dst, comm_ptr, &ss->status, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -174,7 +176,7 @@ int MPIR_Iallgather_intra_sched_recursive_doubling(const void *sendbuf, MPI_Aint * sent now. */ mpi_errno = MPIR_Sched_send_defer(((char *) recvbuf + offset), &ss->last_recv_count, - recvtype, dst, comm_ptr, s); + recvtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -188,7 +190,8 @@ int MPIR_Iallgather_intra_sched_recursive_doubling(const void *sendbuf, MPI_Aint mpi_errno = MPIR_Sched_recv_status(((char *) recvbuf + offset), ((comm_size - (my_tree_root + mask)) * recvcount), - recvtype, dst, comm_ptr, &ss->status, s); + recvtype, dst, comm_ptr, &ss->status, + collattr, s); MPIR_SCHED_BARRIER(s); mpi_errno = MPIR_Sched_cb(&get_count, ss, s); MPIR_ERR_CHECK(mpi_errno); diff --git a/src/mpi/coll/iallgather/iallgather_intra_sched_ring.c b/src/mpi/coll/iallgather/iallgather_intra_sched_ring.c index 78bbbacce62..8ef47721cd3 100644 --- a/src/mpi/coll/iallgather/iallgather_intra_sched_ring.c +++ b/src/mpi/coll/iallgather/iallgather_intra_sched_ring.c @@ -22,7 +22,8 @@ */ int MPIR_Iallgather_intra_sched_ring(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size; @@ -52,11 +53,11 @@ int MPIR_Iallgather_intra_sched_ring(const void *sendbuf, MPI_Aint sendcount, MP jnext = left; for (i = 1; i < comm_size; i++) { mpi_errno = MPIR_Sched_send(((char *) recvbuf + j * recvcount * recvtype_extent), - recvcount, recvtype, right, comm_ptr, s); + recvcount, recvtype, right, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* concurrent, no barrier here */ mpi_errno = MPIR_Sched_recv(((char *) recvbuf + jnext * recvcount * recvtype_extent), - recvcount, recvtype, left, comm_ptr, s); + recvcount, recvtype, left, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/iallgather/iallgather_tsp_brucks.c b/src/mpi/coll/iallgather/iallgather_tsp_brucks.c index c3a1e448d3f..01738ad21df 100644 --- a/src/mpi/coll/iallgather/iallgather_tsp_brucks.c +++ b/src/mpi/coll/iallgather/iallgather_tsp_brucks.c @@ -10,7 +10,8 @@ int MPIR_TSP_Iallgather_sched_intra_brucks(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, int k, MPIR_TSP_sched_t sched) + MPIR_Comm * comm, int k, int collattr, + MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -117,18 +118,19 @@ MPIR_TSP_Iallgather_sched_intra_brucks(const void *sendbuf, MPI_Aint sendcount, /* Receive at the exact location. */ mpi_errno = MPIR_TSP_sched_irecv((char *) tmp_recvbuf + j * recvcount * delta * recvtype_extent, - count, recvtype, src, tag, comm, sched, 0, NULL, &vtx_id); + count, recvtype, src, tag, comm, collattr, sched, 0, NULL, + &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); recv_id[i_recv++] = vtx_id; /* Send from the start of recv till `count` amount of data. */ if (i == 0) mpi_errno = - MPIR_TSP_sched_isend(tmp_recvbuf, count, recvtype, dst, tag, comm, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_isend(tmp_recvbuf, count, recvtype, dst, tag, comm, collattr, + sched, 0, NULL, &vtx_id); else mpi_errno = MPIR_TSP_sched_isend(tmp_recvbuf, count, recvtype, dst, tag, - comm, sched, n_invtcs, recv_id, &vtx_id); + comm, collattr, sched, n_invtcs, recv_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } n_invtcs += (k - 1); diff --git a/src/mpi/coll/iallgather/iallgather_tsp_recexch.c b/src/mpi/coll/iallgather/iallgather_tsp_recexch.c index b95691fc4ff..55794c27645 100644 --- a/src/mpi/coll/iallgather/iallgather_tsp_recexch.c +++ b/src/mpi/coll/iallgather/iallgather_tsp_recexch.c @@ -13,6 +13,7 @@ static int MPIR_TSP_Iallgather_sched_intra_recexch_data_exchange(int rank, int n size_t recv_extent, MPI_Aint recvcount, int tag, MPIR_Comm * comm, + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; @@ -34,7 +35,7 @@ static int MPIR_TSP_Iallgather_sched_intra_recexch_data_exchange(int rank, int n /* send my data to partner */ mpi_errno = MPIR_TSP_sched_isend(((char *) recvbuf + send_offset), count * recvcount, recvtype, - partner, tag, comm, sched, 0, NULL, &vtx_id); + partner, tag, comm, collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -47,7 +48,7 @@ static int MPIR_TSP_Iallgather_sched_intra_recexch_data_exchange(int rank, int n /* recv data from my partner */ mpi_errno = MPIR_TSP_sched_irecv(((char *) recvbuf + recv_offset), count * recvcount, recvtype, - partner, tag, comm, sched, 0, NULL, &vtx_id); + partner, tag, comm, collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -63,7 +64,7 @@ static int MPIR_TSP_Iallgather_sched_intra_recexch_step1(int step1_sendto, int * void *recvbuf, size_t recv_extent, MPI_Aint recvcount, MPI_Datatype recvtype, int n_invtcs, int *invtx, MPIR_Comm * comm, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -82,15 +83,15 @@ static int MPIR_TSP_Iallgather_sched_intra_recexch_step1(int step1_sendto, int * else buf_to_send = (void *) sendbuf; mpi_errno = - MPIR_TSP_sched_isend(buf_to_send, recvcount, recvtype, step1_sendto, tag, comm, sched, - 0, NULL, &vtx_id); + MPIR_TSP_sched_isend(buf_to_send, recvcount, recvtype, step1_sendto, tag, comm, + collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { for (i = 0; i < step1_nrecvs; i++) { /* participating rank gets the data from non-participating rank */ MPI_Aint recv_offset = step1_recvfrom[i] * recv_extent * recvcount; mpi_errno = MPIR_TSP_sched_irecv(((char *) recvbuf + recv_offset), recvcount, recvtype, - step1_recvfrom[i], tag, comm, sched, n_invtcs, invtx, - &vtx_id); + step1_recvfrom[i], tag, comm, collattr, sched, + n_invtcs, invtx, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } @@ -107,7 +108,7 @@ static int MPIR_TSP_Iallgather_sched_intra_recexch_step2(int step1_sendto, int s void *recvbuf, size_t recv_extent, MPI_Aint recvcount, MPI_Datatype recvtype, int is_dist_halving, MPIR_Comm * comm, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -137,7 +138,7 @@ static int MPIR_TSP_Iallgather_sched_intra_recexch_step2(int step1_sendto, int s MPI_Aint send_offset = offset * recv_extent * recvcount; mpi_errno = MPIR_TSP_sched_isend(((char *) recvbuf + send_offset), count * recvcount, recvtype, - nbr, tag, comm, sched, nrecvs, recv_id, &vtx_id); + nbr, tag, comm, collattr, sched, nrecvs, recv_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, @@ -155,7 +156,7 @@ static int MPIR_TSP_Iallgather_sched_intra_recexch_step2(int step1_sendto, int s MPI_Aint recv_offset = offset * recv_extent * recvcount; mpi_errno = MPIR_TSP_sched_irecv(((char *) recvbuf + recv_offset), count * recvcount, recvtype, - nbr, tag, comm, sched, 0, NULL, &vtx_id); + nbr, tag, comm, collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -187,7 +188,7 @@ static int MPIR_TSP_Iallgather_sched_intra_recexch_step3(int step1_sendto, int * int nranks, int k, int nrecvs, int *recv_id, int tag, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -199,13 +200,13 @@ static int MPIR_TSP_Iallgather_sched_intra_recexch_step3(int step1_sendto, int * if (step1_sendto != -1) { mpi_errno = MPIR_TSP_sched_irecv(recvbuf, recvcount * nranks, recvtype, step1_sendto, tag, comm, - sched, 0, NULL, &vtx_id); + collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } for (i = 0; i < step1_nrecvs; i++) { mpi_errno = MPIR_TSP_sched_isend(recvbuf, recvcount * nranks, recvtype, step1_recvfrom[i], - tag, comm, sched, nrecvs, recv_id, &vtx_id); + tag, comm, collattr, sched, nrecvs, recv_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -227,7 +228,7 @@ int MPIR_TSP_Iallgather_sched_intra_recexch(const void *sendbuf, MPI_Aint sendco MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, int is_dist_halving, int k, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -287,7 +288,7 @@ int MPIR_TSP_Iallgather_sched_intra_recexch(const void *sendbuf, MPI_Aint sendco MPIR_TSP_Iallgather_sched_intra_recexch_step1(step1_sendto, step1_recvfrom, step1_nrecvs, is_inplace, rank, tag, sendbuf, recvbuf, recv_extent, recvcount, recvtype, n_invtcs, - &invtx, comm, sched); + &invtx, comm, collattr, sched); mpi_errno = MPIR_TSP_sched_fence(sched); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -297,7 +298,8 @@ int MPIR_TSP_Iallgather_sched_intra_recexch(const void *sendbuf, MPI_Aint sendco if (step1_sendto == -1) { MPIR_TSP_Iallgather_sched_intra_recexch_data_exchange(rank, nranks, k, p_of_k, log_pofk, T, recvbuf, recvtype, recv_extent, - recvcount, tag, comm, sched); + recvcount, tag, comm, collattr, + sched); mpi_errno = MPIR_TSP_sched_fence(sched); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -307,13 +309,14 @@ int MPIR_TSP_Iallgather_sched_intra_recexch(const void *sendbuf, MPI_Aint sendco MPIR_TSP_Iallgather_sched_intra_recexch_step2(step1_sendto, step2_nphases, step2_nbrs, rank, nranks, k, p_of_k, log_pofk, T, &nrecvs, &recv_id, tag, recvbuf, recv_extent, recvcount, recvtype, - is_dist_halving, comm, sched); + is_dist_halving, comm, collattr, sched); /* Step 3: This is reverse of Step 1. Ranks that participated in Step 2 * send the data to non-partcipating ranks */ MPIR_TSP_Iallgather_sched_intra_recexch_step3(step1_sendto, step1_recvfrom, step1_nrecvs, step2_nphases, recvbuf, recvcount, nranks, k, - nrecvs, recv_id, tag, recvtype, comm, sched); + nrecvs, recv_id, tag, recvtype, comm, collattr, + sched); /* free the memory */ for (i = 0; i < step2_nphases; i++) diff --git a/src/mpi/coll/iallgather/iallgather_tsp_ring.c b/src/mpi/coll/iallgather/iallgather_tsp_ring.c index c667f7b61cb..24eefaec5ab 100644 --- a/src/mpi/coll/iallgather/iallgather_tsp_ring.c +++ b/src/mpi/coll/iallgather/iallgather_tsp_ring.c @@ -9,7 +9,7 @@ int MPIR_TSP_Iallgather_sched_intra_ring(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_TSP_sched_t sched) + MPIR_Comm * comm, int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -91,14 +91,16 @@ int MPIR_TSP_Iallgather_sched_intra_ring(const void *sendbuf, MPI_Aint sendcount nvtcs = 1; vtcs[0] = dtcopy_id[0]; mpi_errno = MPIR_TSP_sched_isend((char *) sbuf, recvcount, recvtype, - dst, tag, comm, sched, nvtcs, vtcs, &send_id[0]); + dst, tag, comm, collattr, sched, nvtcs, vtcs, + &send_id[0]); nvtcs = 0; } else { nvtcs = 2; vtcs[0] = recv_id[(i - 1) % 3]; vtcs[1] = send_id[(i - 1) % 3]; mpi_errno = MPIR_TSP_sched_isend((char *) sbuf, recvcount, recvtype, - dst, tag, comm, sched, nvtcs, vtcs, &send_id[i % 3]); + dst, tag, comm, collattr, sched, nvtcs, vtcs, + &send_id[i % 3]); if (i == 1) { nvtcs = 2; vtcs[0] = send_id[0]; @@ -113,7 +115,8 @@ int MPIR_TSP_Iallgather_sched_intra_ring(const void *sendbuf, MPI_Aint sendcount MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); mpi_errno = MPIR_TSP_sched_irecv((char *) rbuf, recvcount, recvtype, - src, tag, comm, sched, nvtcs, vtcs, &recv_id[i % 3]); + src, tag, comm, collattr, sched, nvtcs, vtcs, + &recv_id[i % 3]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); diff --git a/src/mpi/coll/iallgatherv/iallgatherv_inter_sched_remote_gather_local_bcast.c b/src/mpi/coll/iallgatherv/iallgatherv_inter_sched_remote_gather_local_bcast.c index 575dbf7bedb..be12f0e2177 100644 --- a/src/mpi/coll/iallgatherv/iallgatherv_inter_sched_remote_gather_local_bcast.c +++ b/src/mpi/coll/iallgatherv/iallgatherv_inter_sched_remote_gather_local_bcast.c @@ -21,7 +21,8 @@ int MPIR_Iallgatherv_inter_sched_remote_gather_local_bcast(const void *sendbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int remote_size, root, rank; @@ -37,23 +38,27 @@ int MPIR_Iallgatherv_inter_sched_remote_gather_local_bcast(const void *sendbuf, /* gatherv from right group */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Igatherv_inter_sched_auto(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm_ptr, s); + recvcounts, displs, recvtype, root, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); /* gatherv to right group */ root = 0; mpi_errno = MPIR_Igatherv_inter_sched_auto(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm_ptr, s); + recvcounts, displs, recvtype, root, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* gatherv to left group */ root = 0; mpi_errno = MPIR_Igatherv_inter_sched_auto(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm_ptr, s); + recvcounts, displs, recvtype, root, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); /* gatherv from left group */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Igatherv_inter_sched_auto(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm_ptr, s); + recvcounts, displs, recvtype, root, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } @@ -76,7 +81,7 @@ int MPIR_Iallgatherv_inter_sched_remote_gather_local_bcast(const void *sendbuf, mpi_errno = MPIR_Type_commit_impl(&newtype); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIR_Ibcast_intra_sched_auto(recvbuf, 1, newtype, 0, newcomm_ptr, s); + mpi_errno = MPIR_Ibcast_intra_sched_auto(recvbuf, 1, newtype, 0, newcomm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_Type_free_impl(&newtype); diff --git a/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_brucks.c b/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_brucks.c index a849dd3522e..f13caaf8508 100644 --- a/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_brucks.c +++ b/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_brucks.c @@ -8,7 +8,8 @@ int MPIR_Iallgatherv_intra_sched_brucks(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size, rank, j, i; @@ -69,11 +70,14 @@ int MPIR_Iallgatherv_intra_sched_brucks(const void *sendbuf, MPI_Aint sendcount, incoming_count += recvcounts[(src + i) % comm_size]; } - mpi_errno = MPIR_Sched_send(tmp_buf, curr_count * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(tmp_buf, curr_count * recvtype_sz, MPI_BYTE, dst, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier */ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + curr_count * recvtype_sz), - incoming_count * recvtype_sz, MPI_BYTE, src, comm_ptr, s); + incoming_count * recvtype_sz, MPI_BYTE, src, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -92,12 +96,13 @@ int MPIR_Iallgatherv_intra_sched_brucks(const void *sendbuf, MPI_Aint sendcount, for (i = 0; i < rem; i++) cnt += recvcounts[(rank + i) % comm_size]; - mpi_errno = MPIR_Sched_send(tmp_buf, cnt * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(tmp_buf, cnt * recvtype_sz, MPI_BYTE, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier */ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + curr_count * recvtype_sz), (total_count - curr_count) * recvtype_sz, MPI_BYTE, - src, comm_ptr, s); + src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_recursive_doubling.c b/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_recursive_doubling.c index 95e56cf7c3b..e6c4f50d0bc 100644 --- a/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_recursive_doubling.c +++ b/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_recursive_doubling.c @@ -9,7 +9,8 @@ int MPIR_Iallgatherv_intra_sched_recursive_doubling(const void *sendbuf, MPI_Ain MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size, rank, i, j, k; @@ -108,11 +109,13 @@ int MPIR_Iallgatherv_intra_sched_recursive_doubling(const void *sendbuf, MPI_Ain incoming_count += recvcounts[j]; mpi_errno = MPIR_Sched_send(((char *) tmp_buf + send_offset * recvtype_sz), - curr_count * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + curr_count * recvtype_sz, MPI_BYTE, dst, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier here */ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + recv_offset * recvtype_sz), - incoming_count * recvtype_sz, MPI_BYTE, dst, comm_ptr, s); + incoming_count * recvtype_sz, MPI_BYTE, dst, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -177,7 +180,7 @@ int MPIR_Iallgatherv_intra_sched_recursive_doubling(const void *sendbuf, MPI_Ain * sent now. */ mpi_errno = MPIR_Sched_send(((char *) tmp_buf + offset), incoming_count * recvtype_sz, MPI_BYTE, - dst, comm_ptr, s); + dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -199,7 +202,7 @@ int MPIR_Iallgatherv_intra_sched_recursive_doubling(const void *sendbuf, MPI_Ain mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + offset * recvtype_sz), incoming_count * recvtype_sz, MPI_BYTE, - dst, comm_ptr, s); + dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); curr_count += incoming_count; diff --git a/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_ring.c b/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_ring.c index 5b101afa58c..a78b56c7ba2 100644 --- a/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_ring.c +++ b/src/mpi/coll/iallgatherv/iallgatherv_intra_sched_ring.c @@ -8,7 +8,8 @@ int MPIR_Iallgatherv_intra_sched_ring(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int i, total_count; @@ -77,12 +78,12 @@ int MPIR_Iallgatherv_intra_sched_ring(const void *sendbuf, MPI_Aint sendcount, /* Communicate */ if (recvnow) { /* If there's no data to send, just do a recv call */ - mpi_errno = MPIR_Sched_recv(rbuf, recvnow, recvtype, left, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(rbuf, recvnow, recvtype, left, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); torecv -= recvnow; } if (sendnow) { /* If there's no data to receive, just do a send call */ - mpi_errno = MPIR_Sched_send(sbuf, sendnow, recvtype, right, comm_ptr, s); + mpi_errno = MPIR_Sched_send(sbuf, sendnow, recvtype, right, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); tosend -= sendnow; } diff --git a/src/mpi/coll/iallgatherv/iallgatherv_tsp_brucks.c b/src/mpi/coll/iallgatherv/iallgatherv_tsp_brucks.c index ec1df1a1142..55250ef0354 100644 --- a/src/mpi/coll/iallgatherv/iallgatherv_tsp_brucks.c +++ b/src/mpi/coll/iallgatherv/iallgatherv_tsp_brucks.c @@ -30,7 +30,7 @@ MPIR_TSP_Iallgatherv_sched_intra_brucks(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], MPI_Datatype recvtype, MPIR_Comm * comm, - int k, MPIR_TSP_sched_t sched) + int k, int collattr, MPIR_TSP_sched_t sched) { int i, j, l; int nphases = 0; @@ -219,8 +219,8 @@ MPIR_TSP_Iallgatherv_sched_intra_brucks(const void *sendbuf, MPI_Aint sendcount, /* Recv at the exact location */ mpi_errno = MPIR_TSP_sched_irecv((char *) tmp_recvbuf + recv_index[idx] * recvtype_extent, - r_counts[i][j - 1], recvtype, src, tag, comm, sched, 0, NULL, - &vtx_id); + r_counts[i][j - 1], recvtype, src, tag, comm, collattr, sched, + 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); recv_id[idx] = vtx_id; @@ -229,7 +229,7 @@ MPIR_TSP_Iallgatherv_sched_intra_brucks(const void *sendbuf, MPI_Aint sendcount, /* Send from the start of recv till the count amount of data */ mpi_errno = MPIR_TSP_sched_isend(tmp_recvbuf, s_counts[i][j - 1], recvtype, dst, tag, comm, - sched, n_invtcs, recv_id, &vtx_id); + collattr, sched, n_invtcs, recv_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } n_invtcs += (k - 1); diff --git a/src/mpi/coll/iallgatherv/iallgatherv_tsp_recexch.c b/src/mpi/coll/iallgatherv/iallgatherv_tsp_recexch.c index ab4ce7c213a..ba6422a9dc6 100644 --- a/src/mpi/coll/iallgatherv/iallgatherv_tsp_recexch.c +++ b/src/mpi/coll/iallgatherv/iallgatherv_tsp_recexch.c @@ -14,6 +14,7 @@ static int MPIR_TSP_Iallgatherv_sched_intra_recexch_data_exchange(int rank, int const MPI_Aint * recvcounts, const MPI_Aint * displs, int tag, MPIR_Comm * comm, + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; @@ -41,7 +42,7 @@ static int MPIR_TSP_Iallgatherv_sched_intra_recexch_data_exchange(int rank, int /* send my data to partner */ mpi_errno = MPIR_TSP_sched_isend(((char *) recvbuf + send_offset), send_count, recvtype, partner, - tag, comm, sched, 0, NULL, &vtx_id); + tag, comm, collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* calculate offset and count of the data to be received from the partner */ @@ -55,7 +56,7 @@ static int MPIR_TSP_Iallgatherv_sched_intra_recexch_data_exchange(int rank, int recv_offset, recv_count)); /* recv data from my partner */ mpi_errno = MPIR_TSP_sched_irecv(((char *) recvbuf + recv_offset), recv_count, recvtype, - partner, tag, comm, sched, 0, NULL, &vtx_id); + partner, tag, comm, collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -73,7 +74,7 @@ static int MPIR_TSP_Iallgatherv_sched_intra_recexch_step1(int step1_sendto, int const MPI_Aint * displs, MPI_Datatype recvtype, int n_invtcs, int *invtx, MPIR_Comm * comm, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -92,7 +93,7 @@ static int MPIR_TSP_Iallgatherv_sched_intra_recexch_step1(int step1_sendto, int buf_to_send = (void *) sendbuf; mpi_errno = MPIR_TSP_sched_isend(buf_to_send, recvcounts[rank], recvtype, step1_sendto, tag, comm, - sched, 0, NULL, &vtx_id); + collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { for (i = 0; i < step1_nrecvs; i++) { /* participating rank gets the data from non-participating rank */ @@ -100,7 +101,7 @@ static int MPIR_TSP_Iallgatherv_sched_intra_recexch_step1(int step1_sendto, int mpi_errno = MPIR_TSP_sched_irecv(((char *) recvbuf + recv_offset), recvcounts[step1_recvfrom[i]], recvtype, step1_recvfrom[i], - tag, comm, sched, n_invtcs, invtx, &vtx_id); + tag, comm, collattr, sched, n_invtcs, invtx, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } @@ -118,7 +119,7 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch_step2(int step1_sendto, int step2_n size_t recv_extent, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, int is_dist_halving, MPIR_Comm * comm, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -150,7 +151,8 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch_step2(int step1_sendto, int step2_n for (x = 0; x < count; x++) send_count += recvcounts[offset + x]; mpi_errno = MPIR_TSP_sched_isend(((char *) recvbuf + send_offset), send_count, recvtype, - nbr, tag, comm, sched, nrecvs, recv_id, &vtx_id); + nbr, tag, comm, collattr, sched, nrecvs, recv_id, + &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, @@ -171,7 +173,7 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch_step2(int step1_sendto, int step2_n recv_count += recvcounts[offset + x]; mpi_errno = MPIR_TSP_sched_irecv(((char *) recvbuf + recv_offset), recv_count, recvtype, - nbr, tag, comm, sched, 0, NULL, &vtx_id); + nbr, tag, comm, collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); recv_id[j * (k - 1) + i] = vtx_id; @@ -202,7 +204,7 @@ static int MPIR_TSP_Iallgatherv_sched_intra_recexch_step3(int step1_sendto, int const MPI_Aint * recvcounts, int nranks, int k, int nrecvs, int *recv_id, int tag, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -217,14 +219,14 @@ static int MPIR_TSP_Iallgatherv_sched_intra_recexch_step3(int step1_sendto, int if (step1_sendto != -1) { mpi_errno = - MPIR_TSP_sched_irecv(recvbuf, total_count, recvtype, step1_sendto, tag, comm, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_irecv(recvbuf, total_count, recvtype, step1_sendto, tag, comm, collattr, + sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } for (i = 0; i < step1_nrecvs; i++) { mpi_errno = MPIR_TSP_sched_isend(recvbuf, total_count, recvtype, step1_recvfrom[i], - tag, comm, sched, nrecvs, recv_id, &vtx_id); + tag, comm, collattr, sched, nrecvs, recv_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -238,7 +240,8 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch(const void *sendbuf, MPI_Aint sendc MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm, - int is_dist_halving, int k, MPIR_TSP_sched_t sched) + int is_dist_halving, int k, int collattr, + MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int is_inplace, i; @@ -294,7 +297,7 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch(const void *sendbuf, MPI_Aint sendc MPIR_TSP_Iallgatherv_sched_intra_recexch_step1(step1_sendto, step1_recvfrom, step1_nrecvs, is_inplace, rank, tag, sendbuf, recvbuf, recv_extent, recvcounts, displs, recvtype, - n_invtcs, &invtx, comm, sched); + n_invtcs, &invtx, comm, collattr, sched); mpi_errno = MPIR_TSP_sched_fence(sched); MPIR_ERR_CHECK(mpi_errno); @@ -305,7 +308,7 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch(const void *sendbuf, MPI_Aint sendc MPIR_TSP_Iallgatherv_sched_intra_recexch_data_exchange(rank, nranks, k, p_of_k, log_pofk, T, recvbuf, recvtype, recv_extent, recvcounts, displs, - tag, comm, sched); + tag, comm, collattr, sched); mpi_errno = MPIR_TSP_sched_fence(sched); MPIR_ERR_CHECK(mpi_errno); } @@ -315,13 +318,15 @@ int MPIR_TSP_Iallgatherv_sched_intra_recexch(const void *sendbuf, MPI_Aint sendc MPIR_TSP_Iallgatherv_sched_intra_recexch_step2(step1_sendto, step2_nphases, step2_nbrs, rank, nranks, k, p_of_k, log_pofk, T, &nrecvs, &recv_id, tag, recvbuf, recv_extent, recvcounts, - displs, recvtype, is_dist_halving, comm, sched); + displs, recvtype, is_dist_halving, comm, + collattr, sched); /* Step 3: This is reverse of Step 1. Ranks that participated in Step 2 * send the data to non-partcipating ranks */ MPIR_TSP_Iallgatherv_sched_intra_recexch_step3(step1_sendto, step1_recvfrom, step1_nrecvs, step2_nphases, recvbuf, recvcounts, nranks, k, - nrecvs, recv_id, tag, recvtype, comm, sched); + nrecvs, recv_id, tag, recvtype, comm, collattr, + sched); fn_exit: /* free the memory */ diff --git a/src/mpi/coll/iallgatherv/iallgatherv_tsp_ring.c b/src/mpi/coll/iallgatherv/iallgatherv_tsp_ring.c index 87982188596..c07f6b93922 100644 --- a/src/mpi/coll/iallgatherv/iallgatherv_tsp_ring.c +++ b/src/mpi/coll/iallgatherv/iallgatherv_tsp_ring.c @@ -11,7 +11,7 @@ int MPIR_TSP_Iallgatherv_sched_intra_ring(const void *sendbuf, MPI_Aint sendcoun MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { size_t extent; MPI_Aint lb, true_extent; @@ -95,8 +95,8 @@ int MPIR_TSP_Iallgatherv_sched_intra_ring(const void *sendbuf, MPI_Aint sendcoun vtcs[0] = dtcopy_id[0]; mpi_errno = - MPIR_TSP_sched_isend(sbuf, recvcounts[send_rank], recvtype, dst, tag, comm, sched, - nvtcs, vtcs, &send_id[i % 3]); + MPIR_TSP_sched_isend(sbuf, recvcounts[send_rank], recvtype, dst, tag, comm, + collattr, sched, nvtcs, vtcs, &send_id[i % 3]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); nvtcs = 0; } else { @@ -105,8 +105,8 @@ int MPIR_TSP_Iallgatherv_sched_intra_ring(const void *sendbuf, MPI_Aint sendcoun vtcs[1] = send_id[(i - 1) % 3]; mpi_errno = - MPIR_TSP_sched_isend(sbuf, recvcounts[send_rank], recvtype, dst, tag, comm, sched, - nvtcs, vtcs, &send_id[i % 3]); + MPIR_TSP_sched_isend(sbuf, recvcounts[send_rank], recvtype, dst, tag, comm, + collattr, sched, nvtcs, vtcs, &send_id[i % 3]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (i == 1) { @@ -122,8 +122,8 @@ int MPIR_TSP_Iallgatherv_sched_intra_ring(const void *sendbuf, MPI_Aint sendcoun } mpi_errno = - MPIR_TSP_sched_irecv(rbuf, recvcounts[recv_rank], recvtype, src, tag, comm, sched, - nvtcs, vtcs, &recv_id[i % 3]); + MPIR_TSP_sched_irecv(rbuf, recvcounts[recv_rank], recvtype, src, tag, comm, collattr, + sched, nvtcs, vtcs, &recv_id[i % 3]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* Copy to correct position in recvbuf */ mpi_errno = diff --git a/src/mpi/coll/iallreduce/iallreduce_inter_sched_remote_reduce_local_bcast.c b/src/mpi/coll/iallreduce/iallreduce_inter_sched_remote_reduce_local_bcast.c index 1e4e312c83f..d1a78ca6e90 100644 --- a/src/mpi/coll/iallreduce/iallreduce_inter_sched_remote_reduce_local_bcast.c +++ b/src/mpi/coll/iallreduce/iallreduce_inter_sched_remote_reduce_local_bcast.c @@ -19,7 +19,7 @@ int MPIR_Iallreduce_inter_sched_remote_reduce_local_bcast(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, root; @@ -35,7 +35,8 @@ int MPIR_Iallreduce_inter_sched_remote_reduce_local_bcast(const void *sendbuf, v /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = - MPIR_Ireduce_inter_sched_auto(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, s); + MPIR_Ireduce_inter_sched_auto(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); /* no barrier, these reductions can be concurrent */ @@ -43,13 +44,15 @@ int MPIR_Iallreduce_inter_sched_remote_reduce_local_bcast(const void *sendbuf, v /* reduce to rank 0 of right group */ root = 0; mpi_errno = - MPIR_Ireduce_inter_sched_auto(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, s); + MPIR_Ireduce_inter_sched_auto(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* reduce to rank 0 of left group */ root = 0; mpi_errno = - MPIR_Ireduce_inter_sched_auto(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, s); + MPIR_Ireduce_inter_sched_auto(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); /* no barrier, these reductions can be concurrent */ @@ -57,7 +60,8 @@ int MPIR_Iallreduce_inter_sched_remote_reduce_local_bcast(const void *sendbuf, v /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = - MPIR_Ireduce_inter_sched_auto(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, s); + MPIR_Ireduce_inter_sched_auto(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } @@ -72,7 +76,7 @@ int MPIR_Iallreduce_inter_sched_remote_reduce_local_bcast(const void *sendbuf, v } lcomm_ptr = comm_ptr->local_comm; - mpi_errno = MPIR_Ibcast_intra_sched_auto(recvbuf, count, datatype, 0, lcomm_ptr, s); + mpi_errno = MPIR_Ibcast_intra_sched_auto(recvbuf, count, datatype, 0, lcomm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); fn_exit: diff --git a/src/mpi/coll/iallreduce/iallreduce_intra_sched_naive.c b/src/mpi/coll/iallreduce/iallreduce_intra_sched_naive.c index 36a26b6e42c..7df977a31c0 100644 --- a/src/mpi/coll/iallreduce/iallreduce_intra_sched_naive.c +++ b/src/mpi/coll/iallreduce/iallreduce_intra_sched_naive.c @@ -8,7 +8,7 @@ /* implements the naive intracomm allreduce, that is, reduce followed by bcast */ int MPIR_Iallreduce_intra_sched_naive(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank; @@ -17,17 +17,19 @@ int MPIR_Iallreduce_intra_sched_naive(const void *sendbuf, void *recvbuf, MPI_Ai if ((sendbuf == MPI_IN_PLACE) && (rank != 0)) { mpi_errno = - MPIR_Ireduce_intra_sched_auto(recvbuf, NULL, count, datatype, op, 0, comm_ptr, s); + MPIR_Ireduce_intra_sched_auto(recvbuf, NULL, count, datatype, op, 0, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); } else { mpi_errno = - MPIR_Ireduce_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, 0, comm_ptr, s); + MPIR_Ireduce_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, 0, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } MPIR_SCHED_BARRIER(s); - mpi_errno = MPIR_Ibcast_intra_sched_auto(recvbuf, count, datatype, 0, comm_ptr, s); + mpi_errno = MPIR_Ibcast_intra_sched_auto(recvbuf, count, datatype, 0, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); fn_exit: diff --git a/src/mpi/coll/iallreduce/iallreduce_intra_sched_recursive_doubling.c b/src/mpi/coll/iallreduce/iallreduce_intra_sched_recursive_doubling.c index b0a08613efd..04605c7bfd0 100644 --- a/src/mpi/coll/iallreduce/iallreduce_intra_sched_recursive_doubling.c +++ b/src/mpi/coll/iallreduce/iallreduce_intra_sched_recursive_doubling.c @@ -7,7 +7,8 @@ int MPIR_Iallreduce_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int pof2, rem, comm_size, is_commutative, rank; @@ -18,7 +19,7 @@ int MPIR_Iallreduce_intra_sched_recursive_doubling(const void *sendbuf, void *re comm_size = comm_ptr->local_size; rank = comm_ptr->rank; - is_commutative = MPIR_Op_is_commutative(op); + is_commutative = collattr, MPIR_Op_is_commutative(op); /* need to allocate temporary buffer to store incoming data */ MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); @@ -50,7 +51,7 @@ int MPIR_Iallreduce_intra_sched_recursive_doubling(const void *sendbuf, void *re if (rank < 2 * rem) { if (rank % 2 == 0) { /* even */ - mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, rank + 1, comm_ptr, s); + mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, rank + 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -59,7 +60,7 @@ int MPIR_Iallreduce_intra_sched_recursive_doubling(const void *sendbuf, void *re * doubling */ newrank = -1; } else { /* odd */ - mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, rank - 1, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, rank - 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -85,10 +86,10 @@ int MPIR_Iallreduce_intra_sched_recursive_doubling(const void *sendbuf, void *re /* Send the most current data, which is in recvbuf. Recv * into tmp_buf */ - mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier here */ - mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -120,10 +121,10 @@ int MPIR_Iallreduce_intra_sched_recursive_doubling(const void *sendbuf, void *re * (rank-1), the ranks who didn't participate above. */ if (rank < 2 * rem) { if (rank % 2) { /* odd */ - mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, rank - 1, comm_ptr, s); + mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, rank - 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* even */ - mpi_errno = MPIR_Sched_recv(recvbuf, count, datatype, rank + 1, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvbuf, count, datatype, rank + 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } diff --git a/src/mpi/coll/iallreduce/iallreduce_intra_sched_reduce_scatter_allgather.c b/src/mpi/coll/iallreduce/iallreduce_intra_sched_reduce_scatter_allgather.c index 75bab1d9a84..1b992a25f81 100644 --- a/src/mpi/coll/iallreduce/iallreduce_intra_sched_reduce_scatter_allgather.c +++ b/src/mpi/coll/iallreduce/iallreduce_intra_sched_reduce_scatter_allgather.c @@ -9,7 +9,7 @@ int MPIR_Iallreduce_intra_sched_reduce_scatter_allgather(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size, rank, newrank, pof2, rem; @@ -57,7 +57,7 @@ int MPIR_Iallreduce_intra_sched_reduce_scatter_allgather(const void *sendbuf, vo if (rank < 2 * rem) { if (rank % 2 == 0) { /* even */ - mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, rank + 1, comm_ptr, s); + mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, rank + 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -66,7 +66,7 @@ int MPIR_Iallreduce_intra_sched_reduce_scatter_allgather(const void *sendbuf, vo * doubling */ newrank = -1; } else { /* odd */ - mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, rank - 1, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, rank - 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -133,11 +133,11 @@ int MPIR_Iallreduce_intra_sched_reduce_scatter_allgather(const void *sendbuf, vo /* Send data from recvbuf. Recv into tmp_buf */ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + disps[recv_idx] * extent), - recv_cnt, datatype, dst, comm_ptr, s); + recv_cnt, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier here */ mpi_errno = MPIR_Sched_send(((char *) recvbuf + disps[send_idx] * extent), - send_cnt, datatype, dst, comm_ptr, s); + send_cnt, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -192,11 +192,11 @@ int MPIR_Iallreduce_intra_sched_reduce_scatter_allgather(const void *sendbuf, vo } mpi_errno = MPIR_Sched_recv(((char *) recvbuf + disps[recv_idx] * extent), - recv_cnt, datatype, dst, comm_ptr, s); + recv_cnt, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier here */ mpi_errno = MPIR_Sched_send(((char *) recvbuf + disps[send_idx] * extent), - send_cnt, datatype, dst, comm_ptr, s); + send_cnt, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -212,10 +212,10 @@ int MPIR_Iallreduce_intra_sched_reduce_scatter_allgather(const void *sendbuf, vo * (rank-1), the ranks who didn't participate above. */ if (rank < 2 * rem) { if (rank % 2) { /* odd */ - mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, rank - 1, comm_ptr, s); + mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, rank - 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* even */ - mpi_errno = MPIR_Sched_recv(recvbuf, count, datatype, rank + 1, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvbuf, count, datatype, rank + 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } diff --git a/src/mpi/coll/iallreduce/iallreduce_intra_sched_smp.c b/src/mpi/coll/iallreduce/iallreduce_intra_sched_smp.c index 20fb4fa88c9..6d4afafc412 100644 --- a/src/mpi/coll/iallreduce/iallreduce_intra_sched_smp.c +++ b/src/mpi/coll/iallreduce/iallreduce_intra_sched_smp.c @@ -8,7 +8,7 @@ int MPIR_Iallreduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int is_commutative; @@ -26,7 +26,8 @@ int MPIR_Iallreduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint if (!is_commutative) { /* use flat fallback */ mpi_errno = - MPIR_Iallreduce_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, comm_ptr, s); + MPIR_Iallreduce_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -39,11 +40,14 @@ int MPIR_Iallreduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint if ((sendbuf == MPI_IN_PLACE) && (comm_ptr->node_comm->rank != 0)) { /* IN_PLACE and not root of reduce. Data supplied to this * allreduce is in recvbuf. Pass that as the sendbuf to reduce. */ - mpi_errno = MPIR_Ireduce_intra_sched_auto(recvbuf, NULL, count, datatype, op, 0, nc, s); + mpi_errno = + MPIR_Ireduce_intra_sched_auto(recvbuf, NULL, count, datatype, op, 0, nc, collattr, + s); MPIR_ERR_CHECK(mpi_errno); } else { mpi_errno = - MPIR_Ireduce_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, 0, nc, s); + MPIR_Ireduce_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, 0, nc, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } MPIR_SCHED_BARRIER(s); @@ -59,14 +63,15 @@ int MPIR_Iallreduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint /* now do an IN_PLACE allreduce among the local roots of all nodes */ if (nrc != NULL) { mpi_errno = - MPIR_Iallreduce_intra_sched_auto(MPI_IN_PLACE, recvbuf, count, datatype, op, nrc, s); + MPIR_Iallreduce_intra_sched_auto(MPI_IN_PLACE, recvbuf, count, datatype, op, nrc, + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } /* now broadcast the result among local processes */ if (comm_ptr->node_comm != NULL) { - mpi_errno = MPIR_Ibcast_intra_sched_auto(recvbuf, count, datatype, 0, nc, s); + mpi_errno = MPIR_Ibcast_intra_sched_auto(recvbuf, count, datatype, 0, nc, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/iallreduce/iallreduce_tsp_auto.c b/src/mpi/coll/iallreduce/iallreduce_tsp_auto.c index be266211063..b786a4c8827 100644 --- a/src/mpi/coll/iallreduce/iallreduce_tsp_auto.c +++ b/src/mpi/coll/iallreduce/iallreduce_tsp_auto.c @@ -10,7 +10,7 @@ /* Routine to schedule a pipelined tree based allreduce */ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_TSP_sched_t sched) + MPIR_Comm * comm, int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int is_commutative = MPIR_Op_is_commutative(op); @@ -37,7 +37,8 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPIR_TSP_Iallreduce_sched_intra_recexch(sendbuf, recvbuf, count, datatype, op, comm, MPIR_IALLREDUCE_RECEXCH_TYPE_SINGLE_BUFFER, - MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL, sched); + MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL, collattr, + sched); break; case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_tsp_recexch_multiple_buffer: @@ -45,7 +46,8 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPIR_TSP_Iallreduce_sched_intra_recexch(sendbuf, recvbuf, count, datatype, op, comm, MPIR_IALLREDUCE_RECEXCH_TYPE_MULTIPLE_BUFFER, - MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL, sched); + MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL, collattr, + sched); break; case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_tsp_tree: @@ -53,14 +55,14 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, is_commutative || MPIR_Iallreduce_tree_type == MPIR_TREE_TYPE_KNOMIAL_1, mpi_errno, - "Iallreduce gentran_tree cannot be applied.\n"); + "Iallreduce gentran_tree cannot be collattr, applied.\n"); mpi_errno = MPIR_TSP_Iallreduce_sched_intra_tree(sendbuf, recvbuf, count, datatype, op, comm, MPIR_Iallreduce_tree_type, MPIR_CVAR_IALLREDUCE_TREE_KVAL, MPIR_CVAR_IALLREDUCE_TREE_PIPELINE_CHUNK_SIZE, MPIR_CVAR_IALLREDUCE_TREE_BUFFER_PER_CHILD, - sched); + collattr, sched); break; case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_tsp_ring: @@ -68,7 +70,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, "Iallreduce gentran_ring cannot be applied.\n"); mpi_errno = MPIR_TSP_Iallreduce_sched_intra_ring(sendbuf, recvbuf, count, datatype, - op, comm, sched); + op, comm, collattr, sched); break; case MPIR_CVAR_IALLREDUCE_INTRA_ALGORITHM_tsp_recexch_reduce_scatter_recexch_allgatherv: /* This algorithm will work for commutative @@ -78,7 +80,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, * will be run */ MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, is_commutative && count >= nranks, mpi_errno, - "Iallreduce gentran_recexch_reduce_scatter_recexch_allgatherv cannot be applied.\n"); + "Iallreduce gentran_recexch_reduce_scatter_recexch_allgatherv cannot be collattr, applied.\n"); mpi_errno = MPIR_TSP_Iallreduce_sched_intra_recexch_reduce_scatter_recexch_allgatherv(sendbuf, recvbuf, @@ -87,6 +89,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, op, comm, MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL, + collattr, sched); break; default: @@ -101,7 +104,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPIR_IALLREDUCE_RECEXCH_TYPE_SINGLE_BUFFER, cnt->u. iallreduce.intra_tsp_recexch_single_buffer. - k, sched); + k, collattr, sched); break; case MPII_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Iallreduce_intra_tsp_recexch_multiple_buffer: @@ -111,7 +114,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPIR_IALLREDUCE_RECEXCH_TYPE_MULTIPLE_BUFFER, cnt->u. iallreduce.intra_tsp_recexch_single_buffer. - k, sched); + k, collattr, sched); break; case MPII_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Iallreduce_intra_tsp_tree: @@ -125,13 +128,13 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, intra_tsp_tree.chunk_size, cnt->u.iallreduce. intra_tsp_tree.buffer_per_child, - sched); + collattr, sched); break; case MPII_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Iallreduce_intra_tsp_ring: mpi_errno = MPIR_TSP_Iallreduce_sched_intra_ring(sendbuf, recvbuf, count, datatype, op, - comm, sched); + comm, collattr, sched); break; case MPII_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Iallreduce_intra_tsp_recexch_reduce_scatter_recexch_allgatherv: @@ -139,7 +142,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPIR_TSP_Iallreduce_sched_intra_recexch_reduce_scatter_recexch_allgatherv (sendbuf, recvbuf, count, datatype, op, comm, cnt->u.iallreduce.intra_tsp_recexch_reduce_scatter_recexch_allgatherv.k, - sched); + collattr, sched); break; default: @@ -157,7 +160,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPIR_TSP_Iallreduce_sched_intra_recexch(sendbuf, recvbuf, count, datatype, op, comm, MPIR_IALLREDUCE_RECEXCH_TYPE_MULTIPLE_BUFFER, - MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL, sched); + MPIR_CVAR_IALLREDUCE_RECEXCH_KVAL, collattr, sched); fn_exit: return mpi_errno; fn_fail: diff --git a/src/mpi/coll/iallreduce/iallreduce_tsp_recexch.c b/src/mpi/coll/iallreduce/iallreduce_tsp_recexch.c index 2d1e7d07ded..c203cd604e9 100644 --- a/src/mpi/coll/iallreduce/iallreduce_tsp_recexch.c +++ b/src/mpi/coll/iallreduce/iallreduce_tsp_recexch.c @@ -12,7 +12,7 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, int per_nbr_buffer, int k, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -77,7 +77,7 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, tag, extent, dtcopy_id, recv_id, reduce_id, vtcs, is_inplace, step1_sendto, in_step2, step1_nrecvs, step1_recvfrom, per_nbr_buffer, &step1_recvbuf, - comm, sched); + comm, collattr, sched); mpi_errno = MPIR_TSP_sched_sink(sched, &step1_id); /* sink for all the tasks up to end of Step 1 */ if (mpi_errno) @@ -153,8 +153,8 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, nbr = step2_nbrs[phase][i]; mpi_errno = - MPIR_TSP_sched_isend(tmp_buf, count, datatype, nbr, tag, comm, sched, nvtcs, vtcs, - &send_id[i]); + MPIR_TSP_sched_isend(tmp_buf, count, datatype, nbr, tag, comm, collattr, sched, + nvtcs, vtcs, &send_id[i]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (rank > nbr) { myidx = i + 1; @@ -169,8 +169,8 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, vtcs[nvtcs++] = (counter == 0) ? reduce_id[k - 2] : reduce_id[counter - 1]; } mpi_errno = - MPIR_TSP_sched_irecv(nbr_buffer[buf], count, datatype, nbr, tag, comm, sched, nvtcs, - vtcs, &recv_id[buf]); + MPIR_TSP_sched_irecv(nbr_buffer[buf], count, datatype, nbr, tag, comm, collattr, + sched, nvtcs, vtcs, &recv_id[buf]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (count != 0) { @@ -197,8 +197,8 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, vtcs[nvtcs++] = (counter == 0) ? reduce_id[k - 2] : reduce_id[counter - 1]; } mpi_errno = - MPIR_TSP_sched_irecv(nbr_buffer[buf], count, datatype, nbr, tag, comm, sched, nvtcs, - vtcs, &recv_id[buf]); + MPIR_TSP_sched_irecv(nbr_buffer[buf], count, datatype, nbr, tag, comm, collattr, + sched, nvtcs, vtcs, &recv_id[buf]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -234,8 +234,8 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, * send the data to non-partcipating ranks */ if (step1_sendto != -1) { /* I am a Step 2 non-participating rank */ mpi_errno = - MPIR_TSP_sched_irecv(recvbuf, count, datatype, step1_sendto, tag, comm, sched, 0, NULL, - &vtx_id); + MPIR_TSP_sched_irecv(recvbuf, count, datatype, step1_sendto, tag, comm, collattr, sched, + 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { for (i = 0; i < step1_nrecvs; i++) { @@ -254,8 +254,8 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch(const void *sendbuf, void *recvbuf, vtcs[0] = reduce_id[k - 2]; } mpi_errno = - MPIR_TSP_sched_isend(recvbuf, count, datatype, step1_recvfrom[i], tag, comm, sched, - nvtcs, vtcs, &vtx_id); + MPIR_TSP_sched_isend(recvbuf, count, datatype, step1_recvfrom[i], tag, comm, + collattr, sched, nvtcs, vtcs, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/iallreduce/iallreduce_tsp_recexch_reduce_scatter_recexch_allgatherv.c b/src/mpi/coll/iallreduce/iallreduce_tsp_recexch_reduce_scatter_recexch_allgatherv.c index 45d95dfdb0c..0428af64b99 100644 --- a/src/mpi/coll/iallreduce/iallreduce_tsp_recexch_reduce_scatter_recexch_allgatherv.c +++ b/src/mpi/coll/iallreduce/iallreduce_tsp_recexch_reduce_scatter_recexch_allgatherv.c @@ -16,6 +16,7 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch_reduce_scatter_recexch_allgatherv(co MPI_Op op, MPIR_Comm * comm, int k, + int collattr, MPIR_TSP_sched_t sched) { @@ -87,7 +88,7 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch_reduce_scatter_recexch_allgatherv(co tag, extent, dtcopy_id, recv_id, reduce_id, vtcs, is_inplace, step1_sendto, in_step2, step1_nrecvs, step1_recvfrom, per_nbr_buffer, &step1_recvbuf, - comm, sched); + comm, collattr, sched); mpi_errno = MPIR_TSP_sched_sink(sched, &sink_id); /* sink for all the tasks up to end of Step 1 */ if (mpi_errno) @@ -122,14 +123,15 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch_reduce_scatter_recexch_allgatherv(co cnts, displs, datatype, op, extent, tag, comm, k, redscat_algo_type, step2_nphases, step2_nbrs, rank, nranks, - sink_id, 0, NULL, sched); + sink_id, 0, NULL, collattr, sched); MPIR_TSP_sched_fence(sched); /* sink for all the tasks up till this point */ MPIR_TSP_Iallgatherv_sched_intra_recexch_step2(step1_sendto, step2_nphases, step2_nbrs, rank, nranks, k, p_of_k, log_pofk, T, &nvtcs, &recv_id, tag, recvbuf, extent, cnts, displs, - datatype, allgather_algo_type, comm, sched); + datatype, allgather_algo_type, comm, + collattr, sched); } @@ -139,14 +141,14 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch_reduce_scatter_recexch_allgatherv(co * send the data to non-partcipating ranks */ if (step1_sendto != -1) { /* I am a Step 2 non-participating rank */ mpi_errno = - MPIR_TSP_sched_irecv(recvbuf, count, datatype, step1_sendto, tag, comm, sched, 1, - &sink_id, &vtx_id); + MPIR_TSP_sched_irecv(recvbuf, count, datatype, step1_sendto, tag, comm, collattr, sched, + 1, &sink_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { for (i = 0; i < step1_nrecvs; i++) { mpi_errno = - MPIR_TSP_sched_isend(recvbuf, count, datatype, step1_recvfrom[i], tag, comm, sched, - nvtcs, recv_id, &vtx_id); + MPIR_TSP_sched_isend(recvbuf, count, datatype, step1_recvfrom[i], tag, comm, + collattr, sched, nvtcs, recv_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/iallreduce/iallreduce_tsp_recursive_exchange_common.c b/src/mpi/coll/iallreduce/iallreduce_tsp_recursive_exchange_common.c index afe7c355ee4..fdd0d052469 100644 --- a/src/mpi/coll/iallreduce/iallreduce_tsp_recursive_exchange_common.c +++ b/src/mpi/coll/iallreduce/iallreduce_tsp_recursive_exchange_common.c @@ -46,13 +46,13 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch_step1(const void *sendbuf, int step1_sendto, bool in_step2, int step1_nrecvs, int *step1_recvfrom, int per_nbr_buffer, void ***step1_recvbuf_, MPIR_Comm * comm, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int i, nvtcs, vtx_id; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; void **step1_recvbuf; - MPIR_Errflag_t errflag = MPIR_ERR_NONE; MPIR_FUNC_ENTER; /* Step 1 */ @@ -64,8 +64,8 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch_step1(const void *sendbuf, else buf_to_send = sendbuf; mpi_errno = - MPIR_TSP_sched_isend(buf_to_send, count, datatype, step1_sendto, tag, comm, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_isend(buf_to_send, count, datatype, step1_sendto, tag, comm, collattr, + sched, 0, NULL, &vtx_id); if (mpi_errno) { /* for communication errors, just record the error but continue */ errflag = MPIR_ERR_OTHER; @@ -96,8 +96,8 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch_step1(const void *sendbuf, reduce_id[i - 1])); } mpi_errno = MPIR_TSP_sched_irecv(step1_recvbuf[i], count, datatype, - step1_recvfrom[i], tag, comm, sched, nvtcs, vtcs, - &recv_id[i]); + step1_recvfrom[i], tag, comm, collattr, sched, nvtcs, + vtcs, &recv_id[i]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (count != 0) { /* Reduce only if data is present */ /* setup reduce dependencies */ diff --git a/src/mpi/coll/iallreduce/iallreduce_tsp_recursive_exchange_common.h b/src/mpi/coll/iallreduce/iallreduce_tsp_recursive_exchange_common.h index 47964cb2729..2d0921636ee 100644 --- a/src/mpi/coll/iallreduce/iallreduce_tsp_recursive_exchange_common.h +++ b/src/mpi/coll/iallreduce/iallreduce_tsp_recursive_exchange_common.h @@ -16,5 +16,5 @@ int MPIR_TSP_Iallreduce_sched_intra_recexch_step1(const void *sendbuf, int step1_sendto, bool in_step2, int step1_nrecvs, int *step1_recvfrom, int per_nbr_buffer, void ***step1_recvbuf_, MPIR_Comm * comm, - MPIR_TSP_sched_t sched); + int collattr, MPIR_TSP_sched_t sched); #endif /* IALLREDUCE_TSP_RECURSIVE_EXCHANGE_COMMON_H_INCLUDED */ diff --git a/src/mpi/coll/iallreduce/iallreduce_tsp_ring.c b/src/mpi/coll/iallreduce/iallreduce_tsp_ring.c index d0d28a564b9..f0bfb2b4ff8 100644 --- a/src/mpi/coll/iallreduce/iallreduce_tsp_ring.c +++ b/src/mpi/coll/iallreduce/iallreduce_tsp_ring.c @@ -12,7 +12,7 @@ * explained here: http://andrew.gibiansky.com/ */ int MPIR_TSP_Iallreduce_sched_intra_ring(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_TSP_sched_t sched) + MPIR_Comm * comm, int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -89,8 +89,8 @@ int MPIR_TSP_Iallreduce_sched_intra_ring(const void *sendbuf, void *recvbuf, MPI nvtcs = (i == 0) ? 0 : 1; vtcs = (i == 0) ? 0 : reduce_id[(i - 1) % 2]; mpi_errno = - MPIR_TSP_sched_irecv(tmpbuf, cnts[recv_rank], datatype, src, tag, comm, sched, nvtcs, - &vtcs, &recv_id); + MPIR_TSP_sched_irecv(tmpbuf, cnts[recv_rank], datatype, src, tag, comm, collattr, sched, + nvtcs, &vtcs, &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); mpi_errno = @@ -102,7 +102,7 @@ int MPIR_TSP_Iallreduce_sched_intra_ring(const void *sendbuf, void *recvbuf, MPI mpi_errno = MPIR_TSP_sched_isend((char *) recvbuf + displs[send_rank] * extent, cnts[send_rank], - datatype, dst, tag, comm, sched, nvtcs, &vtcs, &vtx_id); + datatype, dst, tag, comm, collattr, sched, nvtcs, &vtcs, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } MPIR_CHKLMEM_MALLOC(reduce_id, int *, 2 * sizeof(int), mpi_errno, "reduce_id", MPL_MEM_COLL); @@ -112,7 +112,7 @@ int MPIR_TSP_Iallreduce_sched_intra_ring(const void *sendbuf, void *recvbuf, MPI /* Phase 3: Allgatherv ring, so everyone has the reduced data */ MPIR_TSP_Iallgatherv_sched_intra_ring(MPI_IN_PLACE, -1, MPI_DATATYPE_NULL, recvbuf, cnts, - displs, datatype, comm, sched); + displs, datatype, comm, collattr, sched); MPIR_CHKLMEM_FREEALL(); diff --git a/src/mpi/coll/iallreduce/iallreduce_tsp_tree.c b/src/mpi/coll/iallreduce/iallreduce_tsp_tree.c index 5db2cc699e2..76d6171e629 100644 --- a/src/mpi/coll/iallreduce/iallreduce_tsp_tree.c +++ b/src/mpi/coll/iallreduce/iallreduce_tsp_tree.c @@ -11,7 +11,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, int tree_type, int k, int chunk_size, - int buffer_per_child, MPIR_TSP_sched_t sched) + int buffer_per_child, int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -140,7 +140,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, MPI } mpi_errno = MPIR_TSP_sched_irecv(recv_address, msgsize, datatype, child, tag, comm, - sched, nvtcs, vtcs, &recv_id[i]); + collattr, sched, nvtcs, vtcs, &recv_id[i]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* Setup dependencies for reduction. Reduction depends on the corresponding recv to complete */ @@ -187,7 +187,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, MPI if (rank != root) { mpi_errno = MPIR_TSP_sched_isend(reduce_address, msgsize, datatype, my_tree.parent, tag, comm, - sched, nvtcs, vtcs, &vtx_id); + collattr, sched, nvtcs, vtcs, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -201,7 +201,8 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, MPI if (my_tree.parent != -1) { mpi_errno = MPIR_TSP_sched_irecv(reduce_address, msgsize, datatype, - my_tree.parent, tag, comm, sched, 1, &sink_id, &bcast_recv_id); + my_tree.parent, tag, comm, collattr, sched, 1, &sink_id, + &bcast_recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -211,7 +212,7 @@ int MPIR_TSP_Iallreduce_sched_intra_tree(const void *sendbuf, void *recvbuf, MPI vtcs[0] = bcast_recv_id; mpi_errno = MPIR_TSP_sched_imcast(reduce_address, msgsize, datatype, ut_int_array(my_tree.children), num_children, tag, - comm, sched, nvtcs, vtcs, &vtx_id); + comm, collattr, sched, nvtcs, vtcs, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/ialltoall/ialltoall_inter_sched_pairwise_exchange.c b/src/mpi/coll/ialltoall/ialltoall_inter_sched_pairwise_exchange.c index b6c46c5b54a..6525156ef48 100644 --- a/src/mpi/coll/ialltoall/ialltoall_inter_sched_pairwise_exchange.c +++ b/src/mpi/coll/ialltoall/ialltoall_inter_sched_pairwise_exchange.c @@ -19,7 +19,7 @@ int MPIR_Ialltoall_inter_sched_pairwise_exchange(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int local_size, remote_size, max_size, i; @@ -53,9 +53,9 @@ int MPIR_Ialltoall_inter_sched_pairwise_exchange(const void *sendbuf, MPI_Aint s sendaddr = (char *) sendbuf + dst * sendcount * sendtype_extent; } - mpi_errno = MPIR_Sched_send(sendaddr, sendcount, sendtype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(sendaddr, sendcount, sendtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIR_Sched_recv(recvaddr, recvcount, recvtype, src, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvaddr, recvcount, recvtype, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/ialltoall/ialltoall_intra_sched_brucks.c b/src/mpi/coll/ialltoall/ialltoall_intra_sched_brucks.c index 154176f55ff..bb69d10ee65 100644 --- a/src/mpi/coll/ialltoall/ialltoall_intra_sched_brucks.c +++ b/src/mpi/coll/ialltoall/ialltoall_intra_sched_brucks.c @@ -20,7 +20,8 @@ */ int MPIR_Ialltoall_intra_sched_brucks(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int i; @@ -107,9 +108,9 @@ int MPIR_Ialltoall_intra_sched_brucks(const void *sendbuf, MPI_Aint sendcount, MPIR_SCHED_BARRIER(s); /* now send and recv in parallel */ - mpi_errno = MPIR_Sched_send(tmp_buf, newtype_size, MPI_BYTE, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(tmp_buf, newtype_size, MPI_BYTE, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIR_Sched_recv(recvbuf, 1, newtype, src, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvbuf, 1, newtype, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/ialltoall/ialltoall_intra_sched_inplace.c b/src/mpi/coll/ialltoall/ialltoall_intra_sched_inplace.c index a634d337005..95a3017c934 100644 --- a/src/mpi/coll/ialltoall/ialltoall_intra_sched_inplace.c +++ b/src/mpi/coll/ialltoall/ialltoall_intra_sched_inplace.c @@ -19,7 +19,8 @@ * scenario. */ int MPIR_Ialltoall_intra_sched_inplace(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; void *tmp_buf = NULL; @@ -60,10 +61,10 @@ int MPIR_Ialltoall_intra_sched_inplace(const void *sendbuf, MPI_Aint sendcount, MPIR_SCHED_BARRIER(s); /* now simultaneously send from tmp_buf and recv to recvbuf */ - mpi_errno = MPIR_Sched_send(tmp_buf, nbytes, MPI_BYTE, peer, comm_ptr, s); + mpi_errno = MPIR_Sched_send(tmp_buf, nbytes, MPI_BYTE, peer, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_recv(((char *) recvbuf + peer * recvcount * recvtype_extent), - recvcount, recvtype, peer, comm_ptr, s); + recvcount, recvtype, peer, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/ialltoall/ialltoall_intra_sched_pairwise.c b/src/mpi/coll/ialltoall/ialltoall_intra_sched_pairwise.c index 1f953411065..a8d9eadc276 100644 --- a/src/mpi/coll/ialltoall/ialltoall_intra_sched_pairwise.c +++ b/src/mpi/coll/ialltoall/ialltoall_intra_sched_pairwise.c @@ -24,7 +24,8 @@ */ int MPIR_Ialltoall_intra_sched_pairwise(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int i; @@ -62,10 +63,10 @@ int MPIR_Ialltoall_intra_sched_pairwise(const void *sendbuf, MPI_Aint sendcount, } mpi_errno = MPIR_Sched_send(((char *) sendbuf + dst * sendcount * sendtype_extent), - sendcount, sendtype, dst, comm_ptr, s); + sendcount, sendtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_recv(((char *) recvbuf + src * recvcount * recvtype_extent), - recvcount, recvtype, src, comm_ptr, s); + recvcount, recvtype, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/ialltoall/ialltoall_intra_sched_permuted_sendrecv.c b/src/mpi/coll/ialltoall/ialltoall_intra_sched_permuted_sendrecv.c index f8e03a093bd..daf4cdf6b88 100644 --- a/src/mpi/coll/ialltoall/ialltoall_intra_sched_permuted_sendrecv.c +++ b/src/mpi/coll/ialltoall/ialltoall_intra_sched_permuted_sendrecv.c @@ -16,7 +16,7 @@ int MPIR_Ialltoall_intra_sched_permuted_sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int i; @@ -44,14 +44,14 @@ int MPIR_Ialltoall_intra_sched_permuted_sendrecv(const void *sendbuf, MPI_Aint s for (i = 0; i < ss; i++) { dst = (rank + i + ii) % comm_size; mpi_errno = MPIR_Sched_recv(((char *) recvbuf + dst * recvcount * recvtype_extent), - recvcount, recvtype, dst, comm_ptr, s); + recvcount, recvtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } for (i = 0; i < ss; i++) { dst = (rank - i - ii + comm_size) % comm_size; mpi_errno = MPIR_Sched_send(((char *) sendbuf + dst * sendcount * sendtype_extent), - sendcount, sendtype, dst, comm_ptr, s); + sendcount, sendtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } diff --git a/src/mpi/coll/ialltoall/ialltoall_tsp_brucks.c b/src/mpi/coll/ialltoall/ialltoall_tsp_brucks.c index c3533ec9473..2a821fd9f92 100644 --- a/src/mpi/coll/ialltoall/ialltoall_tsp_brucks.c +++ b/src/mpi/coll/ialltoall/ialltoall_tsp_brucks.c @@ -115,7 +115,8 @@ int MPIR_TSP_Ialltoall_sched_intra_brucks(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, - int k, int buffer_per_phase, MPIR_TSP_sched_t sched) + int k, int buffer_per_phase, int collattr, + MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -284,7 +285,7 @@ MPIR_TSP_Ialltoall_sched_intra_brucks(const void *sendbuf, MPI_Aint sendcount, mpi_errno = MPIR_TSP_sched_isend(tmp_sbuf[i][j - 1], packsize, MPI_BYTE, dst, tag, - comm, sched, 1, &packids[j - 1], &sendids[j - 1]); + comm, collattr, sched, 1, &packids[j - 1], &sendids[j - 1]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (i != 0 && buffer_per_phase == 0) { /* this dependency holds only when we don't have dedicated recv buffer per phase */ @@ -293,7 +294,7 @@ MPIR_TSP_Ialltoall_sched_intra_brucks(const void *sendbuf, MPI_Aint sendcount, } mpi_errno = MPIR_TSP_sched_irecv(tmp_rbuf[i][j - 1], packsize, MPI_BYTE, - src, tag, comm, sched, recv_ninvtcs, recv_invtcs, + src, tag, comm, collattr, sched, recv_ninvtcs, recv_invtcs, &recvids[j - 1]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); diff --git a/src/mpi/coll/ialltoall/ialltoall_tsp_ring.c b/src/mpi/coll/ialltoall/ialltoall_tsp_ring.c index 9ac9572b45b..7a995d057db 100644 --- a/src/mpi/coll/ialltoall/ialltoall_tsp_ring.c +++ b/src/mpi/coll/ialltoall/ialltoall_tsp_ring.c @@ -36,7 +36,7 @@ copy (buf1)<--recv (buf1) send (buf2) / int MPIR_TSP_Ialltoall_sched_intra_ring(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -132,8 +132,8 @@ int MPIR_TSP_Ialltoall_sched_intra_ring(const void *sendbuf, MPI_Aint sendcount, } mpi_errno = - MPIR_TSP_sched_isend((char *) sbuf, size * recvcount, recvtype, dst, tag, comm, sched, - nvtcs, vtcs, &send_id[i % 3]); + MPIR_TSP_sched_isend((char *) sbuf, size * recvcount, recvtype, dst, tag, comm, + collattr, sched, nvtcs, vtcs, &send_id[i % 3]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* schedule recv */ if (i == 0) @@ -150,8 +150,8 @@ int MPIR_TSP_Ialltoall_sched_intra_ring(const void *sendbuf, MPI_Aint sendcount, } mpi_errno = - MPIR_TSP_sched_irecv((char *) rbuf, size * recvcount, recvtype, src, tag, comm, sched, - nvtcs, vtcs, &recv_id[i % 3]); + MPIR_TSP_sched_irecv((char *) rbuf, size * recvcount, recvtype, src, tag, comm, + collattr, sched, nvtcs, vtcs, &recv_id[i % 3]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* destination offset of the copy */ diff --git a/src/mpi/coll/ialltoall/ialltoall_tsp_scattered.c b/src/mpi/coll/ialltoall/ialltoall_tsp_scattered.c index ba0130d3f29..dbef404c93d 100644 --- a/src/mpi/coll/ialltoall/ialltoall_tsp_scattered.c +++ b/src/mpi/coll/ialltoall/ialltoall_tsp_scattered.c @@ -38,7 +38,7 @@ int MPIR_TSP_Ialltoall_sched_intra_scattered(const void *sendbuf, MPI_Aint sendc MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, int batch_size, int bblock, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -111,13 +111,15 @@ int MPIR_TSP_Ialltoall_sched_intra_scattered(const void *sendbuf, MPI_Aint sendc src = (rank + i) % size; mpi_errno = MPIR_TSP_sched_irecv((char *) recvbuf + src * recvcount * recvtype_extent, - recvcount, recvtype, src, tag, comm, sched, 0, NULL, &recv_id[i]); + recvcount, recvtype, src, tag, comm, collattr, sched, 0, NULL, + &recv_id[i]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); dst = (rank - i + size) % size; mpi_errno = MPIR_TSP_sched_isend((char *) data_buf + dst * sendcount * sendtype_extent, - sendcount, sendtype, dst, tag, comm, sched, 0, NULL, &send_id[i]); + sendcount, sendtype, dst, tag, comm, collattr, sched, 0, NULL, + &send_id[i]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -138,15 +140,15 @@ int MPIR_TSP_Ialltoall_sched_intra_scattered(const void *sendbuf, MPI_Aint sendc src = (rank + i + j) % size; mpi_errno = MPIR_TSP_sched_irecv((char *) recvbuf + src * recvcount * recvtype_extent, - recvcount, recvtype, src, tag, comm, sched, 1, &invtcs, - &recv_id[(i + j) % bblock]); + recvcount, recvtype, src, tag, comm, collattr, sched, 1, + &invtcs, &recv_id[(i + j) % bblock]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); dst = (rank - i - j + size) % size; mpi_errno = MPIR_TSP_sched_isend((char *) data_buf + dst * sendcount * sendtype_extent, - sendcount, sendtype, dst, tag, comm, sched, 1, &invtcs, - &send_id[(i + j) % bblock]); + sendcount, sendtype, dst, tag, comm, collattr, sched, 1, + &invtcs, &send_id[(i + j) % bblock]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/ialltoallv/ialltoallv_inter_sched_pairwise_exchange.c b/src/mpi/coll/ialltoallv/ialltoallv_inter_sched_pairwise_exchange.c index b3436310334..26ba7ef3907 100644 --- a/src/mpi/coll/ialltoallv/ialltoallv_inter_sched_pairwise_exchange.c +++ b/src/mpi/coll/ialltoallv/ialltoallv_inter_sched_pairwise_exchange.c @@ -9,7 +9,8 @@ int MPIR_Ialltoallv_inter_sched_pairwise_exchange(const void *sendbuf, const MPI const MPI_Aint sdispls[], MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { /* Intercommunicator alltoallv. We use a pairwise exchange algorithm * similar to the one used in intracommunicator alltoallv. Since the @@ -66,9 +67,9 @@ int MPIR_Ialltoallv_inter_sched_pairwise_exchange(const void *sendbuf, const MPI if (recvcount * recvtype_size == 0) src = MPI_PROC_NULL; - mpi_errno = MPIR_Sched_send(sendaddr, sendcount, sendtype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(sendaddr, sendcount, sendtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIR_Sched_recv(recvaddr, recvcount, recvtype, src, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvaddr, recvcount, recvtype, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); diff --git a/src/mpi/coll/ialltoallv/ialltoallv_intra_sched_blocked.c b/src/mpi/coll/ialltoallv/ialltoallv_intra_sched_blocked.c index 0c5b926111c..4f68b5665de 100644 --- a/src/mpi/coll/ialltoallv/ialltoallv_intra_sched_blocked.c +++ b/src/mpi/coll/ialltoallv/ialltoallv_intra_sched_blocked.c @@ -9,7 +9,7 @@ int MPIR_Ialltoallv_intra_sched_blocked(const void *sendbuf, const MPI_Aint send const MPI_Aint sdispls[], MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size; @@ -46,7 +46,7 @@ int MPIR_Ialltoallv_intra_sched_blocked(const void *sendbuf, const MPI_Aint send dst = (rank + i + ii) % comm_size; if (recvcounts[dst] && recvtype_size) { mpi_errno = MPIR_Sched_recv((char *) recvbuf + rdispls[dst] * recv_extent, - recvcounts[dst], recvtype, dst, comm_ptr, s); + recvcounts[dst], recvtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } @@ -55,7 +55,7 @@ int MPIR_Ialltoallv_intra_sched_blocked(const void *sendbuf, const MPI_Aint send dst = (rank - i - ii + comm_size) % comm_size; if (sendcounts[dst] && sendtype_size) { mpi_errno = MPIR_Sched_send((char *) sendbuf + sdispls[dst] * send_extent, - sendcounts[dst], sendtype, dst, comm_ptr, s); + sendcounts[dst], sendtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } diff --git a/src/mpi/coll/ialltoallv/ialltoallv_intra_sched_inplace.c b/src/mpi/coll/ialltoallv/ialltoallv_intra_sched_inplace.c index 8f039334481..c73a266dd89 100644 --- a/src/mpi/coll/ialltoallv/ialltoallv_intra_sched_inplace.c +++ b/src/mpi/coll/ialltoallv/ialltoallv_intra_sched_inplace.c @@ -9,7 +9,7 @@ int MPIR_Ialltoallv_intra_sched_inplace(const void *sendbuf, const MPI_Aint send const MPI_Aint sdispls[], MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { void *tmp_buf = NULL; int mpi_errno = MPI_SUCCESS; @@ -58,10 +58,10 @@ int MPIR_Ialltoallv_intra_sched_inplace(const void *sendbuf, const MPI_Aint send dst = i; mpi_errno = MPIR_Sched_send(((char *) recvbuf + rdispls[dst] * recvtype_extent), - recvcounts[dst], recvtype, dst, comm_ptr, s); + recvcounts[dst], recvtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_recv(tmp_buf, recvcounts[dst] * recvtype_sz, MPI_BYTE, - dst, comm_ptr, s); + dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/ialltoallv/ialltoallv_tsp_blocked.c b/src/mpi/coll/ialltoallv/ialltoallv_tsp_blocked.c index 0dd0cc80aab..5c78f371d2c 100644 --- a/src/mpi/coll/ialltoallv/ialltoallv_tsp_blocked.c +++ b/src/mpi/coll/ialltoallv/ialltoallv_tsp_blocked.c @@ -11,7 +11,8 @@ int MPIR_TSP_Ialltoallv_sched_intra_blocked(const void *sendbuf, const MPI_Aint const MPI_Aint sdispls[], MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], MPI_Datatype recvtype, - MPIR_Comm * comm, int bblock, MPIR_TSP_sched_t sched) + MPIR_Comm * comm, int bblock, int collattr, + MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -56,8 +57,8 @@ int MPIR_TSP_Ialltoallv_sched_intra_blocked(const void *sendbuf, const MPI_Aint dst = (rank + j + i) % nranks; if (recvcounts[dst] && recvtype_size) { mpi_errno = MPIR_TSP_sched_irecv((char *) recvbuf + rdispls[dst] * recv_extent, - recvcounts[dst], recvtype, dst, tag, comm, sched, - 0, NULL, &vtx_id); + recvcounts[dst], recvtype, dst, tag, comm, + collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } @@ -66,8 +67,8 @@ int MPIR_TSP_Ialltoallv_sched_intra_blocked(const void *sendbuf, const MPI_Aint dst = (rank - j - i + nranks) % nranks; if (sendcounts[dst] && sendtype_size) { mpi_errno = MPIR_TSP_sched_isend((char *) sendbuf + sdispls[dst] * send_extent, - sendcounts[dst], sendtype, dst, tag, comm, sched, - 0, NULL, &vtx_id); + sendcounts[dst], sendtype, dst, tag, comm, + collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/ialltoallv/ialltoallv_tsp_inplace.c b/src/mpi/coll/ialltoallv/ialltoallv_tsp_inplace.c index 7171f20e1d2..fa7352253d8 100644 --- a/src/mpi/coll/ialltoallv/ialltoallv_tsp_inplace.c +++ b/src/mpi/coll/ialltoallv/ialltoallv_tsp_inplace.c @@ -11,7 +11,7 @@ int MPIR_TSP_Ialltoallv_sched_intra_inplace(const void *sendbuf, const MPI_Aint const MPI_Aint sdispls[], MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_TSP_sched_t sched) + MPIR_Comm * comm, int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -53,12 +53,12 @@ int MPIR_TSP_Ialltoallv_sched_intra_inplace(const void *sendbuf, const MPI_Aint mpi_errno = MPIR_TSP_sched_isend((char *) recvbuf + rdispls[dst] * recv_extent, recvcounts[dst], recvtype, dst, tag, comm, - sched, nvtcs, vtcs, &send_id); + collattr, sched, nvtcs, vtcs, &send_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); mpi_errno = MPIR_TSP_sched_irecv(tmp_buf, recvcounts[dst], recvtype, dst, tag, comm, - sched, nvtcs, vtcs, &recv_id); + collattr, sched, nvtcs, vtcs, &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); nvtcs = 2; diff --git a/src/mpi/coll/ialltoallv/ialltoallv_tsp_scattered.c b/src/mpi/coll/ialltoallv/ialltoallv_tsp_scattered.c index 5c45e8e571e..fdbe0233ca1 100644 --- a/src/mpi/coll/ialltoallv/ialltoallv_tsp_scattered.c +++ b/src/mpi/coll/ialltoallv/ialltoallv_tsp_scattered.c @@ -12,7 +12,7 @@ int MPIR_TSP_Ialltoallv_sched_intra_scattered(const void *sendbuf, const MPI_Ain void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm, int batch_size, int bblock, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -64,15 +64,15 @@ int MPIR_TSP_Ialltoallv_sched_intra_scattered(const void *sendbuf, const MPI_Ain src = (rank + i) % size; mpi_errno = MPIR_TSP_sched_irecv((char *) recvbuf + rdispls[src] * recvtype_extent, - recvcounts[src], recvtype, src, tag, comm, sched, 0, NULL, - &recv_id[i]); + recvcounts[src], recvtype, src, tag, comm, collattr, sched, 0, + NULL, &recv_id[i]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); dst = (rank - i + size) % size; mpi_errno = MPIR_TSP_sched_isend((char *) sendbuf + sdispls[dst] * sendtype_extent, - sendcounts[dst], sendtype, dst, tag, comm, sched, 0, NULL, - &send_id[i]); + sendcounts[dst], sendtype, dst, tag, comm, collattr, sched, 0, + NULL, &send_id[i]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -94,15 +94,15 @@ int MPIR_TSP_Ialltoallv_sched_intra_scattered(const void *sendbuf, const MPI_Ain src = (rank + i + j) % size; mpi_errno = MPIR_TSP_sched_irecv((char *) recvbuf + rdispls[src] * recvtype_extent, - recvcounts[src], recvtype, src, tag, comm, sched, 1, &invtcs, - &recv_id[(i + j) % bblock]); + recvcounts[src], recvtype, src, tag, comm, collattr, sched, 1, + &invtcs, &recv_id[(i + j) % bblock]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); dst = (rank - i - j + size) % size; mpi_errno = MPIR_TSP_sched_isend((char *) sendbuf + sdispls[dst] * sendtype_extent, - sendcounts[dst], sendtype, dst, tag, comm, sched, 1, &invtcs, - &send_id[(i + j) % bblock]); + sendcounts[dst], sendtype, dst, tag, comm, collattr, sched, 1, + &invtcs, &send_id[(i + j) % bblock]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/ialltoallw/ialltoallw_inter_sched_pairwise_exchange.c b/src/mpi/coll/ialltoallw/ialltoallw_inter_sched_pairwise_exchange.c index 163aaf79f34..d9b6ee23534 100644 --- a/src/mpi/coll/ialltoallw/ialltoallw_inter_sched_pairwise_exchange.c +++ b/src/mpi/coll/ialltoallw/ialltoallw_inter_sched_pairwise_exchange.c @@ -11,7 +11,8 @@ int MPIR_Ialltoallw_inter_sched_pairwise_exchange(const void *sendbuf, const MPI const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { /* Intercommunicator alltoallw. We use a pairwise exchange algorithm similar to the one used in intracommunicator alltoallw. Since the local and @@ -59,10 +60,10 @@ int MPIR_Ialltoallw_inter_sched_pairwise_exchange(const void *sendbuf, const MPI sendtype = sendtypes[dst]; } - mpi_errno = MPIR_Sched_send(sendaddr, sendcount, sendtype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(sendaddr, sendcount, sendtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier here */ - mpi_errno = MPIR_Sched_recv(recvaddr, recvcount, recvtype, src, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvaddr, recvcount, recvtype, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/ialltoallw/ialltoallw_intra_sched_blocked.c b/src/mpi/coll/ialltoallw/ialltoallw_intra_sched_blocked.c index 1523dd78f0d..26bedbcaf0f 100644 --- a/src/mpi/coll/ialltoallw/ialltoallw_intra_sched_blocked.c +++ b/src/mpi/coll/ialltoallw/ialltoallw_intra_sched_blocked.c @@ -23,7 +23,7 @@ int MPIR_Ialltoallw_intra_sched_blocked(const void *sendbuf, const MPI_Aint send const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size, i; @@ -53,7 +53,8 @@ int MPIR_Ialltoallw_intra_sched_blocked(const void *sendbuf, const MPI_Aint send MPIR_Datatype_get_size_macro(recvtypes[dst], type_size); if (type_size) { mpi_errno = MPIR_Sched_recv((char *) recvbuf + rdispls[dst], - recvcounts[dst], recvtypes[dst], dst, comm_ptr, s); + recvcounts[dst], recvtypes[dst], dst, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } } @@ -66,7 +67,8 @@ int MPIR_Ialltoallw_intra_sched_blocked(const void *sendbuf, const MPI_Aint send MPIR_Datatype_get_size_macro(sendtypes[dst], type_size); if (type_size) { mpi_errno = MPIR_Sched_send((char *) sendbuf + sdispls[dst], - sendcounts[dst], sendtypes[dst], dst, comm_ptr, s); + sendcounts[dst], sendtypes[dst], dst, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } } diff --git a/src/mpi/coll/ialltoallw/ialltoallw_intra_sched_inplace.c b/src/mpi/coll/ialltoallw/ialltoallw_intra_sched_inplace.c index 2f17f07f78c..f9e8055b94e 100644 --- a/src/mpi/coll/ialltoallw/ialltoallw_intra_sched_inplace.c +++ b/src/mpi/coll/ialltoallw/ialltoallw_intra_sched_inplace.c @@ -21,7 +21,7 @@ int MPIR_Ialltoallw_intra_sched_inplace(const void *sendbuf, const MPI_Aint send const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size, i, j; @@ -67,10 +67,11 @@ int MPIR_Ialltoallw_intra_sched_inplace(const void *sendbuf, const MPI_Aint send MPIR_Datatype_get_size_macro(recvtypes[i], recvtype_sz); mpi_errno = MPIR_Sched_send(((char *) recvbuf + rdispls[dst]), - recvcounts[dst], recvtypes[dst], dst, comm_ptr, s); + recvcounts[dst], recvtypes[dst], dst, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_recv(tmp_buf, recvcounts[dst] * recvtype_sz, MPI_BYTE, - dst, comm_ptr, s); + dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/ialltoallw/ialltoallw_tsp_blocked.c b/src/mpi/coll/ialltoallw/ialltoallw_tsp_blocked.c index e8de87bf710..8114dfda9f4 100644 --- a/src/mpi/coll/ialltoallw/ialltoallw_tsp_blocked.c +++ b/src/mpi/coll/ialltoallw/ialltoallw_tsp_blocked.c @@ -12,7 +12,7 @@ int MPIR_TSP_Ialltoallw_sched_intra_blocked(const void *sendbuf, const MPI_Aint const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm * comm, - int bblock, MPIR_TSP_sched_t sched) + int bblock, int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -49,7 +49,7 @@ int MPIR_TSP_Ialltoallw_sched_intra_blocked(const void *sendbuf, const MPI_Aint if (recvtype_size) { mpi_errno = MPIR_TSP_sched_irecv((char *) recvbuf + rdispls[dst], recvcounts[dst], recvtypes[dst], dst, tag, - comm, sched, 0, NULL, &vtx_id); + comm, collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } @@ -62,7 +62,7 @@ int MPIR_TSP_Ialltoallw_sched_intra_blocked(const void *sendbuf, const MPI_Aint if (sendtype_size) { mpi_errno = MPIR_TSP_sched_isend((char *) sendbuf + sdispls[dst], sendcounts[dst], sendtypes[dst], dst, tag, - comm, sched, 0, NULL, &vtx_id); + comm, collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/ialltoallw/ialltoallw_tsp_inplace.c b/src/mpi/coll/ialltoallw/ialltoallw_tsp_inplace.c index ce84890a827..13ff40c6127 100644 --- a/src/mpi/coll/ialltoallw/ialltoallw_tsp_inplace.c +++ b/src/mpi/coll/ialltoallw/ialltoallw_tsp_inplace.c @@ -12,7 +12,7 @@ int MPIR_TSP_Ialltoallw_sched_intra_inplace(const void *sendbuf, const MPI_Aint const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm * comm, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -59,12 +59,12 @@ int MPIR_TSP_Ialltoallw_sched_intra_inplace(const void *sendbuf, const MPI_Aint adj_tmp_buf = (void *) ((char *) tmp_buf - true_lb); mpi_errno = MPIR_TSP_sched_isend((char *) recvbuf + rdispls[dst], - recvcounts[dst], recvtypes[dst], dst, tag, comm, sched, - nvtcs, vtcs, &send_id); + recvcounts[dst], recvtypes[dst], dst, tag, comm, + collattr, sched, nvtcs, vtcs, &send_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); mpi_errno = MPIR_TSP_sched_irecv(adj_tmp_buf, recvcounts[dst], recvtypes[dst], dst, tag, comm, - sched, nvtcs, vtcs, &recv_id); + collattr, sched, nvtcs, vtcs, &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); nvtcs = 2; diff --git a/src/mpi/coll/ibarrier/ibarrier_inter_sched_bcast.c b/src/mpi/coll/ibarrier/ibarrier_inter_sched_bcast.c index e98bff426f0..d178326ceba 100644 --- a/src/mpi/coll/ibarrier/ibarrier_inter_sched_bcast.c +++ b/src/mpi/coll/ibarrier/ibarrier_inter_sched_bcast.c @@ -5,7 +5,7 @@ #include "mpiimpl.h" -int MPIR_Ibarrier_inter_sched_bcast(MPIR_Comm * comm_ptr, MPIR_Sched_t s) +int MPIR_Ibarrier_inter_sched_bcast(MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, root; @@ -23,7 +23,7 @@ int MPIR_Ibarrier_inter_sched_bcast(MPIR_Comm * comm_ptr, MPIR_Sched_t s) /* do a barrier on the local intracommunicator */ if (comm_ptr->local_size != 1) { - mpi_errno = MPIR_Ibarrier_intra_sched_auto(comm_ptr->local_comm, s); + mpi_errno = MPIR_Ibarrier_intra_sched_auto(comm_ptr->local_comm, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -40,26 +40,26 @@ int MPIR_Ibarrier_inter_sched_bcast(MPIR_Comm * comm_ptr, MPIR_Sched_t s) * left group */ if (comm_ptr->is_low_group) { root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; - mpi_errno = MPIR_Ibcast_inter_sched_auto(buf, 1, MPI_BYTE, root, comm_ptr, s); + mpi_errno = MPIR_Ibcast_inter_sched_auto(buf, 1, MPI_BYTE, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); /* receive bcast from right */ root = 0; - mpi_errno = MPIR_Ibcast_inter_sched_auto(buf, 1, MPI_BYTE, root, comm_ptr, s); + mpi_errno = MPIR_Ibcast_inter_sched_auto(buf, 1, MPI_BYTE, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* receive bcast from left */ root = 0; - mpi_errno = MPIR_Ibcast_inter_sched_auto(buf, 1, MPI_BYTE, root, comm_ptr, s); + mpi_errno = MPIR_Ibcast_inter_sched_auto(buf, 1, MPI_BYTE, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); /* bcast to left */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; - mpi_errno = MPIR_Ibcast_inter_sched_auto(buf, 1, MPI_BYTE, root, comm_ptr, s); + mpi_errno = MPIR_Ibcast_inter_sched_auto(buf, 1, MPI_BYTE, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } diff --git a/src/mpi/coll/ibarrier/ibarrier_intra_sched_recursive_doubling.c b/src/mpi/coll/ibarrier/ibarrier_intra_sched_recursive_doubling.c index 243b54fc9f1..a0f3c4e9fd9 100644 --- a/src/mpi/coll/ibarrier/ibarrier_intra_sched_recursive_doubling.c +++ b/src/mpi/coll/ibarrier/ibarrier_intra_sched_recursive_doubling.c @@ -18,7 +18,7 @@ * process i sends to process (i + 2^k) % p and receives from process * (i - 2^k + p) % p. */ -int MPIR_Ibarrier_intra_sched_recursive_doubling(MPIR_Comm * comm_ptr, MPIR_Sched_t s) +int MPIR_Ibarrier_intra_sched_recursive_doubling(MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int size, rank, src, dst, mask; @@ -33,10 +33,10 @@ int MPIR_Ibarrier_intra_sched_recursive_doubling(MPIR_Comm * comm_ptr, MPIR_Sche dst = (rank + mask) % size; src = (rank - mask + size) % size; - mpi_errno = MPIR_Sched_send(NULL, 0, MPI_BYTE, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(NULL, 0, MPI_BYTE, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIR_Sched_recv(NULL, 0, MPI_BYTE, src, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(NULL, 0, MPI_BYTE, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); diff --git a/src/mpi/coll/ibarrier/ibarrier_intra_tsp_dissem.c b/src/mpi/coll/ibarrier/ibarrier_intra_tsp_dissem.c index 428b7088c2b..044be5216e1 100644 --- a/src/mpi/coll/ibarrier/ibarrier_intra_tsp_dissem.c +++ b/src/mpi/coll/ibarrier/ibarrier_intra_tsp_dissem.c @@ -6,7 +6,8 @@ #include "mpiimpl.h" /* Routine to schedule a disdem based barrier with radix k */ -int MPIR_TSP_Ibarrier_sched_intra_k_dissemination(MPIR_Comm * comm, int k, MPIR_TSP_sched_t sched) +int MPIR_TSP_Ibarrier_sched_intra_k_dissemination(MPIR_Comm * comm, int k, int collattr, + MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -51,15 +52,15 @@ int MPIR_TSP_Ibarrier_sched_intra_k_dissemination(MPIR_Comm * comm, int k, MPIR_ MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "dissem barrier - scheduling recv from %d\n", from)); mpi_errno = - MPIR_TSP_sched_irecv(NULL, 0, MPI_BYTE, from, tag, comm, sched, 0, NULL, + MPIR_TSP_sched_irecv(NULL, 0, MPI_BYTE, from, tag, comm, collattr, sched, 0, NULL, &recv_ids[i * (k - 1) + j - 1]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "dissem barrier - scheduling send to %d\n", to)); mpi_errno = - MPIR_TSP_sched_isend(NULL, 0, MPI_BYTE, to, tag, comm, sched, i * (k - 1), recv_ids, - &vtx_id); + MPIR_TSP_sched_isend(NULL, 0, MPI_BYTE, to, tag, comm, collattr, sched, i * (k - 1), + recv_ids, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, diff --git a/src/mpi/coll/ibarrier/ibarrier_intra_tsp_recexch.c b/src/mpi/coll/ibarrier/ibarrier_intra_tsp_recexch.c index 31e2f1de567..5cb237d100a 100644 --- a/src/mpi/coll/ibarrier/ibarrier_intra_tsp_recexch.c +++ b/src/mpi/coll/ibarrier/ibarrier_intra_tsp_recexch.c @@ -6,7 +6,8 @@ #include "mpiimpl.h" /* Routine to schedule a disdem based barrier with radix k */ -int MPIR_TSP_Ibarrier_sched_intra_recexch(MPIR_Comm * comm, int k, MPIR_TSP_sched_t sched) +int MPIR_TSP_Ibarrier_sched_intra_recexch(MPIR_Comm * comm, int k, int collattr, + MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; void *recvbuf = NULL; @@ -16,7 +17,7 @@ int MPIR_TSP_Ibarrier_sched_intra_recexch(MPIR_Comm * comm, int k, MPIR_TSP_sche MPIR_TSP_Iallreduce_sched_intra_recexch(MPI_IN_PLACE, recvbuf, 0, MPI_BYTE, MPI_SUM, comm, MPIR_IALLREDUCE_RECEXCH_TYPE_MULTIPLE_BUFFER, - k, sched); + k, collattr, sched); MPIR_ERR_CHECK(mpi_errno); fn_exit: diff --git a/src/mpi/coll/ibarrier/ibarrier_tsp_auto.c b/src/mpi/coll/ibarrier/ibarrier_tsp_auto.c index d98497b9ff0..f4cf1c5d10a 100644 --- a/src/mpi/coll/ibarrier/ibarrier_tsp_auto.c +++ b/src/mpi/coll/ibarrier/ibarrier_tsp_auto.c @@ -6,7 +6,7 @@ #include "mpiimpl.h" /* sched version of CVAR and json based collective selection. Meant only for gentran scheduler */ -int MPIR_TSP_Ibarrier_sched_intra_tsp_auto(MPIR_Comm * comm, MPIR_TSP_sched_t sched) +int MPIR_TSP_Ibarrier_sched_intra_tsp_auto(MPIR_Comm * comm, int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; @@ -25,13 +25,14 @@ int MPIR_TSP_Ibarrier_sched_intra_tsp_auto(MPIR_Comm * comm, MPIR_TSP_sched_t sc MPIR_TSP_Iallreduce_sched_intra_recexch(MPI_IN_PLACE, recvbuf, 0, MPI_BYTE, MPI_SUM, comm, MPIR_IALLREDUCE_RECEXCH_TYPE_MULTIPLE_BUFFER, - MPIR_CVAR_IBARRIER_RECEXCH_KVAL, sched); + MPIR_CVAR_IBARRIER_RECEXCH_KVAL, + collattr, sched); break; case MPIR_CVAR_IBARRIER_INTRA_ALGORITHM_tsp_k_dissemination: mpi_errno = MPIR_TSP_Ibarrier_sched_intra_k_dissemination(comm, MPIR_CVAR_IBARRIER_DISSEM_KVAL, - sched); + collattr, sched); break; default: @@ -45,7 +46,7 @@ int MPIR_TSP_Ibarrier_sched_intra_tsp_auto(MPIR_Comm * comm, MPIR_TSP_sched_t sc MPI_SUM, comm, MPIR_IALLREDUCE_RECEXCH_TYPE_MULTIPLE_BUFFER, cnt->u.ibarrier.intra_tsp_recexch.k, - sched); + collattr, sched); break; case MPII_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Ibarrier_intra_tsp_k_dissemination: @@ -53,7 +54,7 @@ int MPIR_TSP_Ibarrier_sched_intra_tsp_auto(MPIR_Comm * comm, MPIR_TSP_sched_t sc MPIR_TSP_Ibarrier_sched_intra_k_dissemination(comm, cnt->u. ibarrier.intra_tsp_k_dissemination. - k, sched); + k, collattr, sched); break; default: @@ -68,7 +69,8 @@ int MPIR_TSP_Ibarrier_sched_intra_tsp_auto(MPIR_Comm * comm, MPIR_TSP_sched_t sc fallback: mpi_errno = MPIR_TSP_Iallreduce_sched_intra_recexch(MPI_IN_PLACE, NULL, 0, - MPI_BYTE, MPI_SUM, comm, 0, 2, sched); + MPI_BYTE, MPI_SUM, comm, 0, 2, collattr, + sched); fn_exit: return mpi_errno; diff --git a/src/mpi/coll/ibcast/ibcast.h b/src/mpi/coll/ibcast/ibcast.h index cc21d5645ff..be8319a5d91 100644 --- a/src/mpi/coll/ibcast/ibcast.h +++ b/src/mpi/coll/ibcast/ibcast.h @@ -21,6 +21,6 @@ int MPII_Ibcast_sched_test_curr_length(MPIR_Comm * comm, int tag, void *state); int MPII_Ibcast_sched_init_length(MPIR_Comm * comm, int tag, void *state); int MPII_Ibcast_sched_add_length(MPIR_Comm * comm, int tag, void *state); int MPII_Iscatter_for_bcast_sched(void *tmp_buf, int root, MPIR_Comm * comm_ptr, MPI_Aint nbytes, - MPIR_Sched_t s); + int collattr, MPIR_Sched_t s); #endif /* IBCAST_H_INCLUDED */ diff --git a/src/mpi/coll/ibcast/ibcast_inter_sched_flat.c b/src/mpi/coll/ibcast/ibcast_inter_sched_flat.c index d7f7108c970..9a063c41e2f 100644 --- a/src/mpi/coll/ibcast/ibcast_inter_sched_flat.c +++ b/src/mpi/coll/ibcast/ibcast_inter_sched_flat.c @@ -7,7 +7,7 @@ #include "ibcast.h" int MPIR_Ibcast_inter_sched_flat(void *buffer, MPI_Aint count, MPI_Datatype datatype, - int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + int root, MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; @@ -21,12 +21,12 @@ int MPIR_Ibcast_inter_sched_flat(void *buffer, MPI_Aint count, MPI_Datatype data mpi_errno = MPI_SUCCESS; } else if (root == MPI_ROOT) { /* root sends to rank 0 on remote group and returns */ - mpi_errno = MPIR_Sched_send(buffer, count, datatype, 0, comm_ptr, s); + mpi_errno = MPIR_Sched_send(buffer, count, datatype, 0, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* remote group. rank 0 on remote group receives from root */ if (comm_ptr->rank == 0) { - mpi_errno = MPIR_Sched_recv(buffer, count, datatype, root, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(buffer, count, datatype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -39,7 +39,8 @@ int MPIR_Ibcast_inter_sched_flat(void *buffer, MPI_Aint count, MPI_Datatype data /* now do the usual broadcast on this intracommunicator * with rank 0 as root. */ mpi_errno = - MPIR_Ibcast_intra_sched_auto(buffer, count, datatype, root, comm_ptr->local_comm, s); + MPIR_Ibcast_intra_sched_auto(buffer, count, datatype, root, comm_ptr->local_comm, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } diff --git a/src/mpi/coll/ibcast/ibcast_intra_sched_binomial.c b/src/mpi/coll/ibcast/ibcast_intra_sched_binomial.c index 0a6a6d3d038..deb9e203fbf 100644 --- a/src/mpi/coll/ibcast/ibcast_intra_sched_binomial.c +++ b/src/mpi/coll/ibcast/ibcast_intra_sched_binomial.c @@ -13,7 +13,7 @@ * to build up a larger hierarchical broadcast from multiple invocations of this * function. */ int MPIR_Ibcast_intra_sched_binomial(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int mask; @@ -92,10 +92,10 @@ int MPIR_Ibcast_intra_sched_binomial(void *buffer, MPI_Aint count, MPI_Datatype src += comm_size; if (!is_contig) mpi_errno = MPIR_Sched_recv_status(tmp_buf, nbytes, MPI_BYTE, src, - comm_ptr, &ibcast_state->status, s); + comm_ptr, &ibcast_state->status, collattr, s); else mpi_errno = MPIR_Sched_recv_status(buffer, count, datatype, src, - comm_ptr, &ibcast_state->status, s); + comm_ptr, &ibcast_state->status, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -125,9 +125,9 @@ int MPIR_Ibcast_intra_sched_binomial(void *buffer, MPI_Aint count, MPI_Datatype if (dst >= comm_size) dst -= comm_size; if (!is_contig) - mpi_errno = MPIR_Sched_send(tmp_buf, nbytes, MPI_BYTE, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(tmp_buf, nbytes, MPI_BYTE, dst, comm_ptr, collattr, s); else - mpi_errno = MPIR_Sched_send(buffer, count, datatype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(buffer, count, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* NOTE: This is departure from MPIR_Bcast_intra_binomial. A true analog diff --git a/src/mpi/coll/ibcast/ibcast_intra_sched_scatter_recursive_doubling_allgather.c b/src/mpi/coll/ibcast/ibcast_intra_sched_scatter_recursive_doubling_allgather.c index 0307947da03..428ab077d15 100644 --- a/src/mpi/coll/ibcast/ibcast_intra_sched_scatter_recursive_doubling_allgather.c +++ b/src/mpi/coll/ibcast/ibcast_intra_sched_scatter_recursive_doubling_allgather.c @@ -30,8 +30,8 @@ */ /* It would be nice to just call: * ----8<---- - * MPIR_Iscatter_intra_sched_auto(...); - * MPIR_Iallgather_intra_sched_auto(...); + * collattr, MPIR_Iscatter_intra_sched_auto(...); + * collattr, MPIR_Iallgather_intra_sched_auto(...); * ----8<---- * * But that results in inefficient additional memory allocation and copies @@ -49,7 +49,7 @@ int MPIR_Ibcast_intra_sched_scatter_recursive_doubling_allgather(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size, dst; @@ -110,7 +110,7 @@ int MPIR_Ibcast_intra_sched_scatter_recursive_doubling_allgather(void *buffer, M } - mpi_errno = MPII_Iscatter_for_bcast_sched(tmp_buf, root, comm_ptr, nbytes, s); + mpi_errno = MPII_Iscatter_for_bcast_sched(tmp_buf, root, comm_ptr, nbytes, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPI_Aint scatter_size, curr_size, incoming_count; @@ -162,12 +162,13 @@ int MPIR_Ibcast_intra_sched_scatter_recursive_doubling_allgather(void *buffer, M incoming_count = 0; mpi_errno = MPIR_Sched_send(((char *) tmp_buf + send_offset), - curr_size, MPI_BYTE, dst, comm_ptr, s); + curr_size, MPI_BYTE, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier */ mpi_errno = MPIR_Sched_recv_status(((char *) tmp_buf + recv_offset), incoming_count, - MPI_BYTE, dst, comm_ptr, &ibcast_state->status, s); + MPI_BYTE, dst, comm_ptr, &ibcast_state->status, + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); mpi_errno = MPIR_Sched_cb(&MPII_Ibcast_sched_add_length, ibcast_state, s); @@ -228,7 +229,8 @@ int MPIR_Ibcast_intra_sched_scatter_recursive_doubling_allgather(void *buffer, M * receive. that's the amount of data to be * sent now. */ mpi_errno = MPIR_Sched_send(((char *) tmp_buf + offset), - incoming_count, MPI_BYTE, dst, comm_ptr, s); + incoming_count, MPI_BYTE, dst, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -248,7 +250,7 @@ int MPIR_Ibcast_intra_sched_scatter_recursive_doubling_allgather(void *buffer, M * whose data we don't have */ mpi_errno = MPIR_Sched_recv_status(((char *) tmp_buf + offset), incoming_count, MPI_BYTE, dst, comm_ptr, - &ibcast_state->status, s); + &ibcast_state->status, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); mpi_errno = MPIR_Sched_cb(&MPII_Ibcast_sched_add_length, ibcast_state, s); diff --git a/src/mpi/coll/ibcast/ibcast_intra_sched_scatter_ring_allgather.c b/src/mpi/coll/ibcast/ibcast_intra_sched_scatter_ring_allgather.c index 0418f6e28b8..b3d9877a9cb 100644 --- a/src/mpi/coll/ibcast/ibcast_intra_sched_scatter_ring_allgather.c +++ b/src/mpi/coll/ibcast/ibcast_intra_sched_scatter_ring_allgather.c @@ -26,7 +26,8 @@ */ int MPIR_Ibcast_intra_sched_scatter_ring_allgather(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size, rank; @@ -78,7 +79,7 @@ int MPIR_Ibcast_intra_sched_scatter_ring_allgather(void *buffer, MPI_Aint count, } } - mpi_errno = MPII_Iscatter_for_bcast_sched(tmp_buf, root, comm_ptr, nbytes, s); + mpi_errno = MPII_Iscatter_for_bcast_sched(tmp_buf, root, comm_ptr, nbytes, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPI_Aint scatter_size, curr_size; @@ -119,12 +120,12 @@ int MPIR_Ibcast_intra_sched_scatter_ring_allgather(void *buffer, MPI_Aint count, right_disp = rel_j * scatter_size; mpi_errno = MPIR_Sched_send(((char *) tmp_buf + right_disp), - right_count, MPI_BYTE, right, comm_ptr, s); + right_count, MPI_BYTE, right, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier here */ mpi_errno = MPIR_Sched_recv_status(((char *) tmp_buf + left_disp), left_count, MPI_BYTE, left, comm_ptr, - &ibcast_state->status, s); + &ibcast_state->status, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); mpi_errno = MPIR_Sched_cb(&MPII_Ibcast_sched_add_length, ibcast_state, s); diff --git a/src/mpi/coll/ibcast/ibcast_intra_sched_smp.c b/src/mpi/coll/ibcast/ibcast_intra_sched_smp.c index d734e7d8c2d..5be4f53de42 100644 --- a/src/mpi/coll/ibcast/ibcast_intra_sched_smp.c +++ b/src/mpi/coll/ibcast/ibcast_intra_sched_smp.c @@ -28,7 +28,7 @@ static int sched_test_length(MPIR_Comm * comm, int tag, void *state) * currently make any decision about which particular algorithm to use for any * subcommunicator. */ int MPIR_Ibcast_intra_sched_smp(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; MPI_Aint type_size; @@ -48,13 +48,14 @@ int MPIR_Ibcast_intra_sched_smp(void *buffer, MPI_Aint count, MPI_Datatype datat /* send to intranode-rank 0 on the root's node */ if (comm_ptr->node_comm != NULL && MPIR_Get_intranode_rank(comm_ptr, root) > 0) { /* is not the node root (0) *//* and is on our node (!-1) */ if (root == comm_ptr->rank) { - mpi_errno = MPIR_Sched_send(buffer, count, datatype, 0, comm_ptr->node_comm, s); + mpi_errno = + MPIR_Sched_send(buffer, count, datatype, 0, comm_ptr->node_comm, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else if (0 == comm_ptr->node_comm->rank) { mpi_errno = MPIR_Sched_recv_status(buffer, count, datatype, MPIR_Get_intranode_rank(comm_ptr, root), comm_ptr->node_comm, - &ibcast_state->status, s); + &ibcast_state->status, collattr, s); MPIR_ERR_CHECK(mpi_errno); #ifdef HAVE_ERROR_CHECKING MPIR_SCHED_BARRIER(s); @@ -69,7 +70,7 @@ int MPIR_Ibcast_intra_sched_smp(void *buffer, MPI_Aint count, MPI_Datatype datat if (comm_ptr->node_roots_comm != NULL) { mpi_errno = MPIR_Ibcast_intra_sched_auto(buffer, count, datatype, MPIR_Get_internode_rank(comm_ptr, root), - comm_ptr->node_roots_comm, s); + comm_ptr->node_roots_comm, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* don't allow the local ops for the intranode phase to start until this has completed */ @@ -78,7 +79,8 @@ int MPIR_Ibcast_intra_sched_smp(void *buffer, MPI_Aint count, MPI_Datatype datat /* perform the intranode broadcast on all except for the root's node */ if (comm_ptr->node_comm != NULL) { mpi_errno = - MPIR_Ibcast_intra_sched_auto(buffer, count, datatype, 0, comm_ptr->node_comm, s); + MPIR_Ibcast_intra_sched_auto(buffer, count, datatype, 0, comm_ptr->node_comm, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } diff --git a/src/mpi/coll/ibcast/ibcast_tsp_auto.c b/src/mpi/coll/ibcast/ibcast_tsp_auto.c index 52c9016c083..d46aeceef95 100644 --- a/src/mpi/coll/ibcast/ibcast_tsp_auto.c +++ b/src/mpi/coll/ibcast/ibcast_tsp_auto.c @@ -13,7 +13,8 @@ /* Remove this function when gentran algos are in json file */ static int MPIR_Ibcast_sched_intra_tsp_flat_auto(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, MPIR_TSP_sched_t sched) + MPIR_Comm * comm_ptr, int collattr, + MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int comm_size; @@ -31,14 +32,15 @@ static int MPIR_Ibcast_sched_intra_tsp_flat_auto(void *buffer, MPI_Aint count, if ((nbytes < MPIR_CVAR_BCAST_SHORT_MSG_SIZE) || (comm_size < MPIR_CVAR_BCAST_MIN_PROCS)) { /* gentran tree with knomial tree type, radix 2 and pipeline block size 0 */ mpi_errno = MPIR_TSP_Ibcast_sched_intra_tree(buffer, count, datatype, root, comm_ptr, - tree_type, radix, block_size, sched); + tree_type, radix, block_size, collattr, sched); } else { /* gentran scatterv recexch allgather with radix 2 */ mpi_errno = MPIR_TSP_Ibcast_sched_intra_scatterv_allgatherv(buffer, count, datatype, root, comm_ptr, MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_tsp_recexch_doubling, - scatterv_k, allgatherv_k, sched); + scatterv_k, allgatherv_k, collattr, + sched); } if (mpi_errno) MPIR_ERR_POP(mpi_errno); @@ -51,7 +53,8 @@ static int MPIR_Ibcast_sched_intra_tsp_flat_auto(void *buffer, MPI_Aint count, /* sched version of CVAR and json based collective selection. Meant only for gentran scheduler */ int MPIR_TSP_Ibcast_sched_intra_tsp_auto(void *buffer, MPI_Aint count, MPI_Datatype datatype, - int root, MPIR_Comm * comm_ptr, MPIR_TSP_sched_t sched) + int root, MPIR_Comm * comm_ptr, int collattr, + MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; @@ -74,7 +77,8 @@ int MPIR_TSP_Ibcast_sched_intra_tsp_auto(void *buffer, MPI_Aint count, MPI_Datat MPIR_TSP_Ibcast_sched_intra_tree(buffer, count, datatype, root, comm_ptr, MPIR_Ibcast_tree_type, MPIR_CVAR_IBCAST_TREE_KVAL, - MPIR_CVAR_IBCAST_TREE_PIPELINE_CHUNK_SIZE, sched); + MPIR_CVAR_IBCAST_TREE_PIPELINE_CHUNK_SIZE, + collattr, sched); break; case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_tsp_scatterv_recexch_allgatherv: @@ -84,20 +88,21 @@ int MPIR_TSP_Ibcast_sched_intra_tsp_auto(void *buffer, MPI_Aint count, MPI_Datat MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_tsp_recexch_doubling, MPIR_CVAR_IBCAST_SCATTERV_KVAL, MPIR_CVAR_IBCAST_ALLGATHERV_RECEXCH_KVAL, - sched); + collattr, sched); break; case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_tsp_scatterv_ring_allgatherv: mpi_errno = MPIR_TSP_Ibcast_sched_intra_scatterv_ring_allgatherv(buffer, count, datatype, - root, comm_ptr, 1, sched); + root, comm_ptr, 1, collattr, + sched); break; case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_tsp_ring: mpi_errno = MPIR_TSP_Ibcast_sched_intra_tree(buffer, count, datatype, root, comm_ptr, MPIR_TREE_TYPE_KARY, 1, - MPIR_CVAR_IBCAST_RING_CHUNK_SIZE, sched); + MPIR_CVAR_IBCAST_RING_CHUNK_SIZE, collattr, sched); break; default: @@ -111,7 +116,7 @@ int MPIR_TSP_Ibcast_sched_intra_tsp_auto(void *buffer, MPI_Aint count, MPI_Datat cnt->u.ibcast.intra_tsp_tree.tree_type, cnt->u.ibcast.intra_tsp_tree.k, cnt->u.ibcast.intra_tsp_tree.chunk_size, - sched); + collattr, sched); break; case MPII_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Ibcast_intra_tsp_scatterv_recexch_allgatherv: mpi_errno = @@ -122,14 +127,15 @@ int MPIR_TSP_Ibcast_sched_intra_tsp_auto(void *buffer, MPI_Aint count, MPI_Datat ibcast.intra_tsp_scatterv_recexch_allgatherv.scatterv_k, cnt->u. ibcast.intra_tsp_scatterv_recexch_allgatherv.allgatherv_k, - sched); + collattr, sched); break; case MPIR_CVAR_IBCAST_INTRA_ALGORITHM_tsp_scatterv_ring_allgatherv: mpi_errno = MPIR_TSP_Ibcast_sched_intra_scatterv_ring_allgatherv(buffer, count, datatype, root, - comm_ptr, 1, sched); + comm_ptr, 1, collattr, + sched); break; case MPII_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Ibcast_intra_tsp_ring: @@ -137,7 +143,7 @@ int MPIR_TSP_Ibcast_sched_intra_tsp_auto(void *buffer, MPI_Aint count, MPI_Datat MPIR_TSP_Ibcast_sched_intra_tree(buffer, count, datatype, root, comm_ptr, MPIR_TREE_TYPE_KARY, 1, cnt->u.ibcast.intra_tsp_tree.chunk_size, - sched); + collattr, sched); break; default: /* Replace this call with MPIR_Assert(0) when json files have gentran algos */ @@ -150,7 +156,7 @@ int MPIR_TSP_Ibcast_sched_intra_tsp_auto(void *buffer, MPI_Aint count, MPI_Datat fallback: mpi_errno = MPIR_Ibcast_sched_intra_tsp_flat_auto(buffer, count, datatype, root, - comm_ptr, sched); + comm_ptr, collattr, sched); fn_exit: return mpi_errno; diff --git a/src/mpi/coll/ibcast/ibcast_tsp_scatterv_allgatherv.c b/src/mpi/coll/ibcast/ibcast_tsp_scatterv_allgatherv.c index e00c2f7c507..e2e6753588f 100644 --- a/src/mpi/coll/ibcast/ibcast_tsp_scatterv_allgatherv.c +++ b/src/mpi/coll/ibcast/ibcast_tsp_scatterv_allgatherv.c @@ -11,7 +11,7 @@ int MPIR_TSP_Ibcast_sched_intra_scatterv_allgatherv(void *buffer, MPI_Aint count MPI_Datatype datatype, int root, MPIR_Comm * comm, int allgatherv_algo, int scatterv_k, int allgatherv_k, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -144,7 +144,7 @@ int MPIR_TSP_Ibcast_sched_intra_scatterv_allgatherv(void *buffer, MPI_Aint count if (my_tree.parent != -1) { mpi_errno = MPIR_TSP_sched_irecv((char *) tmp_buf + displs[rank], recv_size, MPI_BYTE, - my_tree.parent, tag, comm, sched, 0, NULL, &recv_id); + my_tree.parent, tag, comm, collattr, sched, 0, NULL, &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "rank:%d posts recv", rank)); @@ -160,8 +160,8 @@ int MPIR_TSP_Ibcast_sched_intra_scatterv_allgatherv(void *buffer, MPI_Aint count mpi_errno = MPIR_TSP_sched_isend((char *) tmp_buf + displs[child], child_subtree_size[i], MPI_BYTE, - child, tag, comm, sched, num_send_dependencies, &recv_id, - &vtx_id); + child, tag, comm, collattr, sched, num_send_dependencies, + &recv_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -174,13 +174,13 @@ int MPIR_TSP_Ibcast_sched_intra_scatterv_allgatherv(void *buffer, MPI_Aint count /* Schedule Allgatherv ring */ mpi_errno = MPIR_TSP_Iallgatherv_sched_intra_ring(MPI_IN_PLACE, cnts[rank], MPI_BYTE, tmp_buf, - cnts, displs, MPI_BYTE, comm, sched); + cnts, displs, MPI_BYTE, comm, collattr, sched); else /* Schedule Allgatherv recexch */ mpi_errno = MPIR_TSP_Iallgatherv_sched_intra_recexch(MPI_IN_PLACE, cnts[rank], MPI_BYTE, tmp_buf, cnts, displs, MPI_BYTE, comm, 0, allgatherv_k, - sched); + collattr, sched); MPIR_ERR_CHECK(mpi_errno); if (!is_contig) { diff --git a/src/mpi/coll/ibcast/ibcast_tsp_scatterv_ring_allgatherv.c b/src/mpi/coll/ibcast/ibcast_tsp_scatterv_ring_allgatherv.c index 25016705afa..2bb4001b068 100644 --- a/src/mpi/coll/ibcast/ibcast_tsp_scatterv_ring_allgatherv.c +++ b/src/mpi/coll/ibcast/ibcast_tsp_scatterv_ring_allgatherv.c @@ -10,7 +10,7 @@ int MPIR_TSP_Ibcast_sched_intra_scatterv_ring_allgatherv(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm, int scatterv_k, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; @@ -19,7 +19,7 @@ int MPIR_TSP_Ibcast_sched_intra_scatterv_ring_allgatherv(void *buffer, MPI_Aint mpi_errno = MPIR_TSP_Ibcast_sched_intra_scatterv_allgatherv(buffer, count, datatype, root, comm, MPIR_CVAR_IALLGATHERV_INTRA_ALGORITHM_tsp_ring, - scatterv_k, 0, sched); + scatterv_k, 0, collattr, sched); MPIR_ERR_CHECK(mpi_errno); fn_exit: diff --git a/src/mpi/coll/ibcast/ibcast_tsp_tree.c b/src/mpi/coll/ibcast/ibcast_tsp_tree.c index ceef911a228..a2a8185c804 100644 --- a/src/mpi/coll/ibcast/ibcast_tsp_tree.c +++ b/src/mpi/coll/ibcast/ibcast_tsp_tree.c @@ -11,7 +11,7 @@ /* Routine to schedule a pipelined tree based broadcast */ int MPIR_TSP_Ibcast_sched_intra_tree(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm, int tree_type, int k, int chunk_size, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -71,7 +71,7 @@ int MPIR_TSP_Ibcast_sched_intra_tree(void *buffer, MPI_Aint count, MPI_Datatype #ifdef HAVE_ERROR_CHECKING mpi_errno = MPIR_TSP_sched_irecv_status((char *) buffer + offset * extent, msgsize, - datatype, my_tree.parent, tag, comm, + datatype, my_tree.parent, tag, comm, collattr, &ibcast_state->status, sched, 0, NULL, &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPIR_TSP_sched_cb(&MPII_Ibcast_sched_test_length, ibcast_state, sched, 1, &recv_id, @@ -79,7 +79,7 @@ int MPIR_TSP_Ibcast_sched_intra_tree(void *buffer, MPI_Aint count, MPI_Datatype #else mpi_errno = MPIR_TSP_sched_irecv((char *) buffer + offset * extent, msgsize, datatype, - my_tree.parent, tag, comm, sched, 0, NULL, &recv_id); + my_tree.parent, tag, comm, collattr, sched, 0, NULL, &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); #endif } @@ -88,8 +88,8 @@ int MPIR_TSP_Ibcast_sched_intra_tree(void *buffer, MPI_Aint count, MPI_Datatype /* Multicast data to the children */ mpi_errno = MPIR_TSP_sched_imcast((char *) buffer + offset * extent, msgsize, datatype, ut_int_array(my_tree.children), num_children, tag, - comm, sched, (my_tree.parent != -1) ? 1 : 0, &recv_id, - &vtx_id); + comm, collattr, sched, (my_tree.parent != -1) ? 1 : 0, + &recv_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } offset += msgsize; diff --git a/src/mpi/coll/ibcast/ibcast_utils.c b/src/mpi/coll/ibcast/ibcast_utils.c index 9bfaf925b3a..1aa6b30c7f8 100644 --- a/src/mpi/coll/ibcast/ibcast_utils.c +++ b/src/mpi/coll/ibcast/ibcast_utils.c @@ -69,7 +69,7 @@ int MPII_Ibcast_sched_add_length(MPIR_Comm * comm, int tag, void *state) * typical scatter arguments. At the moment this function always * scatters a buffer of nbytes starting at tmp_buf address. */ int MPII_Iscatter_for_bcast_sched(void *tmp_buf, int root, MPIR_Comm * comm_ptr, MPI_Aint nbytes, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size, src, dst; @@ -110,7 +110,7 @@ int MPII_Iscatter_for_bcast_sched(void *tmp_buf, int root, MPIR_Comm * comm_ptr, if (recv_size > 0) { mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + relative_rank * scatter_size), - recv_size, MPI_BYTE, src, comm_ptr, s); + recv_size, MPI_BYTE, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -135,7 +135,7 @@ int MPII_Iscatter_for_bcast_sched(void *tmp_buf, int root, MPIR_Comm * comm_ptr, dst -= comm_size; mpi_errno = MPIR_Sched_send(((char *) tmp_buf + scatter_size * (relative_rank + mask)), - send_size, MPI_BYTE, dst, comm_ptr, s); + send_size, MPI_BYTE, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); curr_size -= send_size; diff --git a/src/mpi/coll/iexscan/iexscan_intra_sched_recursive_doubling.c b/src/mpi/coll/iexscan/iexscan_intra_sched_recursive_doubling.c index 62148d159e4..55ab3c4fcfb 100644 --- a/src/mpi/coll/iexscan/iexscan_intra_sched_recursive_doubling.c +++ b/src/mpi/coll/iexscan/iexscan_intra_sched_recursive_doubling.c @@ -50,7 +50,7 @@ */ int MPIR_Iexscan_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size; @@ -61,7 +61,7 @@ int MPIR_Iexscan_intra_sched_recursive_doubling(const void *sendbuf, void *recvb comm_size = comm_ptr->local_size; rank = comm_ptr->rank; - is_commutative = MPIR_Op_is_commutative(op); + is_commutative = collattr, MPIR_Op_is_commutative(op); /* need to allocate temporary buffer to store partial scan */ MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); @@ -89,10 +89,10 @@ int MPIR_Iexscan_intra_sched_recursive_doubling(const void *sendbuf, void *recvb dst = rank ^ mask; if (dst < comm_size) { /* Send partial_scan to dst. Recv into tmp_buf */ - mpi_errno = MPIR_Sched_send(partial_scan, count, datatype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(partial_scan, count, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier here */ - mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/igather/igather_inter_sched_long.c b/src/mpi/coll/igather/igather_inter_sched_long.c index fade46c3594..7262cb104e2 100644 --- a/src/mpi/coll/igather/igather_inter_sched_long.c +++ b/src/mpi/coll/igather/igather_inter_sched_long.c @@ -14,7 +14,7 @@ */ int MPIR_Igather_inter_sched_long(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + int root, MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; MPI_Aint remote_size; @@ -29,11 +29,11 @@ int MPIR_Igather_inter_sched_long(const void *sendbuf, MPI_Aint sendcount, MPI_D for (i = 0; i < remote_size; i++) { mpi_errno = MPIR_Sched_recv(((char *) recvbuf + recvcount * i * extent), - recvcount, recvtype, i, comm_ptr, s); + recvcount, recvtype, i, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } else { - mpi_errno = MPIR_Sched_send(sendbuf, sendcount, sendtype, root, comm_ptr, s); + mpi_errno = MPIR_Sched_send(sendbuf, sendcount, sendtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } diff --git a/src/mpi/coll/igather/igather_inter_sched_short.c b/src/mpi/coll/igather/igather_inter_sched_short.c index 81dc2bc2ddf..919e4fee496 100644 --- a/src/mpi/coll/igather/igather_inter_sched_short.c +++ b/src/mpi/coll/igather/igather_inter_sched_short.c @@ -15,7 +15,7 @@ */ int MPIR_Igather_inter_sched_short(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + int root, MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank; @@ -30,7 +30,8 @@ int MPIR_Igather_inter_sched_short(const void *sendbuf, MPI_Aint sendcount, MPI_ mpi_errno = MPI_SUCCESS; } else if (root == MPI_ROOT) { /* root receives data from rank 0 on remote group */ - mpi_errno = MPIR_Sched_recv(recvbuf, recvcount * remote_size, recvtype, 0, comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(recvbuf, recvcount * remote_size, recvtype, 0, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* remote group. Rank 0 allocates temporary buffer, does @@ -52,7 +53,7 @@ int MPIR_Igather_inter_sched_short(const void *sendbuf, MPI_Aint sendcount, MPI_ /* all processes in remote group form new intracommunicator */ if (!comm_ptr->local_comm) { - mpi_errno = MPII_Setup_intercomm_localcomm(comm_ptr); + mpi_errno = collattr, MPII_Setup_intercomm_localcomm(comm_ptr); MPIR_ERR_CHECK(mpi_errno); } @@ -61,12 +62,12 @@ int MPIR_Igather_inter_sched_short(const void *sendbuf, MPI_Aint sendcount, MPI_ /* now do the a local gather on this intracommunicator */ mpi_errno = MPIR_Igather_intra_sched_auto(sendbuf, sendcount, sendtype, tmp_buf, sendcount * sendtype_sz, MPI_BYTE, 0, - newcomm_ptr, s); + newcomm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); if (rank == 0) { mpi_errno = MPIR_Sched_send(tmp_buf, sendcount * local_size * sendtype_sz, MPI_BYTE, - root, comm_ptr, s); + root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } diff --git a/src/mpi/coll/igather/igather_intra_sched_binomial.c b/src/mpi/coll/igather/igather_intra_sched_binomial.c index 811c0305673..8e93f7fe7c5 100644 --- a/src/mpi/coll/igather/igather_intra_sched_binomial.c +++ b/src/mpi/coll/igather/igather_intra_sched_binomial.c @@ -28,7 +28,7 @@ int MPIR_Igather_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size, rank; @@ -125,14 +125,15 @@ int MPIR_Igather_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, char *rp = (char *) recvbuf + (((rank + mask) % comm_size) * recvcount * extent); mpi_errno = - MPIR_Sched_recv(rp, (recvblks * recvcount), recvtype, src, comm_ptr, s); + MPIR_Sched_recv(rp, (recvblks * recvcount), recvtype, src, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); } else if (nbytes < MPIR_CVAR_GATHER_VSMALL_MSG_SIZE) { mpi_errno = MPIR_Sched_recv(tmp_buf, (recvblks * nbytes), MPI_BYTE, src, - comm_ptr, s); + comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); @@ -151,7 +152,8 @@ int MPIR_Igather_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, mpi_errno = MPIR_Type_commit_impl(&tmp_type); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIR_Sched_recv(recvbuf, 1, tmp_type, src, comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(recvbuf, 1, tmp_type, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); @@ -174,7 +176,7 @@ int MPIR_Igather_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, offset = (mask - 1) * nbytes; mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + offset), (recvblks * nbytes), - MPI_BYTE, src, comm_ptr, s); + MPI_BYTE, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); @@ -187,12 +189,14 @@ int MPIR_Igather_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, if (!tmp_buf_size) { /* leaf nodes send directly from sendbuf */ - mpi_errno = MPIR_Sched_send(sendbuf, sendcount, sendtype, dst, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(sendbuf, sendcount, sendtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); } else if (nbytes < MPIR_CVAR_GATHER_VSMALL_MSG_SIZE) { - mpi_errno = MPIR_Sched_send(tmp_buf, curr_cnt, MPI_BYTE, dst, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(tmp_buf, curr_cnt, MPI_BYTE, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); @@ -217,7 +221,7 @@ int MPIR_Igather_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, mpi_errno = MPIR_Type_commit_impl(&tmp_type); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIR_Sched_send(MPI_BOTTOM, 1, tmp_type, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(MPI_BOTTOM, 1, tmp_type, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/igather/igather_tsp_tree.c b/src/mpi/coll/igather/igather_tsp_tree.c index f2d9393f083..af0838ec853 100644 --- a/src/mpi/coll/igather/igather_tsp_tree.c +++ b/src/mpi/coll/igather/igather_tsp_tree.c @@ -11,7 +11,7 @@ int MPIR_TSP_Igather_sched_intra_tree(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - int k, MPIR_TSP_sched_t sched) + int k, int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -136,8 +136,8 @@ int MPIR_TSP_Igather_sched_intra_tree(const void *sendbuf, MPI_Aint sendcount, /* Leaf nodes send to parent */ if (num_children == 0) { mpi_errno = - MPIR_TSP_sched_isend(tmp_buf, sendcount, sendtype, my_tree.parent, tag, comm, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_isend(tmp_buf, sendcount, sendtype, my_tree.parent, tag, comm, collattr, + sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "rank:%d posts recv\n", rank)); } else { @@ -161,13 +161,14 @@ int MPIR_TSP_Igather_sched_intra_tree(const void *sendbuf, MPI_Aint sendcount, mpi_errno = MPIR_TSP_sched_irecv((char *) tmp_buf + child_data_offset[i] * recvtype_extent, child_subtree_size[i] * recvcount, recvtype, child, tag, comm, - sched, num_dependencies, &dtcopy_id, &recv_id[i]); + collattr, sched, num_dependencies, &dtcopy_id, &recv_id[i]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } if (my_tree.parent != -1) { mpi_errno = MPIR_TSP_sched_isend(tmp_buf, recv_size, recvtype, my_tree.parent, - tag, comm, sched, num_children, recv_id, &vtx_id); + tag, comm, collattr, sched, num_children, recv_id, + &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/igatherv/igatherv_allcomm_sched_linear.c b/src/mpi/coll/igatherv/igatherv_allcomm_sched_linear.c index 05534971856..1b5dfe3bace 100644 --- a/src/mpi/coll/igatherv/igatherv_allcomm_sched_linear.c +++ b/src/mpi/coll/igatherv/igatherv_allcomm_sched_linear.c @@ -15,7 +15,7 @@ int MPIR_Igatherv_allcomm_sched_linear(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int i; @@ -46,7 +46,7 @@ int MPIR_Igatherv_allcomm_sched_linear(const void *sendbuf, MPI_Aint sendcount, } } else { mpi_errno = MPIR_Sched_recv(((char *) recvbuf + displs[i] * extent), - recvcounts[i], recvtype, i, comm_ptr, s); + recvcounts[i], recvtype, i, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } @@ -66,9 +66,11 @@ int MPIR_Igatherv_allcomm_sched_linear(const void *sendbuf, MPI_Aint sendcount, MPIR_CVAR_GET_DEFAULT_INT(GATHERV_INTER_SSEND_MIN_PROCS, &min_procs); if (comm_size >= min_procs) - mpi_errno = MPIR_Sched_ssend(sendbuf, sendcount, sendtype, root, comm_ptr, s); + mpi_errno = + MPIR_Sched_ssend(sendbuf, sendcount, sendtype, root, comm_ptr, collattr, s); else - mpi_errno = MPIR_Sched_send(sendbuf, sendcount, sendtype, root, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(sendbuf, sendcount, sendtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } diff --git a/src/mpi/coll/igatherv/igatherv_tsp_linear.c b/src/mpi/coll/igatherv/igatherv_tsp_linear.c index 640ecceb18d..7e3dfd0ca6b 100644 --- a/src/mpi/coll/igatherv/igatherv_tsp_linear.c +++ b/src/mpi/coll/igatherv/igatherv_tsp_linear.c @@ -21,7 +21,7 @@ int MPIR_TSP_Igatherv_sched_allcomm_linear(const void *sendbuf, MPI_Aint sendcou MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -60,7 +60,7 @@ int MPIR_TSP_Igatherv_sched_allcomm_linear(const void *sendbuf, MPI_Aint sendcou } else { mpi_errno = MPIR_TSP_sched_irecv(((char *) recvbuf + displs[i] * extent), recvcounts[i], recvtype, i, tag, comm_ptr, - sched, 0, NULL, &vtx_id); + collattr, sched, 0, NULL, &vtx_id); } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -81,12 +81,12 @@ int MPIR_TSP_Igatherv_sched_allcomm_linear(const void *sendbuf, MPI_Aint sendcou if (comm_size >= min_procs) mpi_errno = - MPIR_TSP_sched_issend(sendbuf, sendcount, sendtype, root, tag, comm_ptr, sched, - 0, NULL, &vtx_id); + MPIR_TSP_sched_issend(sendbuf, sendcount, sendtype, root, tag, comm_ptr, + collattr, sched, 0, NULL, &vtx_id); else mpi_errno = - MPIR_TSP_sched_isend(sendbuf, sendcount, sendtype, root, tag, comm_ptr, sched, - 0, NULL, &vtx_id); + MPIR_TSP_sched_isend(sendbuf, sendcount, sendtype, root, tag, comm_ptr, + collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_sched_linear.c b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_sched_linear.c index c4037e5b4e2..63cd305a535 100644 --- a/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_sched_linear.c +++ b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_allcomm_sched_linear.c @@ -22,6 +22,7 @@ int MPIR_Ineighbor_allgather_allcomm_sched_linear(const void *sendbuf, MPI_Aint int k, l; int *srcs, *dsts; MPI_Aint recvtype_extent; + int collattr = 0; MPIR_CHKLMEM_DECL(2); MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); @@ -36,13 +37,13 @@ int MPIR_Ineighbor_allgather_allcomm_sched_linear(const void *sendbuf, MPI_Aint MPIR_ERR_CHECK(mpi_errno); for (k = 0; k < outdegree; ++k) { - mpi_errno = MPIR_Sched_send(sendbuf, sendcount, sendtype, dsts[k], comm_ptr, s); + mpi_errno = MPIR_Sched_send(sendbuf, sendcount, sendtype, dsts[k], comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } for (l = 0; l < indegree; ++l) { char *rb = ((char *) recvbuf) + l * recvcount * recvtype_extent; - mpi_errno = MPIR_Sched_recv(rb, recvcount, recvtype, srcs[l], comm_ptr, s); + mpi_errno = MPIR_Sched_recv(rb, recvcount, recvtype, srcs[l], comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } diff --git a/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_tsp_linear.c b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_tsp_linear.c index 297f63a835b..8acb3b53ec1 100644 --- a/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_tsp_linear.c +++ b/src/mpi/coll/ineighbor_allgather/ineighbor_allgather_tsp_linear.c @@ -20,6 +20,7 @@ int MPIR_TSP_Ineighbor_allgather_sched_allcomm_linear(const void *sendbuf, MPI_A int *srcs, *dsts; int tag, vtx_id; MPI_Aint recvtype_extent; + int collattr = 0; MPIR_Errflag_t errflag ATTRIBUTE((unused)) = MPIR_ERR_NONE; MPIR_FUNC_ENTER; @@ -44,16 +45,16 @@ int MPIR_TSP_Ineighbor_allgather_sched_allcomm_linear(const void *sendbuf, MPI_A for (k = 0; k < outdegree; ++k) { mpi_errno = - MPIR_TSP_sched_isend(sendbuf, sendcount, sendtype, dsts[k], tag, comm_ptr, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_isend(sendbuf, sendcount, sendtype, dsts[k], tag, comm_ptr, + collattr | errflag, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } for (l = 0; l < indegree; ++l) { char *rb = ((char *) recvbuf) + l * recvcount * recvtype_extent; mpi_errno = - MPIR_TSP_sched_irecv(rb, recvcount, recvtype, srcs[l], tag, comm_ptr, sched, 0, NULL, - &vtx_id); + MPIR_TSP_sched_irecv(rb, recvcount, recvtype, srcs[l], tag, comm_ptr, collattr, sched, + 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_sched_linear.c b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_sched_linear.c index b4c51feb741..aaf33691225 100644 --- a/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_sched_linear.c +++ b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_allcomm_sched_linear.c @@ -23,6 +23,7 @@ int MPIR_Ineighbor_allgatherv_allcomm_sched_linear(const void *sendbuf, MPI_Aint int k, l; int *srcs, *dsts; MPI_Aint recvtype_extent; + int collattr = 0; MPIR_CHKLMEM_DECL(2); MPIR_Datatype_get_extent_macro(recvtype, recvtype_extent); @@ -37,13 +38,13 @@ int MPIR_Ineighbor_allgatherv_allcomm_sched_linear(const void *sendbuf, MPI_Aint MPIR_ERR_CHECK(mpi_errno); for (k = 0; k < outdegree; ++k) { - mpi_errno = MPIR_Sched_send(sendbuf, sendcount, sendtype, dsts[k], comm_ptr, s); + mpi_errno = MPIR_Sched_send(sendbuf, sendcount, sendtype, dsts[k], comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } for (l = 0; l < indegree; ++l) { char *rb = ((char *) recvbuf) + displs[l] * recvtype_extent; - mpi_errno = MPIR_Sched_recv(rb, recvcounts[l], recvtype, srcs[l], comm_ptr, s); + mpi_errno = MPIR_Sched_recv(rb, recvcounts[l], recvtype, srcs[l], comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } diff --git a/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_tsp_linear.c b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_tsp_linear.c index 759292b96f6..089eb11bfd2 100644 --- a/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_tsp_linear.c +++ b/src/mpi/coll/ineighbor_allgatherv/ineighbor_allgatherv_tsp_linear.c @@ -22,6 +22,7 @@ int MPIR_TSP_Ineighbor_allgatherv_sched_allcomm_linear(const void *sendbuf, MPI_ int *srcs, *dsts; int tag, vtx_id; MPI_Aint recvtype_extent; + int collattr = 0; MPIR_Errflag_t errflag ATTRIBUTE((unused)) = MPIR_ERR_NONE; MPIR_CHKLMEM_DECL(2); @@ -45,16 +46,16 @@ int MPIR_TSP_Ineighbor_allgatherv_sched_allcomm_linear(const void *sendbuf, MPI_ for (k = 0; k < outdegree; ++k) { mpi_errno = - MPIR_TSP_sched_isend(sendbuf, sendcount, sendtype, dsts[k], tag, comm_ptr, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_isend(sendbuf, sendcount, sendtype, dsts[k], tag, comm_ptr, collattr, + sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } for (l = 0; l < indegree; ++l) { char *rb = ((char *) recvbuf) + displs[l] * recvtype_extent; mpi_errno = - MPIR_TSP_sched_irecv(rb, recvcounts[l], recvtype, srcs[l], tag, comm_ptr, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_irecv(rb, recvcounts[l], recvtype, srcs[l], tag, comm_ptr, collattr, + sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_sched_linear.c b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_sched_linear.c index c593a5fe200..8a9ef406c93 100644 --- a/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_sched_linear.c +++ b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_allcomm_sched_linear.c @@ -22,6 +22,7 @@ int MPIR_Ineighbor_alltoall_allcomm_sched_linear(const void *sendbuf, MPI_Aint s int k, l; int *srcs, *dsts; MPI_Aint sendtype_extent, recvtype_extent; + int collattr = 0; MPIR_CHKLMEM_DECL(2); MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); @@ -38,7 +39,7 @@ int MPIR_Ineighbor_alltoall_allcomm_sched_linear(const void *sendbuf, MPI_Aint s for (k = 0; k < outdegree; ++k) { char *sb = ((char *) sendbuf) + k * sendcount * sendtype_extent; - mpi_errno = MPIR_Sched_send(sb, sendcount, sendtype, dsts[k], comm_ptr, s); + mpi_errno = MPIR_Sched_send(sb, sendcount, sendtype, dsts[k], comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } @@ -57,7 +58,7 @@ int MPIR_Ineighbor_alltoall_allcomm_sched_linear(const void *sendbuf, MPI_Aint s */ for (l = indegree - 1; l >= 0; l--) { char *rb = ((char *) recvbuf) + l * recvcount * recvtype_extent; - mpi_errno = MPIR_Sched_recv(rb, recvcount, recvtype, srcs[l], comm_ptr, s); + mpi_errno = MPIR_Sched_recv(rb, recvcount, recvtype, srcs[l], comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } diff --git a/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_tsp_linear.c b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_tsp_linear.c index d57a2e26e7a..6e4e5535b14 100644 --- a/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_tsp_linear.c +++ b/src/mpi/coll/ineighbor_alltoall/ineighbor_alltoall_tsp_linear.c @@ -20,6 +20,7 @@ int MPIR_TSP_Ineighbor_alltoall_sched_allcomm_linear(const void *sendbuf, MPI_Ai int *srcs, *dsts; MPI_Aint sendtype_extent, recvtype_extent; int tag, vtx_id; + int collattr = 0; MPIR_Errflag_t errflag ATTRIBUTE((unused)) = MPIR_ERR_NONE; MPIR_FUNC_ENTER; @@ -47,8 +48,8 @@ int MPIR_TSP_Ineighbor_alltoall_sched_allcomm_linear(const void *sendbuf, MPI_Ai for (k = 0; k < outdegree; ++k) { char *sb = ((char *) sendbuf) + k * sendcount * sendtype_extent; mpi_errno = - MPIR_TSP_sched_isend(sb, sendcount, sendtype, dsts[k], tag, comm_ptr, sched, 0, NULL, - &vtx_id); + MPIR_TSP_sched_isend(sb, sendcount, sendtype, dsts[k], tag, comm_ptr, collattr, sched, + 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -58,8 +59,8 @@ int MPIR_TSP_Ineighbor_alltoall_sched_allcomm_linear(const void *sendbuf, MPI_Ai for (l = indegree - 1; l >= 0; l--) { char *rb = ((char *) recvbuf) + l * recvcount * recvtype_extent; mpi_errno = - MPIR_TSP_sched_irecv(rb, recvcount, recvtype, srcs[l], tag, comm_ptr, sched, 0, NULL, - &vtx_id); + MPIR_TSP_sched_irecv(rb, recvcount, recvtype, srcs[l], tag, comm_ptr, collattr, sched, + 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_sched_linear.c b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_sched_linear.c index 95713065499..f7ae5b05570 100644 --- a/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_sched_linear.c +++ b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_allcomm_sched_linear.c @@ -23,6 +23,7 @@ int MPIR_Ineighbor_alltoallv_allcomm_sched_linear(const void *sendbuf, const MPI int k, l; int *srcs, *dsts; MPI_Aint sendtype_extent, recvtype_extent; + int collattr = 0; MPIR_CHKLMEM_DECL(2); MPIR_Datatype_get_extent_macro(sendtype, sendtype_extent); @@ -39,7 +40,7 @@ int MPIR_Ineighbor_alltoallv_allcomm_sched_linear(const void *sendbuf, const MPI for (k = 0; k < outdegree; ++k) { char *sb = ((char *) sendbuf) + sdispls[k] * sendtype_extent; - mpi_errno = MPIR_Sched_send(sb, sendcounts[k], sendtype, dsts[k], comm_ptr, s); + mpi_errno = MPIR_Sched_send(sb, sendcounts[k], sendtype, dsts[k], comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } @@ -48,7 +49,7 @@ int MPIR_Ineighbor_alltoallv_allcomm_sched_linear(const void *sendbuf, const MPI * ref. ineighbor_alltoall_allcomm_sched_linear.c */ for (l = indegree - 1; l >= 0; l--) { char *rb = ((char *) recvbuf) + rdispls[l] * recvtype_extent; - mpi_errno = MPIR_Sched_recv(rb, recvcounts[l], recvtype, srcs[l], comm_ptr, s); + mpi_errno = MPIR_Sched_recv(rb, recvcounts[l], recvtype, srcs[l], comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } diff --git a/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_tsp_linear.c b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_tsp_linear.c index 8387346d18c..1a57846c5cd 100644 --- a/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_tsp_linear.c +++ b/src/mpi/coll/ineighbor_alltoallv/ineighbor_alltoallv_tsp_linear.c @@ -23,6 +23,7 @@ int MPIR_TSP_Ineighbor_alltoallv_sched_allcomm_linear(const void *sendbuf, int k, l; int *srcs, *dsts; int tag, vtx_id; + int collattr = 0; MPIR_Errflag_t errflag ATTRIBUTE((unused)) = MPIR_ERR_NONE; MPI_Aint sendtype_extent, recvtype_extent; @@ -50,8 +51,8 @@ int MPIR_TSP_Ineighbor_alltoallv_sched_allcomm_linear(const void *sendbuf, for (k = 0; k < outdegree; ++k) { char *sb = ((char *) sendbuf) + sdispls[k] * sendtype_extent; mpi_errno = - MPIR_TSP_sched_isend(sb, sendcounts[k], sendtype, dsts[k], tag, comm_ptr, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_isend(sb, sendcounts[k], sendtype, dsts[k], tag, comm_ptr, collattr, + sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -61,8 +62,8 @@ int MPIR_TSP_Ineighbor_alltoallv_sched_allcomm_linear(const void *sendbuf, for (l = indegree - 1; l >= 0; l--) { char *rb = ((char *) recvbuf) + rdispls[l] * recvtype_extent; mpi_errno = - MPIR_TSP_sched_irecv(rb, recvcounts[l], recvtype, srcs[l], tag, comm_ptr, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_irecv(rb, recvcounts[l], recvtype, srcs[l], tag, comm_ptr, collattr, + sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_sched_linear.c b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_sched_linear.c index dd9f143bcf2..4dfc3c3d9e2 100644 --- a/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_sched_linear.c +++ b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_allcomm_sched_linear.c @@ -24,6 +24,7 @@ int MPIR_Ineighbor_alltoallw_allcomm_sched_linear(const void *sendbuf, const MPI int indegree, outdegree, weighted; int k, l; int *srcs, *dsts; + int collattr = 0; MPIR_CHKLMEM_DECL(2); mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted); @@ -39,7 +40,8 @@ int MPIR_Ineighbor_alltoallw_allcomm_sched_linear(const void *sendbuf, const MPI char *sb; sb = ((char *) sendbuf) + sdispls[k]; - mpi_errno = MPIR_Sched_send(sb, sendcounts[k], sendtypes[k], dsts[k], comm_ptr, s); + mpi_errno = + MPIR_Sched_send(sb, sendcounts[k], sendtypes[k], dsts[k], comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } @@ -50,7 +52,8 @@ int MPIR_Ineighbor_alltoallw_allcomm_sched_linear(const void *sendbuf, const MPI char *rb; rb = ((char *) recvbuf) + rdispls[l]; - mpi_errno = MPIR_Sched_recv(rb, recvcounts[l], recvtypes[l], srcs[l], comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(rb, recvcounts[l], recvtypes[l], srcs[l], comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } diff --git a/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_tsp_linear.c b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_tsp_linear.c index 5889444fc15..1c314e26835 100644 --- a/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_tsp_linear.c +++ b/src/mpi/coll/ineighbor_alltoallw/ineighbor_alltoallw_tsp_linear.c @@ -23,6 +23,7 @@ int MPIR_TSP_Ineighbor_alltoallw_sched_allcomm_linear(const void *sendbuf, int k, l; int *srcs, *dsts; int tag, vtx_id; + int collattr = 0; MPIR_Errflag_t errflag ATTRIBUTE((unused)) = MPIR_ERR_NONE; MPIR_FUNC_ENTER; @@ -48,8 +49,8 @@ int MPIR_TSP_Ineighbor_alltoallw_sched_allcomm_linear(const void *sendbuf, sb = ((char *) sendbuf) + sdispls[k]; mpi_errno = - MPIR_TSP_sched_isend(sb, sendcounts[k], sendtypes[k], dsts[k], tag, comm_ptr, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_isend(sb, sendcounts[k], sendtypes[k], dsts[k], tag, comm_ptr, collattr, + sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -61,8 +62,8 @@ int MPIR_TSP_Ineighbor_alltoallw_sched_allcomm_linear(const void *sendbuf, rb = ((char *) recvbuf) + rdispls[l]; mpi_errno = - MPIR_TSP_sched_irecv(rb, recvcounts[l], recvtypes[l], srcs[l], tag, comm_ptr, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_irecv(rb, recvcounts[l], recvtypes[l], srcs[l], tag, comm_ptr, collattr, + sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/ireduce/ireduce_inter_sched_local_reduce_remote_send.c b/src/mpi/coll/ireduce/ireduce_inter_sched_local_reduce_remote_send.c index 683e18f3e6d..4041cfe21ce 100644 --- a/src/mpi/coll/ireduce/ireduce_inter_sched_local_reduce_remote_send.c +++ b/src/mpi/coll/ireduce/ireduce_inter_sched_local_reduce_remote_send.c @@ -14,7 +14,7 @@ int MPIR_Ireduce_inter_sched_local_reduce_remote_send(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank; @@ -30,7 +30,7 @@ int MPIR_Ireduce_inter_sched_local_reduce_remote_send(const void *sendbuf, void if (root == MPI_ROOT) { /* root receives data from rank 0 on remote group */ - mpi_errno = MPIR_Sched_recv(recvbuf, count, datatype, 0, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvbuf, count, datatype, 0, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); @@ -57,13 +57,13 @@ int MPIR_Ireduce_inter_sched_local_reduce_remote_send(const void *sendbuf, void mpi_errno = MPIR_Ireduce_intra_sched_auto(sendbuf, tmp_buf, count, datatype, op, 0, - comm_ptr->local_comm, s); + comm_ptr->local_comm, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); if (rank == 0) { - mpi_errno = MPIR_Sched_send(tmp_buf, count, datatype, root, comm_ptr, s); + mpi_errno = MPIR_Sched_send(tmp_buf, count, datatype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); diff --git a/src/mpi/coll/ireduce/ireduce_intra_sched_binomial.c b/src/mpi/coll/ireduce/ireduce_intra_sched_binomial.c index 5ed414d2c09..3778a76b59a 100644 --- a/src/mpi/coll/ireduce/ireduce_intra_sched_binomial.c +++ b/src/mpi/coll/ireduce/ireduce_intra_sched_binomial.c @@ -7,7 +7,7 @@ int MPIR_Ireduce_intra_sched_binomial(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size, rank, is_commutative; @@ -93,7 +93,8 @@ int MPIR_Ireduce_intra_sched_binomial(const void *sendbuf, void *recvbuf, MPI_Ai source = (relrank | mask); if (source < comm_size) { source = (source + lroot) % comm_size; - mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, source, comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(tmp_buf, count, datatype, source, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); @@ -119,7 +120,7 @@ int MPIR_Ireduce_intra_sched_binomial(const void *sendbuf, void *recvbuf, MPI_Ai /* I've received all that I'm going to. Send my result to * my parent */ source = ((relrank & (~mask)) + lroot) % comm_size; - mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, source, comm_ptr, s); + mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, source, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); @@ -131,12 +132,12 @@ int MPIR_Ireduce_intra_sched_binomial(const void *sendbuf, void *recvbuf, MPI_Ai if (!is_commutative && (root != 0)) { if (rank == 0) { - mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, root, comm_ptr, s); + mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); } else if (rank == root) { - mpi_errno = MPIR_Sched_recv(recvbuf, count, datatype, 0, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvbuf, count, datatype, 0, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_barrier(s); MPIR_ERR_CHECK(mpi_errno); diff --git a/src/mpi/coll/ireduce/ireduce_intra_sched_reduce_scatter_gather.c b/src/mpi/coll/ireduce/ireduce_intra_sched_reduce_scatter_gather.c index 2f35e5d6f93..c375b0632f0 100644 --- a/src/mpi/coll/ireduce/ireduce_intra_sched_reduce_scatter_gather.c +++ b/src/mpi/coll/ireduce/ireduce_intra_sched_reduce_scatter_gather.c @@ -34,7 +34,8 @@ */ int MPIR_Ireduce_intra_sched_reduce_scatter_gather(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + int root, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int i, j, comm_size, rank, pof2, is_commutative ATTRIBUTE((unused)); @@ -104,7 +105,7 @@ int MPIR_Ireduce_intra_sched_reduce_scatter_gather(const void *sendbuf, void *re if (rank < 2 * rem) { if (rank % 2 != 0) { /* odd */ - mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, rank - 1, comm_ptr, s); + mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, rank - 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -113,7 +114,7 @@ int MPIR_Ireduce_intra_sched_reduce_scatter_gather(const void *sendbuf, void *re * doubling */ newrank = -1; } else { /* even */ - mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, rank + 1, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, rank + 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -182,11 +183,11 @@ int MPIR_Ireduce_intra_sched_reduce_scatter_gather(const void *sendbuf, void *re /* Send data from recvbuf. Recv into tmp_buf */ mpi_errno = MPIR_Sched_send(((char *) recvbuf + disps[send_idx] * extent), - send_cnt, datatype, dst, comm_ptr, s); + send_cnt, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier here */ mpi_errno = MPIR_Sched_recv(((char *) tmp_buf + disps[recv_idx] * extent), - recv_cnt, datatype, dst, comm_ptr, s); + recv_cnt, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -231,7 +232,7 @@ int MPIR_Ireduce_intra_sched_reduce_scatter_gather(const void *sendbuf, void *re for (i = 1; i < pof2; i++) disps[i] = disps[i - 1] + cnts[i - 1]; - mpi_errno = MPIR_Sched_recv(recvbuf, cnts[0], datatype, 0, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvbuf, cnts[0], datatype, 0, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -239,7 +240,8 @@ int MPIR_Ireduce_intra_sched_reduce_scatter_gather(const void *sendbuf, void *re send_idx = 0; last_idx = 2; } else if (newrank == 0) { /* send */ - mpi_errno = MPIR_Sched_send(recvbuf, cnts[0], datatype, root, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(recvbuf, cnts[0], datatype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); newrank = -1; @@ -304,14 +306,14 @@ int MPIR_Ireduce_intra_sched_reduce_scatter_gather(const void *sendbuf, void *re /* send and exit */ /* Send data from recvbuf. Recv into tmp_buf */ mpi_errno = MPIR_Sched_send(((char *) recvbuf + disps[send_idx] * extent), - send_cnt, datatype, dst, comm_ptr, s); + send_cnt, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); break; } else { /* recv and continue */ mpi_errno = MPIR_Sched_recv(((char *) recvbuf + disps[recv_idx] * extent), - recv_cnt, datatype, dst, comm_ptr, s); + recv_cnt, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/ireduce/ireduce_intra_sched_smp.c b/src/mpi/coll/ireduce/ireduce_intra_sched_smp.c index a1a8a63c72f..63871aa3813 100644 --- a/src/mpi/coll/ireduce/ireduce_intra_sched_smp.c +++ b/src/mpi/coll/ireduce/ireduce_intra_sched_smp.c @@ -7,7 +7,7 @@ int MPIR_Ireduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int is_commutative; @@ -26,7 +26,8 @@ int MPIR_Ireduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint co is_commutative = MPIR_Op_is_commutative(op); if (!is_commutative) { mpi_errno = - MPIR_Ireduce_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, s); + MPIR_Ireduce_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -44,7 +45,9 @@ int MPIR_Ireduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint co /* do the intranode reduce on all nodes other than the root's node */ if (nc != NULL && MPIR_Get_intranode_rank(comm_ptr, root) == -1) { - mpi_errno = MPIR_Ireduce_intra_sched_auto(sendbuf, tmp_buf, count, datatype, op, 0, nc, s); + mpi_errno = + MPIR_Ireduce_intra_sched_auto(sendbuf, tmp_buf, count, datatype, op, 0, nc, collattr, + s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -57,7 +60,7 @@ int MPIR_Ireduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint co const void *buf = (nc == NULL ? sendbuf : tmp_buf); mpi_errno = MPIR_Ireduce_intra_sched_auto(buf, NULL, count, datatype, op, MPIR_Get_internode_rank(comm_ptr, root), - nrc, s); + nrc, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } else { /* I am on root's node. I have not participated in the earlier reduce. */ @@ -68,7 +71,7 @@ int MPIR_Ireduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint co mpi_errno = MPIR_Ireduce_intra_sched_auto(sendbuf, tmp_buf, count, datatype, op, MPIR_Get_internode_rank(comm_ptr, root), nrc, - s); + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -80,7 +83,7 @@ int MPIR_Ireduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint co mpi_errno = MPIR_Ireduce_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, MPIR_Get_internode_rank(comm_ptr, root), nrc, - s); + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -94,7 +97,7 @@ int MPIR_Ireduce_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint co if (nc != NULL && MPIR_Get_intranode_rank(comm_ptr, root) != -1) { mpi_errno = MPIR_Ireduce_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, MPIR_Get_intranode_rank(comm_ptr, root), nc, - s); + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/ireduce/ireduce_tsp_auto.c b/src/mpi/coll/ireduce/ireduce_tsp_auto.c index 1666e2dd029..8b85504c41f 100644 --- a/src/mpi/coll/ireduce/ireduce_tsp_auto.c +++ b/src/mpi/coll/ireduce/ireduce_tsp_auto.c @@ -12,7 +12,7 @@ static int MPIR_Ireduce_sched_intra_tsp_flat_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int tree_type = MPIR_TREE_TYPE_KNOMIAL_1; @@ -27,7 +27,7 @@ static int MPIR_Ireduce_sched_intra_tsp_flat_auto(const void *sendbuf, void *rec mpi_errno = MPIR_TSP_Ireduce_sched_intra_tree(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, tree_type, radix, block_size, - buffer_per_child, sched); + buffer_per_child, collattr, sched); if (mpi_errno) MPIR_ERR_POP(mpi_errno); @@ -40,7 +40,8 @@ static int MPIR_Ireduce_sched_intra_tsp_flat_auto(const void *sendbuf, void *rec /* sched version of CVAR and json based collective selection. Meant only for gentran scheduler */ int MPIR_TSP_Ireduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm_ptr, MPIR_TSP_sched_t sched) + MPIR_Comm * comm_ptr, int collattr, + MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; @@ -64,13 +65,15 @@ int MPIR_TSP_Ireduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MP /*Only knomial_1 tree supports non-commutative operations */ MPII_COLLECTIVE_FALLBACK_CHECK(comm_ptr->rank, MPIR_Op_is_commutative(op) || MPIR_Ireduce_tree_type == MPIR_TREE_TYPE_KNOMIAL_1, - mpi_errno, "Ireduce gentran_tree cannot be applied.\n"); + mpi_errno, + "Ireduce gentran_tree cannot be collattr, applied.\n"); mpi_errno = MPIR_TSP_Ireduce_sched_intra_tree(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, MPIR_Ireduce_tree_type, MPIR_CVAR_IREDUCE_TREE_KVAL, MPIR_CVAR_IREDUCE_TREE_PIPELINE_CHUNK_SIZE, - MPIR_CVAR_IREDUCE_TREE_BUFFER_PER_CHILD, sched); + MPIR_CVAR_IREDUCE_TREE_BUFFER_PER_CHILD, collattr, + sched); break; case MPIR_CVAR_IREDUCE_INTRA_ALGORITHM_tsp_ring: @@ -78,7 +81,8 @@ int MPIR_TSP_Ireduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MP MPIR_TSP_Ireduce_sched_intra_tree(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, MPIR_TREE_TYPE_KARY, 1, MPIR_CVAR_IREDUCE_RING_CHUNK_SIZE, - MPIR_CVAR_IREDUCE_TREE_BUFFER_PER_CHILD, sched); + MPIR_CVAR_IREDUCE_TREE_BUFFER_PER_CHILD, collattr, + sched); break; default: @@ -94,7 +98,8 @@ int MPIR_TSP_Ireduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MP cnt->u.ireduce.intra_tsp_tree.k, cnt->u.ireduce.intra_tsp_tree.chunk_size, cnt->u.ireduce. - intra_tsp_tree.buffer_per_child, sched); + intra_tsp_tree.buffer_per_child, collattr, + sched); break; case MPII_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Ireduce_intra_tsp_ring: @@ -103,14 +108,16 @@ int MPIR_TSP_Ireduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MP root, comm_ptr, MPIR_TREE_TYPE_KARY, 1, cnt->u.ireduce.intra_tsp_ring.chunk_size, cnt->u.ireduce. - intra_tsp_ring.buffer_per_child, sched); + intra_tsp_ring.buffer_per_child, collattr, + sched); break; default: /* Replace this call with MPIR_Assert(0) when json files have gentran algos */ mpi_errno = MPIR_Ireduce_sched_intra_tsp_flat_auto(sendbuf, recvbuf, count, - datatype, op, root, comm_ptr, sched); + datatype, op, root, comm_ptr, + collattr, sched); break; } } @@ -122,7 +129,7 @@ int MPIR_TSP_Ireduce_sched_intra_tsp_auto(const void *sendbuf, void *recvbuf, MP MPIR_TSP_Ireduce_sched_intra_tree(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, MPIR_TREE_TYPE_KARY, 1, MPIR_CVAR_IREDUCE_RING_CHUNK_SIZE, - MPIR_CVAR_IREDUCE_TREE_BUFFER_PER_CHILD, sched); + MPIR_CVAR_IREDUCE_TREE_BUFFER_PER_CHILD, collattr, sched); fn_exit: diff --git a/src/mpi/coll/ireduce/ireduce_tsp_tree.c b/src/mpi/coll/ireduce/ireduce_tsp_tree.c index ada501c5839..7de0bbd1638 100644 --- a/src/mpi/coll/ireduce/ireduce_tsp_tree.c +++ b/src/mpi/coll/ireduce/ireduce_tsp_tree.c @@ -11,7 +11,7 @@ int MPIR_TSP_Ireduce_sched_intra_tree(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm, int tree_type, int k, int chunk_size, - int buffer_per_child, MPIR_TSP_sched_t sched) + int buffer_per_child, int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -177,7 +177,7 @@ int MPIR_TSP_Ireduce_sched_intra_tree(const void *sendbuf, void *recvbuf, MPI_Ai } mpi_errno = MPIR_TSP_sched_irecv(recv_address, msgsize, datatype, child, tag, comm, - sched, nvtcs, vtcs, &recv_id[i]); + collattr, sched, nvtcs, vtcs, &recv_id[i]); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* Setup dependencies for reduction. Reduction depends on the corresponding recv to complete */ @@ -223,7 +223,7 @@ int MPIR_TSP_Ireduce_sched_intra_tree(const void *sendbuf, void *recvbuf, MPI_Ai if (!is_tree_root) { mpi_errno = MPIR_TSP_sched_isend(reduce_address, msgsize, datatype, my_tree.parent, tag, comm, - sched, nvtcs, vtcs, &vtx_id); + collattr, sched, nvtcs, vtcs, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -231,12 +231,12 @@ int MPIR_TSP_Ireduce_sched_intra_tree(const void *sendbuf, void *recvbuf, MPI_Ai if (tree_root != root) { if (is_tree_root) { /* tree_root sends data to root */ mpi_errno = - MPIR_TSP_sched_isend(reduce_address, msgsize, datatype, root, tag, comm, sched, - nvtcs, vtcs, &vtx_id); + MPIR_TSP_sched_isend(reduce_address, msgsize, datatype, root, tag, comm, + collattr, sched, nvtcs, vtcs, &vtx_id); } else if (is_root) { /* root receives data from tree_root */ mpi_errno = MPIR_TSP_sched_irecv((char *) recvbuf + offset * extent, msgsize, datatype, - tree_root, tag, comm, sched, 0, NULL, &vtx_id); + tree_root, tag, comm, collattr, sched, 0, NULL, &vtx_id); } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_sched_remote_reduce_local_scatterv.c b/src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_sched_remote_reduce_local_scatterv.c index f015ae31d5c..ec9af46c187 100644 --- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_sched_remote_reduce_local_scatterv.c +++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_inter_sched_remote_reduce_local_scatterv.c @@ -17,7 +17,7 @@ int MPIR_Ireduce_scatter_inter_sched_remote_reduce_local_scatterv(const void *se const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, root, local_size, total_count, i; @@ -62,7 +62,7 @@ int MPIR_Ireduce_scatter_inter_sched_remote_reduce_local_scatterv(const void *se /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Ireduce_inter_sched_auto(sendbuf, tmp_buf, total_count, - datatype, op, root, comm_ptr, s); + datatype, op, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sched barrier intentionally omitted here to allow both reductions to @@ -71,13 +71,13 @@ int MPIR_Ireduce_scatter_inter_sched_remote_reduce_local_scatterv(const void *se /* reduce to rank 0 of right group */ root = 0; mpi_errno = MPIR_Ireduce_inter_sched_auto(sendbuf, tmp_buf, total_count, - datatype, op, root, comm_ptr, s); + datatype, op, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* reduce to rank 0 of right group */ root = 0; mpi_errno = MPIR_Ireduce_inter_sched_auto(sendbuf, tmp_buf, total_count, - datatype, op, root, comm_ptr, s); + datatype, op, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sched barrier intentionally omitted here to allow both reductions to @@ -86,7 +86,7 @@ int MPIR_Ireduce_scatter_inter_sched_remote_reduce_local_scatterv(const void *se /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Ireduce_inter_sched_auto(sendbuf, tmp_buf, total_count, - datatype, op, root, comm_ptr, s); + datatype, op, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } MPIR_SCHED_BARRIER(s); @@ -101,7 +101,7 @@ int MPIR_Ireduce_scatter_inter_sched_remote_reduce_local_scatterv(const void *se mpi_errno = MPIR_Iscatterv_intra_sched_auto(tmp_buf, recvcounts, disps, datatype, recvbuf, recvcounts[rank], datatype, 0, newcomm_ptr, - s); + collattr, s); MPIR_ERR_CHECK(mpi_errno); fn_exit: diff --git a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_noncommutative.c b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_noncommutative.c index 863467231c9..c4ed608e0b3 100644 --- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_noncommutative.c +++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_noncommutative.c @@ -23,7 +23,8 @@ int MPIR_Ireduce_scatter_intra_sched_noncommutative(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size = comm_ptr->local_size; @@ -98,10 +99,10 @@ int MPIR_Ireduce_scatter_intra_sched_noncommutative(const void *sendbuf, void *r } mpi_errno = MPIR_Sched_send((outgoing_data + send_offset * true_extent), - size, datatype, peer, comm_ptr, s); + size, datatype, peer, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_recv((incoming_data + recv_offset * true_extent), - size, datatype, peer, comm_ptr, s); + size, datatype, peer, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_pairwise.c b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_pairwise.c index a202fa227a1..6f1e781d7dc 100644 --- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_pairwise.c +++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_pairwise.c @@ -14,7 +14,8 @@ */ int MPIR_Ireduce_scatter_intra_sched_pairwise(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size, i; @@ -72,14 +73,15 @@ int MPIR_Ireduce_scatter_intra_sched_pairwise(const void *sendbuf, void *recvbuf * needs from src into tmp_recvbuf */ if (sendbuf != MPI_IN_PLACE) { mpi_errno = MPIR_Sched_send(((char *) sendbuf + disps[dst] * extent), - recvcounts[dst], datatype, dst, comm_ptr, s); + recvcounts[dst], datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { mpi_errno = MPIR_Sched_send(((char *) recvbuf + disps[dst] * extent), - recvcounts[dst], datatype, dst, comm_ptr, s); + recvcounts[dst], datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } - mpi_errno = MPIR_Sched_recv(tmp_recvbuf, recvcounts[rank], datatype, src, comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(tmp_recvbuf, recvcounts[rank], datatype, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_recursive_doubling.c b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_recursive_doubling.c index 6b05fd0195a..8aff3c96639 100644 --- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_recursive_doubling.c +++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_recursive_doubling.c @@ -19,7 +19,8 @@ int MPIR_Ireduce_scatter_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size, i; @@ -140,9 +141,9 @@ int MPIR_Ireduce_scatter_intra_sched_recursive_doubling(const void *sendbuf, voi * received in tmp_recvbuf and then accumulated into * tmp_results. accumulation is done later below. */ - mpi_errno = MPIR_Sched_send(tmp_results, 1, sendtype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(tmp_results, 1, sendtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIR_Sched_recv(tmp_recvbuf, 1, recvtype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(tmp_recvbuf, 1, recvtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); received = 1; @@ -183,7 +184,8 @@ int MPIR_Ireduce_scatter_intra_sched_recursive_doubling(const void *sendbuf, voi if ((dst > rank) && (rank < tree_root + nprocs_completed) && (dst >= tree_root + nprocs_completed)) { /* send the current result */ - mpi_errno = MPIR_Sched_send(tmp_recvbuf, 1, recvtype, dst, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(tmp_recvbuf, 1, recvtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -192,7 +194,8 @@ int MPIR_Ireduce_scatter_intra_sched_recursive_doubling(const void *sendbuf, voi else if ((dst < rank) && (dst < tree_root + nprocs_completed) && (rank >= tree_root + nprocs_completed)) { - mpi_errno = MPIR_Sched_recv(tmp_recvbuf, 1, recvtype, dst, comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(tmp_recvbuf, 1, recvtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); received = 1; diff --git a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_recursive_halving.c b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_recursive_halving.c index 69814169823..c0f1118f154 100644 --- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_recursive_halving.c +++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_intra_sched_recursive_halving.c @@ -36,7 +36,8 @@ int MPIR_Ireduce_scatter_intra_sched_recursive_halving(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size, i; @@ -107,7 +108,9 @@ int MPIR_Ireduce_scatter_intra_sched_recursive_halving(const void *sendbuf, void if (rank < 2 * rem) { if (rank % 2 == 0) { /* even */ - mpi_errno = MPIR_Sched_send(tmp_results, total_count, datatype, rank + 1, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(tmp_results, total_count, datatype, rank + 1, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -116,7 +119,9 @@ int MPIR_Ireduce_scatter_intra_sched_recursive_halving(const void *sendbuf, void * doubling */ newrank = -1; } else { /* odd */ - mpi_errno = MPIR_Sched_recv(tmp_recvbuf, total_count, datatype, rank - 1, comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(tmp_recvbuf, total_count, datatype, rank - 1, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -190,10 +195,10 @@ int MPIR_Ireduce_scatter_intra_sched_recursive_halving(const void *sendbuf, void int recv_dst = (recv_cnt ? dst : MPI_PROC_NULL); mpi_errno = MPIR_Sched_send(((char *) tmp_results + newdisps[send_idx] * extent), - send_cnt, datatype, send_dst, comm_ptr, s); + send_cnt, datatype, send_dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_recv(((char *) tmp_recvbuf + newdisps[recv_idx] * extent), - recv_cnt, datatype, recv_dst, comm_ptr, s); + recv_cnt, datatype, recv_dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -231,14 +236,16 @@ int MPIR_Ireduce_scatter_intra_sched_recursive_halving(const void *sendbuf, void if (rank % 2) { /* odd */ if (recvcounts[rank - 1]) { mpi_errno = MPIR_Sched_send(((char *) tmp_results + disps[rank - 1] * extent), - recvcounts[rank - 1], datatype, rank - 1, comm_ptr, s); + recvcounts[rank - 1], datatype, rank - 1, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } } else { /* even */ if (recvcounts[rank]) { mpi_errno = - MPIR_Sched_recv(recvbuf, recvcounts[rank], datatype, rank + 1, comm_ptr, s); + MPIR_Sched_recv(recvbuf, recvcounts[rank], datatype, rank + 1, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/ireduce_scatter/ireduce_scatter_tsp_recexch.c b/src/mpi/coll/ireduce_scatter/ireduce_scatter_tsp_recexch.c index 19959e3b2c6..8ee085dec7d 100644 --- a/src/mpi/coll/ireduce_scatter/ireduce_scatter_tsp_recexch.c +++ b/src/mpi/coll/ireduce_scatter/ireduce_scatter_tsp_recexch.c @@ -45,7 +45,7 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch_step2(void *tmp_results, void * int step2_nphases, int **step2_nbrs, int rank, int nranks, int sink_id, int is_out_vtcs, int *reduce_id_, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -87,7 +87,8 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch_step2(void *tmp_results, void * send_offset, send_cnt)); mpi_errno = MPIR_TSP_sched_isend((char *) tmp_results + send_offset, send_cnt, - datatype, dst, tag, comm, sched, nvtcs, vtcs, &send_id); + datatype, dst, tag, comm, collattr, sched, nvtcs, vtcs, + &send_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); rank_for_offset = @@ -104,7 +105,8 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch_step2(void *tmp_results, void * recv_offset, recv_cnt)); mpi_errno = MPIR_TSP_sched_irecv((char *) tmp_recvbuf + recv_offset, recv_cnt, - datatype, dst, tag, comm, sched, nvtcs, vtcs, &recv_id); + datatype, dst, tag, comm, collattr, sched, nvtcs, vtcs, + &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -132,7 +134,7 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch_step2(void *tmp_results, void * int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recvbuf, const MPI_Aint * recvcounts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, int is_dist_halving, - int k, MPIR_TSP_sched_t sched) + int k, int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -216,8 +218,8 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recv else buf_to_send = (void *) sendbuf; mpi_errno = - MPIR_TSP_sched_isend(buf_to_send, total_count, datatype, step1_sendto, tag, comm, sched, - 0, NULL, &vtx_id); + MPIR_TSP_sched_isend(buf_to_send, total_count, datatype, step1_sendto, tag, comm, + collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* Step 2 participating rank */ @@ -226,8 +228,8 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recv nvtcs = 1; vtcs[0] = (i == 0) ? dtcopy_id : reduce_id; mpi_errno = MPIR_TSP_sched_irecv(tmp_recvbuf, total_count, datatype, - step1_recvfrom[i], tag, comm, sched, nvtcs, vtcs, - &recv_id); + step1_recvfrom[i], tag, comm, collattr, sched, nvtcs, + vtcs, &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); nvtcs++; vtcs[1] = recv_id; @@ -248,7 +250,7 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recv recvcounts, displs, datatype, op, extent, tag, comm, k, is_dist_halving, step2_nphases, step2_nbrs, rank, nranks, - sink_id, 1, &reduce_id, sched); + sink_id, 1, &reduce_id, collattr, sched); /* copy data from tmp_results buffer correct position into recvbuf for all participating ranks */ nvtcs = 1; vtcs[0] = reduce_id; /* This assignment will also be used in step3 sends */ @@ -265,7 +267,7 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recv if (step1_sendto != -1) { /* I am a Step 2 non-participating rank */ mpi_errno = MPIR_TSP_sched_irecv(recvbuf, recvcounts[rank], datatype, step1_sendto, tag, comm, - sched, 1, &sink_id, &vtx_id); + collattr, sched, 1, &sink_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } for (i = 0; i < step1_nrecvs; i++) { @@ -273,7 +275,7 @@ int MPIR_TSP_Ireduce_scatter_sched_intra_recexch(const void *sendbuf, void *recv /* vtcs will be assigned to last reduce_id in step2 function */ mpi_errno = MPIR_TSP_sched_isend((char *) tmp_results + displs[step1_recvfrom[i]] * extent, recvcounts[step1_recvfrom[i]], datatype, step1_recvfrom[i], - tag, comm, sched, nvtcs, vtcs, &vtx_id); + tag, comm, collattr, sched, nvtcs, vtcs, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv.c b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv.c index 793db9a8bd8..158eaff6556 100644 --- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv.c +++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv.c @@ -18,6 +18,7 @@ int MPIR_Ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv(const vo MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; @@ -51,7 +52,7 @@ int MPIR_Ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv(const vo /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Ireduce_inter_sched_auto(sendbuf, tmp_buf, total_count, - datatype, op, root, comm_ptr, s); + datatype, op, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sched barrier intentionally omitted here to allow both reductions to @@ -60,13 +61,13 @@ int MPIR_Ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv(const vo /* reduce to rank 0 of right group */ root = 0; mpi_errno = MPIR_Ireduce_inter_sched_auto(sendbuf, tmp_buf, total_count, - datatype, op, root, comm_ptr, s); + datatype, op, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* reduce to rank 0 of right group */ root = 0; mpi_errno = MPIR_Ireduce_inter_sched_auto(sendbuf, tmp_buf, total_count, - datatype, op, root, comm_ptr, s); + datatype, op, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sched barrier intentionally omitted here to allow both reductions to @@ -75,7 +76,7 @@ int MPIR_Ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv(const vo /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Ireduce_inter_sched_auto(sendbuf, tmp_buf, total_count, - datatype, op, root, comm_ptr, s); + datatype, op, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } MPIR_SCHED_BARRIER(s); @@ -89,7 +90,8 @@ int MPIR_Ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv(const vo newcomm_ptr = comm_ptr->local_comm; mpi_errno = MPIR_Iscatter_intra_sched_auto(tmp_buf, recvcount, datatype, - recvbuf, recvcount, datatype, 0, newcomm_ptr, s); + recvbuf, recvcount, datatype, 0, newcomm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); fn_exit: diff --git a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_noncommutative.c b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_noncommutative.c index 910c04314fe..530abad4b9f 100644 --- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_noncommutative.c +++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_noncommutative.c @@ -12,7 +12,7 @@ int MPIR_Ireduce_scatter_block_intra_sched_noncommutative(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size = comm_ptr->local_size; @@ -84,10 +84,10 @@ int MPIR_Ireduce_scatter_block_intra_sched_noncommutative(const void *sendbuf, v } mpi_errno = MPIR_Sched_send((outgoing_data + send_offset * true_extent), - size, datatype, peer, comm_ptr, s); + size, datatype, peer, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_recv((incoming_data + recv_offset * true_extent), - size, datatype, peer, comm_ptr, s); + size, datatype, peer, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_pairwise.c b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_pairwise.c index beca65021cf..9e2e65544a3 100644 --- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_pairwise.c +++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_pairwise.c @@ -9,7 +9,8 @@ * commutative op and is intended for use with large messages. */ int MPIR_Ireduce_scatter_block_intra_sched_pairwise(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size, i; @@ -62,14 +63,14 @@ int MPIR_Ireduce_scatter_block_intra_sched_pairwise(const void *sendbuf, void *r * needs from src into tmp_recvbuf */ if (sendbuf != MPI_IN_PLACE) { mpi_errno = MPIR_Sched_send(((char *) sendbuf + disps[dst] * extent), - recvcount, datatype, dst, comm_ptr, s); + recvcount, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { mpi_errno = MPIR_Sched_send(((char *) recvbuf + disps[dst] * extent), - recvcount, datatype, dst, comm_ptr, s); + recvcount, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } - mpi_errno = MPIR_Sched_recv(tmp_recvbuf, recvcount, datatype, src, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(tmp_recvbuf, recvcount, datatype, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_recursive_doubling.c b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_recursive_doubling.c index 071682730f4..fd956752f36 100644 --- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_recursive_doubling.c +++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_recursive_doubling.c @@ -10,7 +10,8 @@ int MPIR_Ireduce_scatter_block_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size, i; @@ -123,9 +124,9 @@ int MPIR_Ireduce_scatter_block_intra_sched_recursive_doubling(const void *sendbu /* tmp_results contains data to be sent in each step. Data is * received in tmp_recvbuf and then accumulated into * tmp_results. accumulation is done later below. */ - mpi_errno = MPIR_Sched_send(tmp_results, 1, sendtype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(tmp_results, 1, sendtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); - mpi_errno = MPIR_Sched_recv(tmp_recvbuf, 1, recvtype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(tmp_recvbuf, 1, recvtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); received = 1; @@ -166,7 +167,8 @@ int MPIR_Ireduce_scatter_block_intra_sched_recursive_doubling(const void *sendbu if ((dst > rank) && (rank < tree_root + nprocs_completed) && (dst >= tree_root + nprocs_completed)) { /* send the current result */ - mpi_errno = MPIR_Sched_send(tmp_recvbuf, 1, recvtype, dst, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(tmp_recvbuf, 1, recvtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -175,7 +177,8 @@ int MPIR_Ireduce_scatter_block_intra_sched_recursive_doubling(const void *sendbu else if ((dst < rank) && (dst < tree_root + nprocs_completed) && (rank >= tree_root + nprocs_completed)) { - mpi_errno = MPIR_Sched_recv(tmp_recvbuf, 1, recvtype, dst, comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(tmp_recvbuf, 1, recvtype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); received = 1; diff --git a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_recursive_halving.c b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_recursive_halving.c index 2a092a14721..79b1cf320a7 100644 --- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_recursive_halving.c +++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_intra_sched_recursive_halving.c @@ -10,7 +10,8 @@ int MPIR_Ireduce_scatter_block_intra_sched_recursive_halving(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size, i; @@ -76,7 +77,9 @@ int MPIR_Ireduce_scatter_block_intra_sched_recursive_halving(const void *sendbuf if (rank < 2 * rem) { if (rank % 2 == 0) { /* even */ - mpi_errno = MPIR_Sched_send(tmp_results, total_count, datatype, rank + 1, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(tmp_results, total_count, datatype, rank + 1, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -85,7 +88,9 @@ int MPIR_Ireduce_scatter_block_intra_sched_recursive_halving(const void *sendbuf * doubling */ newrank = -1; } else { /* odd */ - mpi_errno = MPIR_Sched_recv(tmp_recvbuf, total_count, datatype, rank - 1, comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(tmp_recvbuf, total_count, datatype, rank - 1, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); @@ -158,10 +163,10 @@ int MPIR_Ireduce_scatter_block_intra_sched_recursive_halving(const void *sendbuf int recv_dst = (recv_cnt ? dst : MPI_PROC_NULL); mpi_errno = MPIR_Sched_send(((char *) tmp_results + newdisps[send_idx] * extent), - send_cnt, datatype, send_dst, comm_ptr, s); + send_cnt, datatype, send_dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_recv(((char *) tmp_recvbuf + newdisps[recv_idx] * extent), - recv_cnt, datatype, recv_dst, comm_ptr, s); + recv_cnt, datatype, recv_dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -196,11 +201,12 @@ int MPIR_Ireduce_scatter_block_intra_sched_recursive_halving(const void *sendbuf if (rank < 2 * rem) { if (rank % 2) { /* odd */ mpi_errno = MPIR_Sched_send(((char *) tmp_results + disps[rank - 1] * extent), - recvcount, datatype, rank - 1, comm_ptr, s); + recvcount, datatype, rank - 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } else { /* even */ - mpi_errno = MPIR_Sched_recv(recvbuf, recvcount, datatype, rank + 1, comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(recvbuf, recvcount, datatype, rank + 1, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_tsp_recexch.c b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_tsp_recexch.c index 14f80baf020..57f51884bab 100644 --- a/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_tsp_recexch.c +++ b/src/mpi/coll/ireduce_scatter_block/ireduce_scatter_block_tsp_recexch.c @@ -11,7 +11,7 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, int k, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -76,8 +76,8 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void else buf_to_send = (void *) sendbuf; mpi_errno = - MPIR_TSP_sched_isend(buf_to_send, total_count, datatype, step1_sendto, tag, comm, sched, - 0, NULL, &vtx_id); + MPIR_TSP_sched_isend(buf_to_send, total_count, datatype, step1_sendto, tag, comm, + collattr, sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* Step 2 participating rank */ for (i = 0; i < step1_nrecvs; i++) { /* participating rank gets data from non-partcipating ranks */ @@ -85,8 +85,8 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void nvtcs = 1; vtcs[0] = (i == 0) ? dtcopy_id : reduce_id; mpi_errno = MPIR_TSP_sched_irecv(tmp_recvbuf, total_count, datatype, - step1_recvfrom[i], tag, comm, sched, nvtcs, vtcs, - &recv_id); + step1_recvfrom[i], tag, comm, collattr, sched, nvtcs, + vtcs, &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); nvtcs++; vtcs[1] = recv_id; @@ -119,7 +119,8 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void mpi_errno = MPIR_TSP_sched_isend((char *) tmp_results + send_offset, send_cnt * recvcount, - datatype, dst, tag, comm, sched, nvtcs, vtcs, &send_id); + datatype, dst, tag, comm, collattr, sched, nvtcs, vtcs, + &send_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPII_Recexchalgo_get_count_and_offset(rank, phase, k, nranks, &recv_cnt, &offset); @@ -127,7 +128,8 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void mpi_errno = MPIR_TSP_sched_irecv(tmp_recvbuf, recv_cnt * recvcount, - datatype, dst, tag, comm, sched, nvtcs, vtcs, &recv_id); + datatype, dst, tag, comm, collattr, sched, nvtcs, vtcs, + &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); nvtcs = 2; @@ -156,8 +158,8 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void * send the data to non-partcipating ranks */ if (step1_sendto != -1) { /* I am a Step 2 non-participating rank */ mpi_errno = - MPIR_TSP_sched_irecv(recvbuf, recvcount, datatype, step1_sendto, tag, comm, sched, 1, - &step1_id, &vtx_id); + MPIR_TSP_sched_irecv(recvbuf, recvcount, datatype, step1_sendto, tag, comm, collattr, + sched, 1, &step1_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } for (i = 0; i < step1_nrecvs; i++) { @@ -165,8 +167,8 @@ int MPIR_TSP_Ireduce_scatter_block_sched_intra_recexch(const void *sendbuf, void vtcs[0] = reduce_id; mpi_errno = MPIR_TSP_sched_isend((char *) tmp_results + recvcount * step1_recvfrom[i] * extent, - recvcount, datatype, step1_recvfrom[i], tag, comm, sched, nvtcs, - vtcs, &vtx_id); + recvcount, datatype, step1_recvfrom[i], tag, comm, collattr, sched, + nvtcs, vtcs, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/iscan/iscan_intra_sched_recursive_doubling.c b/src/mpi/coll/iscan/iscan_intra_sched_recursive_doubling.c index 4a914802380..360de0e9a3a 100644 --- a/src/mpi/coll/iscan/iscan_intra_sched_recursive_doubling.c +++ b/src/mpi/coll/iscan/iscan_intra_sched_recursive_doubling.c @@ -7,7 +7,7 @@ int MPIR_Iscan_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; MPI_Aint true_extent, true_lb, extent; @@ -19,7 +19,7 @@ int MPIR_Iscan_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf comm_size = comm_ptr->local_size; rank = comm_ptr->rank; - is_commutative = MPIR_Op_is_commutative(op); + is_commutative = collattr, MPIR_Op_is_commutative(op); /* need to allocate temporary buffer to store partial scan */ MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); @@ -56,10 +56,10 @@ int MPIR_Iscan_intra_sched_recursive_doubling(const void *sendbuf, void *recvbuf dst = rank ^ mask; if (dst < comm_size) { /* Send partial_scan to dst. Recv into tmp_buf */ - mpi_errno = MPIR_Sched_send(partial_scan, count, datatype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_send(partial_scan, count, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); /* sendrecv, no barrier here */ - mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, dst, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(tmp_buf, count, datatype, dst, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); diff --git a/src/mpi/coll/iscan/iscan_intra_sched_smp.c b/src/mpi/coll/iscan/iscan_intra_sched_smp.c index 3cd74b72ed6..8ccde3e1f77 100644 --- a/src/mpi/coll/iscan/iscan_intra_sched_smp.c +++ b/src/mpi/coll/iscan/iscan_intra_sched_smp.c @@ -8,7 +8,7 @@ int MPIR_Iscan_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank = comm_ptr->rank; @@ -28,7 +28,7 @@ int MPIR_Iscan_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint coun /* We can't use the SMP-aware algorithm, use the non-SMP-aware * one */ return MPIR_Iscan_intra_sched_recursive_doubling(sendbuf, recvbuf, count, datatype, op, - comm_ptr, s); + comm_ptr, collattr, s); } node_comm = comm_ptr->node_comm; @@ -58,7 +58,8 @@ int MPIR_Iscan_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint coun * one process, just copy the raw data. */ if (node_comm != NULL) { mpi_errno = - MPIR_Iscan_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, node_comm, s); + MPIR_Iscan_intra_sched_auto(sendbuf, recvbuf, count, datatype, op, node_comm, collattr, + s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } else if (sendbuf != MPI_IN_PLACE) { @@ -73,12 +74,12 @@ int MPIR_Iscan_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint coun * reduced data of rank 1,2,3. */ if (roots_comm != NULL && node_comm != NULL) { mpi_errno = MPIR_Sched_recv(localfulldata, count, datatype, - (node_comm->local_size - 1), node_comm, s); + (node_comm->local_size - 1), node_comm, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } else if (roots_comm == NULL && node_comm != NULL && node_comm->rank == node_comm->local_size - 1) { - mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, 0, node_comm, s); + mpi_errno = MPIR_Sched_send(recvbuf, count, datatype, 0, node_comm, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } else if (roots_comm != NULL) { @@ -96,18 +97,21 @@ int MPIR_Iscan_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint coun mpi_errno = MPIR_Iscan_intra_sched_auto(localfulldata, prefulldata, count, datatype, op, roots_comm, - s); + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); if (roots_rank != roots_comm->local_size - 1) { mpi_errno = - MPIR_Sched_send(prefulldata, count, datatype, (roots_rank + 1), roots_comm, s); + MPIR_Sched_send(prefulldata, count, datatype, (roots_rank + 1), roots_comm, + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } if (roots_rank != 0) { - mpi_errno = MPIR_Sched_recv(tempbuf, count, datatype, (roots_rank - 1), roots_comm, s); + mpi_errno = + MPIR_Sched_recv(tempbuf, count, datatype, (roots_rank - 1), roots_comm, collattr, + s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } @@ -124,7 +128,8 @@ int MPIR_Iscan_intra_sched_smp(const void *sendbuf, void *recvbuf, MPI_Aint coun * "prefulldata" from another leader into "tempbuf" */ if (node_comm != NULL) { - mpi_errno = MPIR_Ibcast_intra_sched_auto(tempbuf, count, datatype, 0, node_comm, s); + mpi_errno = + MPIR_Ibcast_intra_sched_auto(tempbuf, count, datatype, 0, node_comm, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/iscan/iscan_tsp_recursive_doubling.c b/src/mpi/coll/iscan/iscan_tsp_recursive_doubling.c index 393add80d8e..e47af264f40 100644 --- a/src/mpi/coll/iscan/iscan_tsp_recursive_doubling.c +++ b/src/mpi/coll/iscan/iscan_tsp_recursive_doubling.c @@ -9,7 +9,8 @@ /* Routine to schedule a recursive exchange based scan */ int MPIR_TSP_Iscan_sched_intra_recursive_doubling(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_TSP_sched_t sched) + MPIR_Comm * comm, int collattr, + MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -75,8 +76,8 @@ int MPIR_TSP_Iscan_sched_intra_recursive_doubling(const void *sendbuf, void *rec nvtcs = 1; vtcs[0] = (loop_count == 0) ? dtcopy_id : reduce_id; mpi_errno = - MPIR_TSP_sched_isend(partial_scan, count, datatype, dst, tag, comm, sched, nvtcs, - vtcs, &send_id); + MPIR_TSP_sched_isend(partial_scan, count, datatype, dst, tag, comm, collattr, sched, + nvtcs, vtcs, &send_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -85,8 +86,8 @@ int MPIR_TSP_Iscan_sched_intra_recursive_doubling(const void *sendbuf, void *rec vtcs[1] = recv_reduce; } mpi_errno = - MPIR_TSP_sched_irecv(tmp_buf, count, datatype, dst, tag, comm, sched, nvtcs, vtcs, - &recv_id); + MPIR_TSP_sched_irecv(tmp_buf, count, datatype, dst, tag, comm, collattr, sched, + nvtcs, vtcs, &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); diff --git a/src/mpi/coll/iscatter/iscatter_inter_sched_linear.c b/src/mpi/coll/iscatter/iscatter_inter_sched_linear.c index 93a564d543d..5094a1e501f 100644 --- a/src/mpi/coll/iscatter/iscatter_inter_sched_linear.c +++ b/src/mpi/coll/iscatter/iscatter_inter_sched_linear.c @@ -15,7 +15,7 @@ int MPIR_Iscatter_inter_sched_linear(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + int root, MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int remote_size; @@ -34,12 +34,12 @@ int MPIR_Iscatter_inter_sched_linear(const void *sendbuf, MPI_Aint sendcount, MP for (i = 0; i < remote_size; i++) { mpi_errno = MPIR_Sched_send(((char *) sendbuf + sendcount * i * extent), sendcount, sendtype, i, - comm_ptr, s); + comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } MPIR_SCHED_BARRIER(s); } else { - mpi_errno = MPIR_Sched_recv(recvbuf, recvcount, recvtype, root, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvbuf, recvcount, recvtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/iscatter/iscatter_inter_sched_remote_send_local_scatter.c b/src/mpi/coll/iscatter/iscatter_inter_sched_remote_send_local_scatter.c index 1d0f7a3439d..3354792b826 100644 --- a/src/mpi/coll/iscatter/iscatter_inter_sched_remote_send_local_scatter.c +++ b/src/mpi/coll/iscatter/iscatter_inter_sched_remote_send_local_scatter.c @@ -18,7 +18,7 @@ int MPIR_Iscatter_inter_sched_remote_send_local_scatter(const void *sendbuf, MPI MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, local_size, remote_size; @@ -34,7 +34,8 @@ int MPIR_Iscatter_inter_sched_remote_send_local_scatter(const void *sendbuf, MPI if (root == MPI_ROOT) { /* root sends all data to rank 0 on remote group and returns */ - mpi_errno = MPIR_Sched_send(sendbuf, sendcount * remote_size, sendtype, 0, comm_ptr, s); + mpi_errno = + MPIR_Sched_send(sendbuf, sendcount * remote_size, sendtype, 0, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); goto fn_exit; @@ -53,7 +54,7 @@ int MPIR_Iscatter_inter_sched_remote_send_local_scatter(const void *sendbuf, MPI mpi_errno = MPIR_Sched_recv(tmp_buf, recvcount * local_size * recvtype_sz, MPI_BYTE, - root, comm_ptr, s); + root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } else { @@ -70,7 +71,8 @@ int MPIR_Iscatter_inter_sched_remote_send_local_scatter(const void *sendbuf, MPI /* now do the usual scatter on this intracommunicator */ mpi_errno = MPIR_Iscatter_intra_sched_auto(tmp_buf, recvcount * recvtype_sz, MPI_BYTE, - recvbuf, recvcount, recvtype, 0, newcomm_ptr, s); + recvbuf, recvcount, recvtype, 0, newcomm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/iscatter/iscatter_intra_sched_binomial.c b/src/mpi/coll/iscatter/iscatter_intra_sched_binomial.c index 49cc7fc0159..735cde3326f 100644 --- a/src/mpi/coll/iscatter/iscatter_intra_sched_binomial.c +++ b/src/mpi/coll/iscatter/iscatter_intra_sched_binomial.c @@ -66,7 +66,7 @@ static int calc_curr_count(MPIR_Comm * comm, int tag, void *state) int MPIR_Iscatter_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; MPI_Aint extent = 0; @@ -158,7 +158,8 @@ int MPIR_Iscatter_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, * they don't have to forward data to anyone. Others * receive data into a temporary buffer. */ if (relative_rank % 2) { - mpi_errno = MPIR_Sched_recv(recvbuf, recvcount, recvtype, src, comm_ptr, s); + mpi_errno = + MPIR_Sched_recv(recvbuf, recvcount, recvtype, src, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } else { @@ -167,7 +168,7 @@ int MPIR_Iscatter_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, * some cases. query amount of data actually received */ mpi_errno = MPIR_Sched_recv_status(tmp_buf, tmp_buf_size, MPI_BYTE, src, comm_ptr, - &ss->status, s); + &ss->status, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); mpi_errno = MPIR_Sched_cb(&get_count, ss, s); @@ -205,7 +206,8 @@ int MPIR_Iscatter_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, /* mask is also the size of this process's subtree */ mpi_errno = MPIR_Sched_send_defer(((char *) sendbuf + extent * sendcount * mask), - &ss->send_subtree_count, sendtype, dst, comm_ptr, s); + &ss->send_subtree_count, sendtype, dst, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } else { @@ -218,7 +220,7 @@ int MPIR_Iscatter_intra_sched_binomial(const void *sendbuf, MPI_Aint sendcount, /* mask is also the size of this process's subtree */ mpi_errno = MPIR_Sched_send_defer(((char *) tmp_buf + ss->nbytes * mask), &ss->send_subtree_count, MPI_BYTE, dst, - comm_ptr, s); + comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(s); } diff --git a/src/mpi/coll/iscatter/iscatter_tsp_tree.c b/src/mpi/coll/iscatter/iscatter_tsp_tree.c index 57ca9d05285..a9ded74441a 100644 --- a/src/mpi/coll/iscatter/iscatter_tsp_tree.c +++ b/src/mpi/coll/iscatter/iscatter_tsp_tree.c @@ -10,7 +10,7 @@ int MPIR_TSP_Iscatter_sched_intra_tree(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - int k, MPIR_TSP_sched_t sched) + int k, int collattr, MPIR_TSP_sched_t sched) { MPIR_FUNC_ENTER; @@ -149,7 +149,7 @@ int MPIR_TSP_Iscatter_sched_intra_tree(const void *sendbuf, MPI_Aint sendcount, /* receive data from the parent */ if (my_tree.parent != -1) { mpi_errno = MPIR_TSP_sched_irecv(tmp_buf, recv_size, recvtype, my_tree.parent, - tag, comm, sched, 0, NULL, &recv_id); + tag, comm, collattr, sched, 0, NULL, &recv_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, "rank:%d posts recv", rank)); } @@ -159,7 +159,7 @@ int MPIR_TSP_Iscatter_sched_intra_tree(const void *sendbuf, MPI_Aint sendcount, int child = *(int *) utarray_eltptr(my_tree.children, i); mpi_errno = MPIR_TSP_sched_isend((char *) tmp_buf + child_data_offset[i] * sendtype_extent, child_subtree_size[i] * sendcount, sendtype, - child, tag, comm, sched, num_send_dependencies, + child, tag, comm, collattr, sched, num_send_dependencies, (lrank == 0) ? dtcopy_id : &recv_id, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/iscatterv/iscatterv_allcomm_sched_linear.c b/src/mpi/coll/iscatterv/iscatterv_allcomm_sched_linear.c index 0257a6df1ec..1b6bb0d4154 100644 --- a/src/mpi/coll/iscatterv/iscatterv_allcomm_sched_linear.c +++ b/src/mpi/coll/iscatterv/iscatterv_allcomm_sched_linear.c @@ -18,7 +18,8 @@ int MPIR_Iscatterv_allcomm_sched_linear(const void *sendbuf, const MPI_Aint sendcounts[], const MPI_Aint displs[], MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + int root, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int rank, comm_size; @@ -48,7 +49,7 @@ int MPIR_Iscatterv_allcomm_sched_linear(const void *sendbuf, const MPI_Aint send } } else { mpi_errno = MPIR_Sched_send(((char *) sendbuf + displs[i] * extent), - sendcounts[i], sendtype, i, comm_ptr, s); + sendcounts[i], sendtype, i, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } @@ -58,7 +59,7 @@ int MPIR_Iscatterv_allcomm_sched_linear(const void *sendbuf, const MPI_Aint send else if (root != MPI_PROC_NULL) { /* non-root nodes, and in the intercomm. case, non-root nodes on remote side */ if (recvcount) { - mpi_errno = MPIR_Sched_recv(recvbuf, recvcount, recvtype, root, comm_ptr, s); + mpi_errno = MPIR_Sched_recv(recvbuf, recvcount, recvtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } diff --git a/src/mpi/coll/iscatterv/iscatterv_tsp_linear.c b/src/mpi/coll/iscatterv/iscatterv_tsp_linear.c index ada734e582d..207ee0bc504 100644 --- a/src/mpi/coll/iscatterv/iscatterv_tsp_linear.c +++ b/src/mpi/coll/iscatterv/iscatterv_tsp_linear.c @@ -11,7 +11,7 @@ int MPIR_TSP_Iscatterv_sched_allcomm_linear(const void *sendbuf, const MPI_Aint const MPI_Aint displs[], MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, - MPIR_TSP_sched_t sched) + int collattr, MPIR_TSP_sched_t sched) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret ATTRIBUTE((unused)) = MPI_SUCCESS; @@ -58,7 +58,7 @@ int MPIR_TSP_Iscatterv_sched_allcomm_linear(const void *sendbuf, const MPI_Aint } else { mpi_errno = MPIR_TSP_sched_isend(((char *) sendbuf + displs[i] * extent), sendcounts[i], sendtype, i, tag, comm_ptr, - sched, 0, NULL, &vtx_id); + collattr, sched, 0, NULL, &vtx_id); } } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -69,8 +69,8 @@ int MPIR_TSP_Iscatterv_sched_allcomm_linear(const void *sendbuf, const MPI_Aint /* non-root nodes, and in the intercomm. case, non-root nodes on remote side */ if (recvcount) { mpi_errno = - MPIR_TSP_sched_irecv(recvbuf, recvcount, recvtype, root, tag, comm_ptr, sched, 0, - NULL, &vtx_id); + MPIR_TSP_sched_irecv(recvbuf, recvcount, recvtype, root, tag, comm_ptr, collattr, + sched, 0, NULL, &vtx_id); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/mpir_coll_sched_auto.c b/src/mpi/coll/mpir_coll_sched_auto.c index 8b118bda349..de73dca0b10 100644 --- a/src/mpi/coll/mpir_coll_sched_auto.c +++ b/src/mpi/coll/mpir_coll_sched_auto.c @@ -12,28 +12,28 @@ * defining them here. */ -int MPIR_Ibarrier_intra_sched_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s) +int MPIR_Ibarrier_intra_sched_auto(MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; - mpi_errno = MPIR_Ibarrier_intra_sched_recursive_doubling(comm_ptr, s); + mpi_errno = MPIR_Ibarrier_intra_sched_recursive_doubling(comm_ptr, collattr, s); return mpi_errno; } /* It will choose between several different algorithms based on the given * parameters. */ -int MPIR_Ibarrier_inter_sched_auto(MPIR_Comm * comm_ptr, MPIR_Sched_t s) +int MPIR_Ibarrier_inter_sched_auto(MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno; - mpi_errno = MPIR_Ibarrier_inter_sched_bcast(comm_ptr, s); + mpi_errno = MPIR_Ibarrier_inter_sched_bcast(comm_ptr, collattr, s); return mpi_errno; } int MPIR_Ibcast_intra_sched_auto(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size; @@ -42,7 +42,8 @@ int MPIR_Ibcast_intra_sched_auto(void *buffer, MPI_Aint count, MPI_Datatype data MPIR_Assert(comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM); if (comm_ptr->hierarchy_kind == MPIR_COMM_HIERARCHY_KIND__PARENT) { - mpi_errno = MPIR_Ibcast_intra_sched_smp(buffer, count, datatype, root, comm_ptr, s); + mpi_errno = + MPIR_Ibcast_intra_sched_smp(buffer, count, datatype, root, comm_ptr, collattr, s); if (mpi_errno) MPIR_ERR_POP(mpi_errno); @@ -55,7 +56,8 @@ int MPIR_Ibcast_intra_sched_auto(void *buffer, MPI_Aint count, MPI_Datatype data /* simplistic implementation for now */ if ((nbytes < MPIR_CVAR_BCAST_SHORT_MSG_SIZE) || (comm_size < MPIR_CVAR_BCAST_MIN_PROCS)) { - mpi_errno = MPIR_Ibcast_intra_sched_binomial(buffer, count, datatype, root, comm_ptr, s); + mpi_errno = + MPIR_Ibcast_intra_sched_binomial(buffer, count, datatype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* (nbytes >= MPIR_CVAR_BCAST_SHORT_MSG_SIZE) && (comm_size >= MPIR_CVAR_BCAST_MIN_PROCS) */ @@ -63,12 +65,12 @@ int MPIR_Ibcast_intra_sched_auto(void *buffer, MPI_Aint count, MPI_Datatype data mpi_errno = MPIR_Ibcast_intra_sched_scatter_recursive_doubling_allgather(buffer, count, datatype, root, - comm_ptr, s); + comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { mpi_errno = MPIR_Ibcast_intra_sched_scatter_ring_allgather(buffer, count, datatype, root, - comm_ptr, s); + comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } @@ -83,24 +85,24 @@ int MPIR_Ibcast_intra_sched_auto(void *buffer, MPI_Aint count, MPI_Datatype data * know anything about hierarchy. It will choose between several * different algorithms based on the given parameters. */ int MPIR_Ibcast_inter_sched_auto(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; - mpi_errno = MPIR_Ibcast_inter_sched_flat(buffer, count, datatype, root, comm_ptr, s); + mpi_errno = MPIR_Ibcast_inter_sched_flat(buffer, count, datatype, root, comm_ptr, collattr, s); return mpi_errno; } int MPIR_Igather_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + int root, MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Igather_intra_sched_binomial(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm_ptr, s); + recvtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -111,7 +113,7 @@ int MPIR_Igather_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_D int MPIR_Igather_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + int root, MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; MPI_Aint local_size, remote_size; @@ -137,11 +139,11 @@ int MPIR_Igather_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_D if (nbytes < MPIR_CVAR_GATHER_INTER_SHORT_MSG_SIZE) { mpi_errno = MPIR_Igather_inter_sched_short(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm_ptr, s); + recvtype, root, comm_ptr, collattr, s); } else { mpi_errno = MPIR_Igather_inter_sched_long(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm_ptr, s); + recvtype, root, comm_ptr, collattr, s); } fn_exit: @@ -151,13 +153,13 @@ int MPIR_Igather_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_D int MPIR_Igatherv_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Igatherv_allcomm_sched_linear(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, root, comm_ptr, s); + displs, recvtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -170,13 +172,13 @@ int MPIR_Igatherv_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_ int MPIR_Igatherv_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Igatherv_allcomm_sched_linear(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, root, comm_ptr, s); + displs, recvtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -188,13 +190,13 @@ int MPIR_Igatherv_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_ int MPIR_Iscatter_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + int root, MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iscatter_intra_sched_binomial(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm_ptr, s); + recvtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); @@ -206,7 +208,7 @@ int MPIR_Iscatter_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_ int MPIR_Iscatter_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + int root, MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int local_size, remote_size; MPI_Aint sendtype_size, recvtype_size, nbytes; @@ -227,11 +229,11 @@ int MPIR_Iscatter_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_ mpi_errno = MPIR_Iscatter_inter_sched_remote_send_local_scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, - comm_ptr, s); + comm_ptr, collattr, s); } else { mpi_errno = MPIR_Iscatter_inter_sched_linear(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, - s); + collattr, s); } MPIR_ERR_CHECK(mpi_errno); @@ -245,13 +247,13 @@ int MPIR_Iscatter_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_ int MPIR_Iscatterv_intra_sched_auto(const void *sendbuf, const MPI_Aint sendcounts[], const MPI_Aint displs[], MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iscatterv_allcomm_sched_linear(sendbuf, sendcounts, displs, sendtype, recvbuf, - recvcount, recvtype, root, comm_ptr, s); + recvcount, recvtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -264,13 +266,13 @@ int MPIR_Iscatterv_intra_sched_auto(const void *sendbuf, const MPI_Aint sendcoun int MPIR_Iscatterv_inter_sched_auto(const void *sendbuf, const MPI_Aint sendcounts[], const MPI_Aint displs[], MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iscatterv_allcomm_sched_linear(sendbuf, sendcounts, displs, sendtype, recvbuf, - recvcount, recvtype, root, comm_ptr, s); + recvcount, recvtype, root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -282,7 +284,7 @@ int MPIR_Iscatterv_inter_sched_auto(const void *sendbuf, const MPI_Aint sendcoun int MPIR_Iallgather_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size; @@ -296,15 +298,16 @@ int MPIR_Iallgather_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MP if ((tot_bytes < MPIR_CVAR_ALLGATHER_LONG_MSG_SIZE) && !(comm_size & (comm_size - 1))) { mpi_errno = MPIR_Iallgather_intra_sched_recursive_doubling(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm_ptr, s); + recvcount, recvtype, comm_ptr, collattr, + s); } else if (tot_bytes < MPIR_CVAR_ALLGATHER_SHORT_MSG_SIZE) { mpi_errno = MPIR_Iallgather_intra_sched_brucks(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm_ptr, s); + recvtype, comm_ptr, collattr, s); } else { mpi_errno = MPIR_Iallgather_intra_sched_ring(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm_ptr, s); + recvtype, comm_ptr, collattr, s); } MPIR_ERR_CHECK(mpi_errno); @@ -316,13 +319,15 @@ int MPIR_Iallgather_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MP int MPIR_Iallgather_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iallgather_inter_sched_local_gather_remote_bcast(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm_ptr, s); + recvtype, comm_ptr, collattr, + s); return mpi_errno; } @@ -330,7 +335,8 @@ int MPIR_Iallgather_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, int MPIR_Iallgatherv_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int i, comm_size; @@ -353,21 +359,21 @@ int MPIR_Iallgatherv_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, mpi_errno = MPIR_Iallgatherv_intra_sched_recursive_doubling(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm_ptr, - s); + collattr, s); MPIR_ERR_CHECK(mpi_errno); } else if (total_count * recvtype_size < MPIR_CVAR_ALLGATHER_SHORT_MSG_SIZE) { /* Short message and non-power-of-two no. of processes. Use * Bruck algorithm (see description above). */ mpi_errno = MPIR_Iallgatherv_intra_sched_brucks(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, comm_ptr, s); + displs, recvtype, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* long message or medium-size message and non-power-of-two * no. of processes. Use ring algorithm. */ mpi_errno = MPIR_Iallgatherv_intra_sched_ring(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, comm_ptr, s); + displs, recvtype, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } @@ -380,21 +386,22 @@ int MPIR_Iallgatherv_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, int MPIR_Iallgatherv_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint displs[], - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iallgatherv_inter_sched_remote_gather_local_bcast(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, - comm_ptr, s); + comm_ptr, collattr, s); return mpi_errno; } int MPIR_Ialltoall_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int comm_size; @@ -408,19 +415,20 @@ int MPIR_Ialltoall_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI if (sendbuf == MPI_IN_PLACE) { mpi_errno = MPIR_Ialltoall_intra_sched_inplace(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm_ptr, s); + recvtype, comm_ptr, collattr, s); } else if ((nbytes <= MPIR_CVAR_ALLTOALL_SHORT_MSG_SIZE) && (comm_size >= 8)) { mpi_errno = MPIR_Ialltoall_intra_sched_brucks(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm_ptr, s); + recvtype, comm_ptr, collattr, s); } else if (nbytes <= MPIR_CVAR_ALLTOALL_MEDIUM_MSG_SIZE) { mpi_errno = MPIR_Ialltoall_intra_sched_permuted_sendrecv(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm_ptr, s); + recvcount, recvtype, comm_ptr, collattr, + s); } else { mpi_errno = MPIR_Ialltoall_intra_sched_pairwise(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm_ptr, s); + recvtype, comm_ptr, collattr, s); } MPIR_ERR_CHECK(mpi_errno); @@ -433,13 +441,14 @@ int MPIR_Ialltoall_intra_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI int MPIR_Ialltoall_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ialltoall_inter_sched_pairwise_exchange(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, - comm_ptr, s); + comm_ptr, collattr, s); return mpi_errno; } @@ -447,7 +456,8 @@ int MPIR_Ialltoall_inter_sched_auto(const void *sendbuf, MPI_Aint sendcount, MPI int MPIR_Ialltoallv_intra_sched_auto(const void *sendbuf, const MPI_Aint sendcounts[], const MPI_Aint sdispls[], MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; @@ -456,11 +466,11 @@ int MPIR_Ialltoallv_intra_sched_auto(const void *sendbuf, const MPI_Aint sendcou if (sendbuf == MPI_IN_PLACE) { mpi_errno = MPIR_Ialltoallv_intra_sched_inplace(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, - rdispls, recvtype, comm_ptr, s); + rdispls, recvtype, comm_ptr, collattr, s); } else { mpi_errno = MPIR_Ialltoallv_intra_sched_blocked(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, - rdispls, recvtype, comm_ptr, s); + rdispls, recvtype, comm_ptr, collattr, s); } return mpi_errno; @@ -469,13 +479,15 @@ int MPIR_Ialltoallv_intra_sched_auto(const void *sendbuf, const MPI_Aint sendcou int MPIR_Ialltoallv_inter_sched_auto(const void *sendbuf, const MPI_Aint sendcounts[], const MPI_Aint sdispls[], MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], - MPI_Datatype recvtype, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Datatype recvtype, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ialltoallv_inter_sched_pairwise_exchange(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, - rdispls, recvtype, comm_ptr, s); + rdispls, recvtype, comm_ptr, collattr, + s); return mpi_errno; } @@ -484,18 +496,18 @@ int MPIR_Ialltoallw_intra_sched_auto(const void *sendbuf, const MPI_Aint sendcou const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; if (sendbuf == MPI_IN_PLACE) { mpi_errno = MPIR_Ialltoallw_intra_sched_inplace(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, - rdispls, recvtypes, comm_ptr, s); + rdispls, recvtypes, comm_ptr, collattr, s); } else { mpi_errno = MPIR_Ialltoallw_intra_sched_blocked(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, - rdispls, recvtypes, comm_ptr, s); + rdispls, recvtypes, comm_ptr, collattr, s); } return mpi_errno; @@ -505,20 +517,21 @@ int MPIR_Ialltoallw_inter_sched_auto(const void *sendbuf, const MPI_Aint sendcou const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ialltoallw_inter_sched_pairwise_exchange(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, - rdispls, recvtypes, comm_ptr, s); + rdispls, recvtypes, comm_ptr, + collattr, s); return mpi_errno; } int MPIR_Ireduce_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int pof2; @@ -528,7 +541,7 @@ int MPIR_Ireduce_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint c if (comm_ptr->hierarchy_kind == MPIR_COMM_HIERARCHY_KIND__PARENT && MPIR_Op_is_commutative(op)) { mpi_errno = MPIR_Ireduce_intra_sched_smp(sendbuf, recvbuf, count, - datatype, op, root, comm_ptr, s); + datatype, op, root, comm_ptr, collattr, s); if (mpi_errno) MPIR_ERR_POP(mpi_errno); @@ -545,13 +558,13 @@ int MPIR_Ireduce_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint c /* do a reduce-scatter followed by gather to root. */ mpi_errno = MPIR_Ireduce_intra_sched_reduce_scatter_gather(sendbuf, recvbuf, count, datatype, op, - root, comm_ptr, s); + root, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* use a binomial tree algorithm */ mpi_errno = MPIR_Ireduce_intra_sched_binomial(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, - s); + collattr, s); MPIR_ERR_CHECK(mpi_errno); } @@ -563,19 +576,20 @@ int MPIR_Ireduce_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint c int MPIR_Ireduce_inter_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPIR_Comm * comm_ptr, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ireduce_inter_sched_local_reduce_remote_send(sendbuf, recvbuf, count, - datatype, op, root, comm_ptr, s); + datatype, op, root, comm_ptr, + collattr, s); return mpi_errno; } int MPIR_Iallreduce_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int pof2; @@ -584,7 +598,8 @@ int MPIR_Iallreduce_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Ain if (comm_ptr->hierarchy_kind == MPIR_COMM_HIERARCHY_KIND__PARENT && MPIR_Op_is_commutative(op)) { mpi_errno = - MPIR_Iallreduce_intra_sched_smp(sendbuf, recvbuf, count, datatype, op, comm_ptr, s); + MPIR_Iallreduce_intra_sched_smp(sendbuf, recvbuf, count, datatype, op, comm_ptr, + collattr, s); if (mpi_errno) MPIR_ERR_POP(mpi_errno); @@ -611,13 +626,13 @@ int MPIR_Iallreduce_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Ain /* use recursive doubling */ mpi_errno = MPIR_Iallreduce_intra_sched_recursive_doubling(sendbuf, recvbuf, count, datatype, op, - comm_ptr, s); + comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* do a reduce-scatter followed by allgather */ mpi_errno = MPIR_Iallreduce_intra_sched_reduce_scatter_allgather(sendbuf, recvbuf, count, datatype, - op, comm_ptr, s); + op, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } @@ -629,19 +644,21 @@ int MPIR_Iallreduce_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Ain int MPIR_Iallreduce_inter_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iallreduce_inter_sched_remote_reduce_local_bcast(sendbuf, recvbuf, count, - datatype, op, comm_ptr, s); + datatype, op, comm_ptr, + collattr, s); return mpi_errno; } int MPIR_Ireduce_scatter_intra_sched_auto(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int i; @@ -666,12 +683,12 @@ int MPIR_Ireduce_scatter_intra_sched_auto(const void *sendbuf, void *recvbuf, if (is_commutative && (nbytes < MPIR_CVAR_REDUCE_SCATTER_COMMUTATIVE_LONG_MSG_SIZE)) { mpi_errno = MPIR_Ireduce_scatter_intra_sched_recursive_halving(sendbuf, recvbuf, recvcounts, - datatype, op, comm_ptr, s); + datatype, op, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else if (is_commutative && (nbytes >= MPIR_CVAR_REDUCE_SCATTER_COMMUTATIVE_LONG_MSG_SIZE)) { mpi_errno = MPIR_Ireduce_scatter_intra_sched_pairwise(sendbuf, recvbuf, recvcounts, datatype, op, - comm_ptr, s); + comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* (!is_commutative) */ @@ -687,13 +704,15 @@ int MPIR_Ireduce_scatter_intra_sched_auto(const void *sendbuf, void *recvbuf, /* noncommutative, pof2 size, and block regular */ mpi_errno = MPIR_Ireduce_scatter_intra_sched_noncommutative(sendbuf, recvbuf, recvcounts, - datatype, op, comm_ptr, s); + datatype, op, comm_ptr, collattr, + s); MPIR_ERR_CHECK(mpi_errno); } else { /* noncommutative and (non-pof2 or block irregular), use recursive doubling. */ mpi_errno = MPIR_Ireduce_scatter_intra_sched_recursive_doubling(sendbuf, recvbuf, recvcounts, - datatype, op, comm_ptr, s); + datatype, op, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } } @@ -706,20 +725,23 @@ int MPIR_Ireduce_scatter_intra_sched_auto(const void *sendbuf, void *recvbuf, int MPIR_Ireduce_scatter_inter_sched_auto(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ireduce_scatter_inter_sched_remote_reduce_local_scatterv(sendbuf, recvbuf, recvcounts, - datatype, op, comm_ptr, s); + datatype, op, comm_ptr, + collattr, s); return mpi_errno; } int MPIR_Ireduce_scatter_block_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; int is_commutative; @@ -740,12 +762,13 @@ int MPIR_Ireduce_scatter_block_intra_sched_auto(const void *sendbuf, void *recvb if (is_commutative && (nbytes < MPIR_CVAR_REDUCE_SCATTER_COMMUTATIVE_LONG_MSG_SIZE)) { mpi_errno = MPIR_Ireduce_scatter_block_intra_sched_recursive_halving(sendbuf, recvbuf, recvcount, - datatype, op, comm_ptr, s); + datatype, op, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } else if (is_commutative && (nbytes >= MPIR_CVAR_REDUCE_SCATTER_COMMUTATIVE_LONG_MSG_SIZE)) { mpi_errno = MPIR_Ireduce_scatter_block_intra_sched_pairwise(sendbuf, recvbuf, recvcount, datatype, - op, comm_ptr, s); + op, comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* (!is_commutative) */ @@ -753,14 +776,15 @@ int MPIR_Ireduce_scatter_block_intra_sched_auto(const void *sendbuf, void *recvb /* noncommutative, pof2 size */ mpi_errno = MPIR_Ireduce_scatter_block_intra_sched_noncommutative(sendbuf, recvbuf, recvcount, - datatype, op, comm_ptr, s); + datatype, op, comm_ptr, + collattr, s); MPIR_ERR_CHECK(mpi_errno); } else { /* noncommutative and non-pof2, use recursive doubling. */ mpi_errno = MPIR_Ireduce_scatter_block_intra_sched_recursive_doubling(sendbuf, recvbuf, recvcount, datatype, op, - comm_ptr, s); + comm_ptr, collattr, s); MPIR_ERR_CHECK(mpi_errno); } } @@ -774,30 +798,33 @@ int MPIR_Ireduce_scatter_block_intra_sched_auto(const void *sendbuf, void *recvb int MPIR_Ireduce_scatter_block_inter_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Sched_t s) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr, + MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ireduce_scatter_block_inter_sched_remote_reduce_local_scatterv(sendbuf, recvbuf, recvcount, datatype, op, - comm_ptr, s); + comm_ptr, collattr, s); return mpi_errno; } int MPIR_Iscan_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; if (comm_ptr->hierarchy_kind == MPIR_COMM_HIERARCHY_KIND__PARENT) { - mpi_errno = MPIR_Iscan_intra_sched_smp(sendbuf, recvbuf, count, datatype, op, comm_ptr, s); + mpi_errno = + MPIR_Iscan_intra_sched_smp(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr, + s); } else { mpi_errno = MPIR_Iscan_intra_sched_recursive_doubling(sendbuf, recvbuf, count, datatype, op, - comm_ptr, s); + comm_ptr, collattr, s); } return mpi_errno; @@ -805,13 +832,13 @@ int MPIR_Iscan_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint cou int MPIR_Iexscan_intra_sched_auto(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iexscan_intra_sched_recursive_doubling(sendbuf, recvbuf, count, datatype, op, comm_ptr, - s); + collattr, s); MPIR_ERR_CHECK(mpi_errno); fn_exit: diff --git a/src/mpi/coll/reduce/reduce_allcomm_nb.c b/src/mpi/coll/reduce/reduce_allcomm_nb.c index 2ab95bc494e..f0ba7eab15e 100644 --- a/src/mpi/coll/reduce/reduce_allcomm_nb.c +++ b/src/mpi/coll/reduce/reduce_allcomm_nb.c @@ -7,13 +7,14 @@ int MPIR_Reduce_allcomm_nb(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; /* just call the nonblocking version and wait on it */ - mpi_errno = MPIR_Ireduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, &req_ptr); + mpi_errno = + MPIR_Ireduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c b/src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c index d61ad6c8d82..e56a2b38bf6 100644 --- a/src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c +++ b/src/mpi/coll/reduce/reduce_inter_local_reduce_remote_send.c @@ -18,11 +18,11 @@ int MPIR_Reduce_inter_local_reduce_remote_send(const void *sendbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { int rank, mpi_errno; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; MPI_Aint true_extent, true_lb, extent; void *tmp_buf = NULL; @@ -36,7 +36,8 @@ int MPIR_Reduce_inter_local_reduce_remote_send(const void *sendbuf, if (root == MPI_ROOT) { /* root receives data from rank 0 on remote group */ - mpi_errno = MPIC_Recv(recvbuf, count, datatype, 0, MPIR_REDUCE_TAG, comm_ptr, &status); + mpi_errno = + MPIC_Recv(recvbuf, count, datatype, 0, MPIR_REDUCE_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* remote group. Rank 0 allocates temporary buffer, does @@ -64,12 +65,13 @@ int MPIR_Reduce_inter_local_reduce_remote_send(const void *sendbuf, newcomm_ptr = comm_ptr->local_comm; /* now do a local reduce on this intracommunicator */ - mpi_errno = MPIR_Reduce(sendbuf, tmp_buf, count, datatype, op, 0, newcomm_ptr, errflag); + mpi_errno = + MPIR_Reduce(sendbuf, tmp_buf, count, datatype, op, 0, newcomm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (rank == 0) { mpi_errno = MPIC_Send(tmp_buf, count, datatype, root, - MPIR_REDUCE_TAG, comm_ptr, errflag); + MPIR_REDUCE_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/reduce/reduce_intra_binomial.c b/src/mpi/coll/reduce/reduce_intra_binomial.c index 441929a5b66..8c496db185d 100644 --- a/src/mpi/coll/reduce/reduce_intra_binomial.c +++ b/src/mpi/coll/reduce/reduce_intra_binomial.c @@ -13,10 +13,11 @@ int MPIR_Reduce_intra_binomial(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, int root, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; int comm_size, rank, is_commutative; int mask, relrank, source, lroot; @@ -98,7 +99,7 @@ int MPIR_Reduce_intra_binomial(const void *sendbuf, if (source < comm_size) { source = (source + lroot) % comm_size; mpi_errno = MPIC_Recv(tmp_buf, count, datatype, source, - MPIR_REDUCE_TAG, comm_ptr, &status); + MPIR_REDUCE_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* The sender is above us, so the received buffer must be @@ -119,7 +120,7 @@ int MPIR_Reduce_intra_binomial(const void *sendbuf, * my parent */ source = ((relrank & (~mask)) + lroot) % comm_size; mpi_errno = MPIC_Send(recvbuf, count, datatype, - source, MPIR_REDUCE_TAG, comm_ptr, errflag); + source, MPIR_REDUCE_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); break; } @@ -129,9 +130,11 @@ int MPIR_Reduce_intra_binomial(const void *sendbuf, if (!is_commutative && (root != 0)) { if (rank == 0) { mpi_errno = MPIC_Send(recvbuf, count, datatype, root, - MPIR_REDUCE_TAG, comm_ptr, errflag); + MPIR_REDUCE_TAG, comm_ptr, collattr | errflag); } else if (rank == root) { - mpi_errno = MPIC_Recv(recvbuf, count, datatype, 0, MPIR_REDUCE_TAG, comm_ptr, &status); + mpi_errno = + MPIC_Recv(recvbuf, count, datatype, 0, MPIR_REDUCE_TAG, comm_ptr, collattr, + &status); } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c b/src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c index d7a6e7f0931..e2e3757dbb6 100644 --- a/src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c +++ b/src/mpi/coll/reduce/reduce_intra_reduce_scatter_gather.c @@ -36,11 +36,11 @@ int MPIR_Reduce_intra_reduce_scatter_gather(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, - int root, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, int root, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int comm_size, rank, pof2, rem, newrank; int mask, i, j, send_idx = 0; int recv_idx, last_idx = 0, newdst; @@ -106,7 +106,8 @@ int MPIR_Reduce_intra_reduce_scatter_gather(const void *sendbuf, if (rank < 2 * rem) { if (rank % 2 != 0) { /* odd */ mpi_errno = MPIC_Send(recvbuf, count, - datatype, rank - 1, MPIR_REDUCE_TAG, comm_ptr, errflag); + datatype, rank - 1, MPIR_REDUCE_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* temporarily set the rank to -1 so that this @@ -115,7 +116,8 @@ int MPIR_Reduce_intra_reduce_scatter_gather(const void *sendbuf, newrank = -1; } else { /* even */ mpi_errno = MPIC_Recv(tmp_buf, count, - datatype, rank + 1, MPIR_REDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE); + datatype, rank + 1, MPIR_REDUCE_TAG, comm_ptr, collattr, + MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* do the reduction on received data. */ @@ -190,7 +192,8 @@ int MPIR_Reduce_intra_reduce_scatter_gather(const void *sendbuf, (char *) tmp_buf + disps[recv_idx] * extent, recv_cnt, datatype, dst, - MPIR_REDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); + MPIR_REDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* tmp_buf contains data received in this step. @@ -237,14 +240,14 @@ int MPIR_Reduce_intra_reduce_scatter_gather(const void *sendbuf, disps[i] = disps[i - 1] + cnts[i - 1]; mpi_errno = MPIC_Recv(recvbuf, cnts[0], datatype, - 0, MPIR_REDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE); + 0, MPIR_REDUCE_TAG, comm_ptr, collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); newrank = 0; send_idx = 0; last_idx = 2; } else if (newrank == 0) { /* send */ mpi_errno = MPIC_Send(recvbuf, cnts[0], datatype, - root, MPIR_REDUCE_TAG, comm_ptr, errflag); + root, MPIR_REDUCE_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); newrank = -1; } @@ -310,7 +313,8 @@ int MPIR_Reduce_intra_reduce_scatter_gather(const void *sendbuf, /* Send data from recvbuf. Recv into tmp_buf */ mpi_errno = MPIC_Send((char *) recvbuf + disps[send_idx] * extent, - send_cnt, datatype, dst, MPIR_REDUCE_TAG, comm_ptr, errflag); + send_cnt, datatype, dst, MPIR_REDUCE_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); break; } else { @@ -320,7 +324,7 @@ int MPIR_Reduce_intra_reduce_scatter_gather(const void *sendbuf, mpi_errno = MPIC_Recv((char *) recvbuf + disps[recv_idx] * extent, recv_cnt, datatype, dst, - MPIR_REDUCE_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_REDUCE_TAG, comm_ptr, collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/reduce/reduce_intra_smp.c b/src/mpi/coll/reduce/reduce_intra_smp.c index a3d93c5a2f9..ee15dabc21a 100644 --- a/src/mpi/coll/reduce/reduce_intra_smp.c +++ b/src/mpi/coll/reduce/reduce_intra_smp.c @@ -7,10 +7,11 @@ int MPIR_Reduce_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; void *tmp_buf = NULL; MPI_Aint true_lb, true_extent, extent; MPIR_CHKLMEM_DECL(1); @@ -38,7 +39,7 @@ int MPIR_Reduce_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, /* do the intranode reduce on all nodes other than the root's node */ if (comm_ptr->node_comm != NULL && MPIR_Get_intranode_rank(comm_ptr, root) == -1) { mpi_errno = MPIR_Reduce(sendbuf, tmp_buf, count, datatype, - op, 0, comm_ptr->node_comm, errflag); + op, 0, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -50,7 +51,7 @@ int MPIR_Reduce_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, const void *buf = (comm_ptr->node_comm == NULL ? sendbuf : tmp_buf); mpi_errno = MPIR_Reduce(buf, NULL, count, datatype, op, MPIR_Get_internode_rank(comm_ptr, root), - comm_ptr->node_roots_comm, errflag); + comm_ptr->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* I am on root's node. I have not participated in the earlier reduce. */ if (comm_ptr->rank != root) { @@ -59,7 +60,7 @@ int MPIR_Reduce_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, mpi_errno = MPIR_Reduce(sendbuf, tmp_buf, count, datatype, op, MPIR_Get_internode_rank(comm_ptr, root), - comm_ptr->node_roots_comm, errflag); + comm_ptr->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* point sendbuf at tmp_buf to make final intranode reduce easy */ @@ -69,7 +70,7 @@ int MPIR_Reduce_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, mpi_errno = MPIR_Reduce(sendbuf, recvbuf, count, datatype, op, MPIR_Get_internode_rank(comm_ptr, root), - comm_ptr->node_roots_comm, errflag); + comm_ptr->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* set sendbuf to MPI_IN_PLACE to make final intranode reduce easy. */ @@ -83,7 +84,7 @@ int MPIR_Reduce_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, if (comm_ptr->node_comm != NULL && MPIR_Get_intranode_rank(comm_ptr, root) != -1) { mpi_errno = MPIR_Reduce(sendbuf, recvbuf, count, datatype, op, MPIR_Get_intranode_rank(comm_ptr, root), - comm_ptr->node_comm, errflag); + comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c b/src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c index a29d82db025..ce8114a394e 100644 --- a/src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c +++ b/src/mpi/coll/reduce_scatter/reduce_scatter_allcomm_nb.c @@ -7,14 +7,15 @@ int MPIR_Reduce_scatter_allcomm_nb(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; /* just call the nonblocking version and wait on it */ mpi_errno = - MPIR_Ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, &req_ptr); + MPIR_Ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, collattr, + &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c b/src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c index 1ed2ea9052f..1424ce088a4 100644 --- a/src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c +++ b/src/mpi/coll/reduce_scatter/reduce_scatter_inter_remote_reduce_local_scatter.c @@ -15,11 +15,11 @@ int MPIR_Reduce_scatter_inter_remote_reduce_local_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int rank, mpi_errno, root, local_size, total_count, i; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint true_extent, true_lb = 0, extent; void *tmp_buf = NULL; MPI_Aint *disps = NULL; @@ -62,25 +62,25 @@ int MPIR_Reduce_scatter_inter_remote_reduce_local_scatter(const void *sendbuf, v /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Reduce_allcomm_auto(sendbuf, tmp_buf, total_count, datatype, op, - root, comm_ptr, errflag); + root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* reduce to rank 0 of right group */ root = 0; mpi_errno = MPIR_Reduce_allcomm_auto(sendbuf, tmp_buf, total_count, datatype, op, - root, comm_ptr, errflag); + root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* reduce to rank 0 of left group */ root = 0; mpi_errno = MPIR_Reduce_allcomm_auto(sendbuf, tmp_buf, total_count, datatype, op, - root, comm_ptr, errflag); + root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Reduce_allcomm_auto(sendbuf, tmp_buf, total_count, datatype, op, - root, comm_ptr, errflag); + root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -93,7 +93,7 @@ int MPIR_Reduce_scatter_inter_remote_reduce_local_scatter(const void *sendbuf, v newcomm_ptr = comm_ptr->local_comm; mpi_errno = MPIR_Scatterv(tmp_buf, recvcounts, disps, datatype, recvbuf, - recvcounts[rank], datatype, 0, newcomm_ptr, errflag); + recvcounts[rank], datatype, 0, newcomm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); fn_exit: diff --git a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c index 30a66898d43..3104e561a7c 100644 --- a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c +++ b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_noncommutative.c @@ -22,11 +22,11 @@ */ int MPIR_Reduce_scatter_intra_noncommutative(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int comm_size = comm_ptr->local_size; int rank = comm_ptr->rank; int log2_comm_size; @@ -102,7 +102,7 @@ int MPIR_Reduce_scatter_intra_noncommutative(const void *sendbuf, void *recvbuf, size, datatype, peer, MPIR_REDUCE_SCATTER_TAG, incoming_data + recv_offset * true_extent, size, datatype, peer, MPIR_REDUCE_SCATTER_TAG, - comm_ptr, MPI_STATUS_IGNORE, errflag); + comm_ptr, MPI_STATUS_IGNORE, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* always perform the reduction at recv_offset, the data at send_offset * is now our peer's responsibility */ diff --git a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c index 2845c6c5014..616f5d019b4 100644 --- a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c +++ b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_pairwise.c @@ -15,7 +15,7 @@ */ int MPIR_Reduce_scatter_intra_pairwise(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int rank, comm_size, i; MPI_Aint extent, true_extent, true_lb; @@ -23,6 +23,7 @@ int MPIR_Reduce_scatter_intra_pairwise(const void *sendbuf, void *recvbuf, void *tmp_recvbuf; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int total_count, src, dst; MPIR_CHKLMEM_DECL(5); @@ -81,14 +82,14 @@ int MPIR_Reduce_scatter_intra_pairwise(const void *sendbuf, void *recvbuf, MPIR_REDUCE_SCATTER_TAG, tmp_recvbuf, recvcounts[rank], datatype, src, MPIR_REDUCE_SCATTER_TAG, comm_ptr, - MPI_STATUS_IGNORE, errflag); + MPI_STATUS_IGNORE, collattr | errflag); else mpi_errno = MPIC_Sendrecv(((char *) recvbuf + disps[dst] * extent), recvcounts[dst], datatype, dst, MPIR_REDUCE_SCATTER_TAG, tmp_recvbuf, recvcounts[rank], datatype, src, MPIR_REDUCE_SCATTER_TAG, comm_ptr, - MPI_STATUS_IGNORE, errflag); + MPI_STATUS_IGNORE, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); diff --git a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c index 98a7e5a6840..2cbee519fb1 100644 --- a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c +++ b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_doubling.c @@ -19,8 +19,7 @@ */ int MPIR_Reduce_scatter_intra_recursive_doubling(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int rank, comm_size, i; MPI_Aint extent, true_extent, true_lb; @@ -28,6 +27,7 @@ int MPIR_Reduce_scatter_intra_recursive_doubling(const void *sendbuf, void *recv void *tmp_recvbuf, *tmp_results; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int dis[2], blklens[2], total_count, dst; int mask, dst_tree_root, my_tree_root, j, k; int pof2, received; @@ -150,7 +150,7 @@ int MPIR_Reduce_scatter_intra_recursive_doubling(const void *sendbuf, void *recv MPIR_REDUCE_SCATTER_TAG, tmp_recvbuf, 1, recvtype, dst, MPIR_REDUCE_SCATTER_TAG, comm_ptr, - MPI_STATUS_IGNORE, errflag); + MPI_STATUS_IGNORE, collattr | errflag); received = 1; MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -191,7 +191,8 @@ int MPIR_Reduce_scatter_intra_recursive_doubling(const void *sendbuf, void *recv && (dst >= tree_root + nprocs_completed)) { /* send the current result */ mpi_errno = MPIC_Send(tmp_recvbuf, 1, recvtype, - dst, MPIR_REDUCE_SCATTER_TAG, comm_ptr, errflag); + dst, MPIR_REDUCE_SCATTER_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } /* recv only if this proc. doesn't have data and sender @@ -200,7 +201,8 @@ int MPIR_Reduce_scatter_intra_recursive_doubling(const void *sendbuf, void *recv (dst < tree_root + nprocs_completed) && (rank >= tree_root + nprocs_completed)) { mpi_errno = MPIC_Recv(tmp_recvbuf, 1, recvtype, dst, - MPIR_REDUCE_SCATTER_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_REDUCE_SCATTER_TAG, comm_ptr, collattr, + MPI_STATUS_IGNORE); received = 1; MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c index dbfe56b017a..fb115a08d52 100644 --- a/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c +++ b/src/mpi/coll/reduce_scatter/reduce_scatter_intra_recursive_halving.c @@ -36,8 +36,7 @@ */ int MPIR_Reduce_scatter_intra_recursive_halving(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int rank, comm_size, i; MPI_Aint extent, true_extent, true_lb; @@ -45,6 +44,7 @@ int MPIR_Reduce_scatter_intra_recursive_halving(const void *sendbuf, void *recvb void *tmp_recvbuf, *tmp_results; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int total_count, dst; int mask; int rem, newdst, send_idx, recv_idx, last_idx, send_cnt, recv_cnt; @@ -115,7 +115,8 @@ int MPIR_Reduce_scatter_intra_recursive_halving(const void *sendbuf, void *recvb if (rank < 2 * rem) { if (rank % 2 == 0) { /* even */ mpi_errno = MPIC_Send(tmp_results, total_count, - datatype, rank + 1, MPIR_REDUCE_SCATTER_TAG, comm_ptr, errflag); + datatype, rank + 1, MPIR_REDUCE_SCATTER_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* temporarily set the rank to -1 so that this @@ -125,7 +126,7 @@ int MPIR_Reduce_scatter_intra_recursive_halving(const void *sendbuf, void *recvb } else { /* odd */ mpi_errno = MPIC_Recv(tmp_recvbuf, total_count, datatype, rank - 1, - MPIR_REDUCE_SCATTER_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_REDUCE_SCATTER_TAG, comm_ptr, collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* do the reduction on received data. since the @@ -202,17 +203,18 @@ int MPIR_Reduce_scatter_intra_recursive_halving(const void *sendbuf, void *recvb newdisps[recv_idx] * extent, recv_cnt, datatype, dst, MPIR_REDUCE_SCATTER_TAG, comm_ptr, - MPI_STATUS_IGNORE, errflag); + MPI_STATUS_IGNORE, collattr | errflag); else if ((send_cnt == 0) && (recv_cnt != 0)) mpi_errno = MPIC_Recv((char *) tmp_recvbuf + newdisps[recv_idx] * extent, recv_cnt, datatype, dst, - MPIR_REDUCE_SCATTER_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_REDUCE_SCATTER_TAG, comm_ptr, collattr, + MPI_STATUS_IGNORE); else if ((recv_cnt == 0) && (send_cnt != 0)) mpi_errno = MPIC_Send((char *) tmp_results + newdisps[send_idx] * extent, send_cnt, datatype, - dst, MPIR_REDUCE_SCATTER_TAG, comm_ptr, errflag); + dst, MPIR_REDUCE_SCATTER_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -252,14 +254,15 @@ int MPIR_Reduce_scatter_intra_recursive_halving(const void *sendbuf, void *recvb mpi_errno = MPIC_Send((char *) tmp_results + disps[rank - 1] * extent, recvcounts[rank - 1], datatype, rank - 1, - MPIR_REDUCE_SCATTER_TAG, comm_ptr, errflag); + MPIR_REDUCE_SCATTER_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } else { /* even */ if (recvcounts[rank]) { mpi_errno = MPIC_Recv(recvbuf, recvcounts[rank], datatype, rank + 1, - MPIR_REDUCE_SCATTER_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_REDUCE_SCATTER_TAG, comm_ptr, collattr, + MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c index 42a37790218..274e4398da7 100644 --- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c +++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_allcomm_nb.c @@ -7,14 +7,15 @@ int MPIR_Reduce_scatter_block_allcomm_nb(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; /* just call the nonblocking version and wait on it */ mpi_errno = - MPIR_Ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, &req_ptr); + MPIR_Ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, collattr, + &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c index 9c5a6a58b3d..de3b28277b6 100644 --- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c +++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_inter_remote_reduce_local_scatter.c @@ -17,11 +17,11 @@ int MPIR_Reduce_scatter_block_inter_remote_reduce_local_scatter(const void *send MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int rank, mpi_errno, root, local_size; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint true_extent, true_lb = 0, extent; void *tmp_buf = NULL; MPIR_Comm *newcomm_ptr = NULL; @@ -52,25 +52,25 @@ int MPIR_Reduce_scatter_block_inter_remote_reduce_local_scatter(const void *send /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Reduce_allcomm_auto(sendbuf, tmp_buf, total_count, datatype, op, - root, comm_ptr, errflag); + root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* reduce to rank 0 of right group */ root = 0; mpi_errno = MPIR_Reduce_allcomm_auto(sendbuf, tmp_buf, total_count, datatype, op, - root, comm_ptr, errflag); + root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* reduce to rank 0 of left group */ root = 0; mpi_errno = MPIR_Reduce_allcomm_auto(sendbuf, tmp_buf, total_count, datatype, op, - root, comm_ptr, errflag); + root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Reduce_allcomm_auto(sendbuf, tmp_buf, total_count, datatype, op, - root, comm_ptr, errflag); + root, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -81,7 +81,7 @@ int MPIR_Reduce_scatter_block_inter_remote_reduce_local_scatter(const void *send newcomm_ptr = comm_ptr->local_comm; mpi_errno = MPIR_Scatter(tmp_buf, recvcount, datatype, recvbuf, - recvcount, datatype, 0, newcomm_ptr, errflag); + recvcount, datatype, 0, newcomm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); fn_exit: diff --git a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c index f59b5f89493..7c8861a05f9 100644 --- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c +++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_noncommutative.c @@ -24,11 +24,11 @@ int MPIR_Reduce_scatter_block_intra_noncommutative(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, - MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int comm_size = comm_ptr->local_size; int rank = comm_ptr->rank; int log2_comm_size; @@ -100,7 +100,7 @@ int MPIR_Reduce_scatter_block_intra_noncommutative(const void *sendbuf, size, datatype, peer, MPIR_REDUCE_SCATTER_BLOCK_TAG, incoming_data + recv_offset * true_extent, size, datatype, peer, MPIR_REDUCE_SCATTER_BLOCK_TAG, - comm_ptr, MPI_STATUS_IGNORE, errflag); + comm_ptr, MPI_STATUS_IGNORE, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* always perform the reduction at recv_offset, the data at send_offset * is now our peer's responsibility */ diff --git a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c index d053d0740dd..f12dd4f3709 100644 --- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c +++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_pairwise.c @@ -24,14 +24,14 @@ int MPIR_Reduce_scatter_block_intra_pairwise(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, - MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int rank, comm_size, i; MPI_Aint extent, true_extent, true_lb; void *tmp_recvbuf; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int src, dst; MPIR_CHKLMEM_DECL(5); @@ -85,14 +85,14 @@ int MPIR_Reduce_scatter_block_intra_pairwise(const void *sendbuf, MPIR_REDUCE_SCATTER_BLOCK_TAG, tmp_recvbuf, recvcount, datatype, src, MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, - MPI_STATUS_IGNORE, errflag); + MPI_STATUS_IGNORE, collattr | errflag); else mpi_errno = MPIC_Sendrecv(((char *) recvbuf + disps[dst] * extent), recvcount, datatype, dst, MPIR_REDUCE_SCATTER_BLOCK_TAG, tmp_recvbuf, recvcount, datatype, src, MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, - MPI_STATUS_IGNORE, errflag); + MPI_STATUS_IGNORE, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); diff --git a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c index 2d6fcd10192..d2a073141e7 100644 --- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c +++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_doubling.c @@ -25,13 +25,14 @@ int MPIR_Reduce_scatter_block_intra_recursive_doubling(const void *sendbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int rank, comm_size, i; MPI_Aint extent, true_extent, true_lb; void *tmp_recvbuf, *tmp_results; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int dst; int mask, dst_tree_root, my_tree_root, j, k; int received; @@ -147,7 +148,7 @@ int MPIR_Reduce_scatter_block_intra_recursive_doubling(const void *sendbuf, MPIR_REDUCE_SCATTER_BLOCK_TAG, tmp_recvbuf, 1, recvtype, dst, MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, - MPI_STATUS_IGNORE, errflag); + MPI_STATUS_IGNORE, collattr | errflag); received = 1; MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -188,7 +189,8 @@ int MPIR_Reduce_scatter_block_intra_recursive_doubling(const void *sendbuf, && (dst >= tree_root + nprocs_completed)) { /* send the current result */ mpi_errno = MPIC_Send(tmp_recvbuf, 1, recvtype, - dst, MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, errflag); + dst, MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } /* recv only if this proc. doesn't have data and sender @@ -198,7 +200,7 @@ int MPIR_Reduce_scatter_block_intra_recursive_doubling(const void *sendbuf, (rank >= tree_root + nprocs_completed)) { mpi_errno = MPIC_Recv(tmp_recvbuf, 1, recvtype, dst, MPIR_REDUCE_SCATTER_BLOCK_TAG, - comm_ptr, MPI_STATUS_IGNORE); + comm_ptr, collattr, MPI_STATUS_IGNORE); received = 1; MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c index 8f0b7cd8d15..9fc87935099 100644 --- a/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c +++ b/src/mpi/coll/reduce_scatter_block/reduce_scatter_block_intra_recursive_halving.c @@ -39,14 +39,14 @@ int MPIR_Reduce_scatter_block_intra_recursive_halving(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, - MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int rank, comm_size, i; MPI_Aint extent, true_extent, true_lb; void *tmp_recvbuf, *tmp_results; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int dst; int mask; int rem, newdst, send_idx, recv_idx, last_idx; @@ -116,7 +116,7 @@ int MPIR_Reduce_scatter_block_intra_recursive_halving(const void *sendbuf, if (rank % 2 == 0) { /* even */ mpi_errno = MPIC_Send(tmp_results, total_count, datatype, rank + 1, - MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, errflag); + MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* temporarily set the rank to -1 so that this @@ -126,7 +126,8 @@ int MPIR_Reduce_scatter_block_intra_recursive_halving(const void *sendbuf, } else { /* odd */ mpi_errno = MPIC_Recv(tmp_recvbuf, total_count, datatype, rank - 1, - MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, collattr, + MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); /* do the reduction on received data. since the @@ -205,17 +206,19 @@ int MPIR_Reduce_scatter_block_intra_recursive_halving(const void *sendbuf, newdisps[recv_idx] * extent, recv_cnt, datatype, dst, MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, - MPI_STATUS_IGNORE, errflag); + MPI_STATUS_IGNORE, collattr | errflag); else if ((send_cnt == 0) && (recv_cnt != 0)) mpi_errno = MPIC_Recv((char *) tmp_recvbuf + newdisps[recv_idx] * extent, recv_cnt, datatype, dst, - MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, collattr, + MPI_STATUS_IGNORE); else if ((recv_cnt == 0) && (send_cnt != 0)) mpi_errno = MPIC_Send((char *) tmp_results + newdisps[send_idx] * extent, send_cnt, datatype, - dst, MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, errflag); + dst, MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); @@ -250,11 +253,12 @@ int MPIR_Reduce_scatter_block_intra_recursive_halving(const void *sendbuf, mpi_errno = MPIC_Send((char *) tmp_results + disps[rank - 1] * extent, recvcount, datatype, rank - 1, - MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, errflag); + MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, collattr | errflag); } else { /* even */ mpi_errno = MPIC_Recv(recvbuf, recvcount, datatype, rank + 1, - MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_REDUCE_SCATTER_BLOCK_TAG, comm_ptr, collattr, + MPI_STATUS_IGNORE); } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/scan/scan_allcomm_nb.c b/src/mpi/coll/scan/scan_allcomm_nb.c index 0528d599fa7..3c445a0db55 100644 --- a/src/mpi/coll/scan/scan_allcomm_nb.c +++ b/src/mpi/coll/scan/scan_allcomm_nb.c @@ -6,13 +6,13 @@ #include "mpiimpl.h" int MPIR_Scan_allcomm_nb(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; /* just call the nonblocking version and wait on it */ - mpi_errno = MPIR_Iscan(sendbuf, recvbuf, count, datatype, op, comm_ptr, &req_ptr); + mpi_errno = MPIR_Iscan(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/scan/scan_intra_recursive_doubling.c b/src/mpi/coll/scan/scan_intra_recursive_doubling.c index eac73f89f0b..a4235b70a8d 100644 --- a/src/mpi/coll/scan/scan_intra_recursive_doubling.c +++ b/src/mpi/coll/scan/scan_intra_recursive_doubling.c @@ -44,12 +44,13 @@ int MPIR_Scan_intra_recursive_doubling(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { MPI_Status status; int rank, comm_size; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int mask, dst, is_commutative; MPI_Aint true_extent, true_lb, extent; void *partial_scan, *tmp_buf; @@ -98,7 +99,7 @@ int MPIR_Scan_intra_recursive_doubling(const void *sendbuf, mpi_errno = MPIC_Sendrecv(partial_scan, count, datatype, dst, MPIR_SCAN_TAG, tmp_buf, count, datatype, dst, - MPIR_SCAN_TAG, comm_ptr, &status, errflag); + MPIR_SCAN_TAG, comm_ptr, &status, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (rank > dst) { diff --git a/src/mpi/coll/scan/scan_intra_smp.c b/src/mpi/coll/scan/scan_intra_smp.c index df2a3e89919..ed76618a430 100644 --- a/src/mpi/coll/scan/scan_intra_smp.c +++ b/src/mpi/coll/scan/scan_intra_smp.c @@ -7,11 +7,11 @@ int MPIR_Scan_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, - MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPIR_CHKLMEM_DECL(3); int rank = comm_ptr->rank; MPI_Status status; @@ -44,7 +44,9 @@ int MPIR_Scan_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, /* perform intranode scan to get temporary result in recvbuf. if there is only * one process, just copy the raw data. */ if (comm_ptr->node_comm != NULL) { - mpi_errno = MPIR_Scan(sendbuf, recvbuf, count, datatype, op, comm_ptr->node_comm, errflag); + mpi_errno = + MPIR_Scan(sendbuf, recvbuf, count, datatype, op, comm_ptr->node_comm, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (sendbuf != MPI_IN_PLACE) { mpi_errno = MPIR_Localcopy(sendbuf, count, datatype, recvbuf, count, datatype); @@ -58,13 +60,13 @@ int MPIR_Scan_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, if (comm_ptr->node_roots_comm != NULL && comm_ptr->node_comm != NULL) { mpi_errno = MPIC_Recv(localfulldata, count, datatype, comm_ptr->node_comm->local_size - 1, MPIR_SCAN_TAG, - comm_ptr->node_comm, &status); + comm_ptr->node_comm, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (comm_ptr->node_roots_comm == NULL && comm_ptr->node_comm != NULL && MPIR_Get_intranode_rank(comm_ptr, rank) == comm_ptr->node_comm->local_size - 1) { mpi_errno = MPIC_Send(recvbuf, count, datatype, - 0, MPIR_SCAN_TAG, comm_ptr->node_comm, errflag); + 0, MPIR_SCAN_TAG, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (comm_ptr->node_roots_comm != NULL) { localfulldata = recvbuf; @@ -76,19 +78,19 @@ int MPIR_Scan_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, * main process of node 3. */ if (comm_ptr->node_roots_comm != NULL) { mpi_errno = MPIR_Scan(localfulldata, prefulldata, count, datatype, - op, comm_ptr->node_roots_comm, errflag); + op, comm_ptr->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (MPIR_Get_internode_rank(comm_ptr, rank) != comm_ptr->node_roots_comm->local_size - 1) { mpi_errno = MPIC_Send(prefulldata, count, datatype, MPIR_Get_internode_rank(comm_ptr, rank) + 1, - MPIR_SCAN_TAG, comm_ptr->node_roots_comm, errflag); + MPIR_SCAN_TAG, comm_ptr->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } if (MPIR_Get_internode_rank(comm_ptr, rank) != 0) { mpi_errno = MPIC_Recv(tempbuf, count, datatype, MPIR_Get_internode_rank(comm_ptr, rank) - 1, - MPIR_SCAN_TAG, comm_ptr->node_roots_comm, &status); + MPIR_SCAN_TAG, comm_ptr->node_roots_comm, collattr, &status); noneed = 0; MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } @@ -101,13 +103,14 @@ int MPIR_Scan_intra_smp(const void *sendbuf, void *recvbuf, MPI_Aint count, * reduce it with recvbuf to get final result if necessary. */ if (comm_ptr->node_comm != NULL) { - mpi_errno = MPIR_Bcast(&noneed, 1, MPI_INT, 0, comm_ptr->node_comm, errflag); + mpi_errno = MPIR_Bcast(&noneed, 1, MPI_INT, 0, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } if (noneed == 0) { if (comm_ptr->node_comm != NULL) { - mpi_errno = MPIR_Bcast(tempbuf, count, datatype, 0, comm_ptr->node_comm, errflag); + mpi_errno = + MPIR_Bcast(tempbuf, count, datatype, 0, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/scatter/scatter_allcomm_nb.c b/src/mpi/coll/scatter/scatter_allcomm_nb.c index e344a0ed25c..b10a306bc43 100644 --- a/src/mpi/coll/scatter/scatter_allcomm_nb.c +++ b/src/mpi/coll/scatter/scatter_allcomm_nb.c @@ -7,7 +7,7 @@ int MPIR_Scatter_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; @@ -15,7 +15,7 @@ int MPIR_Scatter_allcomm_nb(const void *sendbuf, MPI_Aint sendcount, MPI_Datatyp /* just call the nonblocking version and wait on it */ mpi_errno = MPIR_Iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, - &req_ptr); + collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/scatter/scatter_inter_linear.c b/src/mpi/coll/scatter/scatter_inter_linear.c index 3cd99225591..eb7cd9584da 100644 --- a/src/mpi/coll/scatter/scatter_inter_linear.c +++ b/src/mpi/coll/scatter/scatter_inter_linear.c @@ -14,10 +14,11 @@ int MPIR_Scatter_inter_linear(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int remote_size, mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; int i; MPI_Status status; MPI_Aint extent; @@ -34,12 +35,13 @@ int MPIR_Scatter_inter_linear(const void *sendbuf, MPI_Aint sendcount, MPI_Datat for (i = 0; i < remote_size; i++) { mpi_errno = MPIC_Send(((char *) sendbuf + sendcount * i * extent), sendcount, sendtype, i, - MPIR_SCATTER_TAG, comm_ptr, errflag); + MPIR_SCATTER_TAG, comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } else { mpi_errno = - MPIC_Recv(recvbuf, recvcount, recvtype, root, MPIR_SCATTER_TAG, comm_ptr, &status); + MPIC_Recv(recvbuf, recvcount, recvtype, root, MPIR_SCATTER_TAG, comm_ptr, collattr, + &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c b/src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c index dadaec6d7b8..37cfe393e88 100644 --- a/src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c +++ b/src/mpi/coll/scatter/scatter_inter_remote_send_local_scatter.c @@ -16,11 +16,11 @@ int MPIR_Scatter_inter_remote_send_local_scatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { int rank, local_size, remote_size, mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Status status; MPIR_Comm *newcomm_ptr = NULL; MPIR_CHKLMEM_DECL(1); @@ -37,7 +37,7 @@ int MPIR_Scatter_inter_remote_send_local_scatter(const void *sendbuf, MPI_Aint s /* root sends all data to rank 0 on remote group and returns */ mpi_errno = MPIC_Send(sendbuf, sendcount * remote_size, sendtype, 0, MPIR_SCATTER_TAG, comm_ptr, - errflag); + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); goto fn_exit; } else { @@ -55,7 +55,7 @@ int MPIR_Scatter_inter_remote_send_local_scatter(const void *sendbuf, MPI_Aint s "tmp_buf", MPL_MEM_BUFFER); mpi_errno = MPIC_Recv(tmp_buf, recvcount * local_size * recvtype_sz, MPI_BYTE, - root, MPIR_SCATTER_TAG, comm_ptr, &status); + root, MPIR_SCATTER_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { /* silience -Wmaybe-uninitialized due to MPIR_Scatter by non-zero ranks */ @@ -70,7 +70,7 @@ int MPIR_Scatter_inter_remote_send_local_scatter(const void *sendbuf, MPI_Aint s /* now do the usual scatter on this intracommunicator */ mpi_errno = MPIR_Scatter(tmp_buf, recvcount * recvtype_sz, MPI_BYTE, - recvbuf, recvcount, recvtype, 0, newcomm_ptr, errflag); + recvbuf, recvcount, recvtype, 0, newcomm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } diff --git a/src/mpi/coll/scatter/scatter_intra_binomial.c b/src/mpi/coll/scatter/scatter_intra_binomial.c index 310fe805b15..61fcd749f02 100644 --- a/src/mpi/coll/scatter/scatter_intra_binomial.c +++ b/src/mpi/coll/scatter/scatter_intra_binomial.c @@ -28,7 +28,7 @@ /* not declared static because a machine-specific function may call this one in some cases */ int MPIR_Scatter_intra_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { MPI_Status status; MPI_Aint extent = 0; @@ -40,6 +40,7 @@ int MPIR_Scatter_intra_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Dat void *tmp_buf = NULL; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPIR_CHKLMEM_DECL(4); comm_size = comm_ptr->local_size; @@ -118,11 +119,11 @@ int MPIR_Scatter_intra_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Dat * receive data into a temporary buffer. */ if (relative_rank % 2) { mpi_errno = MPIC_Recv(recvbuf, recvcount, recvtype, - src, MPIR_SCATTER_TAG, comm_ptr, &status); + src, MPIR_SCATTER_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else { mpi_errno = MPIC_Recv(tmp_buf, tmp_buf_size, MPI_BYTE, src, - MPIR_SCATTER_TAG, comm_ptr, &status); + MPIR_SCATTER_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); if (mpi_errno) { curr_cnt = 0; @@ -154,14 +155,16 @@ int MPIR_Scatter_intra_binomial(const void *sendbuf, MPI_Aint sendcount, MPI_Dat mpi_errno = MPIC_Send(((char *) sendbuf + extent * sendcount * mask), send_subtree_cnt, - sendtype, dst, MPIR_SCATTER_TAG, comm_ptr, errflag); + sendtype, dst, MPIR_SCATTER_TAG, comm_ptr, + collattr | errflag); } else { /* non-zero root and others */ send_subtree_cnt = curr_cnt - nbytes * mask; /* mask is also the size of this process's subtree */ mpi_errno = MPIC_Send(((char *) tmp_buf + nbytes * mask), send_subtree_cnt, - MPI_BYTE, dst, MPIR_SCATTER_TAG, comm_ptr, errflag); + MPI_BYTE, dst, MPIR_SCATTER_TAG, comm_ptr, + collattr | errflag); } MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); curr_cnt -= send_subtree_cnt; diff --git a/src/mpi/coll/scatterv/scatterv_allcomm_linear.c b/src/mpi/coll/scatterv/scatterv_allcomm_linear.c index a1d7ebe36da..dead0f884d6 100644 --- a/src/mpi/coll/scatterv/scatterv_allcomm_linear.c +++ b/src/mpi/coll/scatterv/scatterv_allcomm_linear.c @@ -20,10 +20,11 @@ int MPIR_Scatterv_allcomm_linear(const void *sendbuf, const MPI_Aint * sendcounts, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int rank, comm_size, mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint extent; int i, reqs; MPIR_Request **reqarray; @@ -60,7 +61,8 @@ int MPIR_Scatterv_allcomm_linear(const void *sendbuf, const MPI_Aint * sendcount } else { mpi_errno = MPIC_Isend(((char *) sendbuf + displs[i] * extent), sendcounts[i], sendtype, i, - MPIR_SCATTERV_TAG, comm_ptr, &reqarray[reqs++], errflag); + MPIR_SCATTERV_TAG, comm_ptr, &reqarray[reqs++], + collattr | errflag); MPIR_ERR_CHECK(mpi_errno); } } @@ -73,7 +75,7 @@ int MPIR_Scatterv_allcomm_linear(const void *sendbuf, const MPI_Aint * sendcount else if (root != MPI_PROC_NULL) { /* non-root nodes, and in the intercomm. case, non-root nodes on remote side */ if (recvcount) { mpi_errno = MPIC_Recv(recvbuf, recvcount, recvtype, root, - MPIR_SCATTERV_TAG, comm_ptr, MPI_STATUS_IGNORE); + MPIR_SCATTERV_TAG, comm_ptr, collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpi/coll/scatterv/scatterv_allcomm_nb.c b/src/mpi/coll/scatterv/scatterv_allcomm_nb.c index 953bb60b819..fa5c227f6aa 100644 --- a/src/mpi/coll/scatterv/scatterv_allcomm_nb.c +++ b/src/mpi/coll/scatterv/scatterv_allcomm_nb.c @@ -8,7 +8,7 @@ int MPIR_Scatterv_allcomm_nb(const void *sendbuf, const MPI_Aint * sendcounts, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Request *req_ptr = NULL; @@ -16,7 +16,7 @@ int MPIR_Scatterv_allcomm_nb(const void *sendbuf, const MPI_Aint * sendcounts, /* just call the nonblocking version and wait on it */ mpi_errno = MPIR_Iscatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, - comm_ptr, &req_ptr); + comm_ptr, collattr, &req_ptr); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIC_Wait(req_ptr); diff --git a/src/mpi/coll/transports/gentran/gentran_types.h b/src/mpi/coll/transports/gentran/gentran_types.h index 63cb1770711..d1d5d1389b1 100644 --- a/src/mpi/coll/transports/gentran/gentran_types.h +++ b/src/mpi/coll/transports/gentran/gentran_types.h @@ -50,6 +50,7 @@ typedef struct MPII_Genutil_vtx_t { int dest; int tag; MPIR_Comm *comm; + int collattr; MPIR_Request *req; } isend; struct { @@ -59,6 +60,7 @@ typedef struct MPII_Genutil_vtx_t { int src; int tag; MPIR_Comm *comm; + int collattr; MPIR_Request *req; } irecv; struct { @@ -68,6 +70,7 @@ typedef struct MPII_Genutil_vtx_t { int src; int tag; MPIR_Comm *comm; + int collattr; MPIR_Request *req; MPI_Status *status; } irecv_status; @@ -79,6 +82,7 @@ typedef struct MPII_Genutil_vtx_t { int num_dests; int tag; MPIR_Comm *comm; + int collattr; MPIR_Request **req; int last_complete; } imcast; @@ -89,6 +93,7 @@ typedef struct MPII_Genutil_vtx_t { int dest; int tag; MPIR_Comm *comm; + int collattr; MPIR_Request *req; } issend; struct { diff --git a/src/mpi/coll/transports/gentran/gentran_utils.c b/src/mpi/coll/transports/gentran/gentran_utils.c index b19a40b7d50..30cc09bc168 100644 --- a/src/mpi/coll/transports/gentran/gentran_utils.c +++ b/src/mpi/coll/transports/gentran/gentran_utils.c @@ -75,7 +75,7 @@ static int vtx_issue(int vtxid, MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_t vtxp->u.irecv.count, vtxp->u.irecv.dt, vtxp->u.irecv.src, vtxp->u.irecv.tag, vtxp->u.irecv.comm, - &vtxp->u.irecv.req); + vtxp->u.irecv.collattr, &vtxp->u.irecv.req); if (MPIR_Request_is_complete(vtxp->u.irecv.req)) { MPIR_Request_free(vtxp->u.irecv.req); @@ -104,7 +104,8 @@ static int vtx_issue(int vtxid, MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_t vtxp->u.irecv_status.count, vtxp->u.irecv_status.dt, vtxp->u.irecv_status.src, vtxp->u.irecv_status.tag, - vtxp->u.irecv_status.comm, &vtxp->u.irecv_status.req); + vtxp->u.irecv_status.comm, + vtxp->u.irecv_status.collattr, &vtxp->u.irecv_status.req); if (MPIR_Request_is_complete(vtxp->u.irecv_status.req)) { if (vtxp->u.irecv_status.status != MPI_STATUS_IGNORE) { @@ -144,7 +145,7 @@ static int vtx_issue(int vtxid, MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_t vtxp->u.imcast.dt, dests[i], vtxp->u.imcast.tag, vtxp->u.imcast.comm, &vtxp->u.imcast.req[i], - r->u.nbc.errflag); + vtxp->u.imcast.collattr | r->u.nbc.errflag); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, @@ -160,7 +161,7 @@ static int vtx_issue(int vtxid, MPII_Genutil_vtx_t * vtxp, MPII_Genutil_sched_t vtxp->u.issend.dt, vtxp->u.issend.dest, vtxp->u.issend.tag, vtxp->u.issend.comm, &vtxp->u.issend.req, - r->u.nbc.errflag); + vtxp->u.issend.collattr | r->u.nbc.errflag); MPL_DBG_MSG_FMT(MPIR_DBG_COLL, VERBOSE, (MPL_DBG_FDEST, diff --git a/src/mpi/coll/transports/gentran/tsp_gentran.c b/src/mpi/coll/transports/gentran/tsp_gentran.c index eecb04791c0..1dd80c7f53d 100644 --- a/src/mpi/coll/transports/gentran/tsp_gentran.c +++ b/src/mpi/coll/transports/gentran/tsp_gentran.c @@ -191,8 +191,8 @@ int MPIR_TSP_sched_isend(const void *buf, MPI_Datatype dt, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_TSP_sched_t s, int n_in_vtcs, int *in_vtcs, - int *vtx_id) + MPIR_Comm * comm_ptr, int collattr, MPIR_TSP_sched_t s, int n_in_vtcs, + int *in_vtcs, int *vtx_id) { MPII_Genutil_sched_t *sched = s; vtx_t *vtxp; @@ -209,6 +209,7 @@ int MPIR_TSP_sched_isend(const void *buf, vtxp->u.isend.dest = dest; vtxp->u.isend.tag = tag; vtxp->u.isend.comm = comm_ptr; + vtxp->u.isend.collattr = collattr; /* the user may free the comm & type after initiating but before the * underlying send is actually posted, so we must add a reference here and @@ -228,8 +229,8 @@ int MPIR_TSP_sched_irecv(void *buf, MPI_Datatype dt, int source, int tag, - MPIR_Comm * comm_ptr, MPIR_TSP_sched_t s, int n_in_vtcs, int *in_vtcs, - int *vtx_id) + MPIR_Comm * comm_ptr, int collattr, MPIR_TSP_sched_t s, int n_in_vtcs, + int *in_vtcs, int *vtx_id) { MPII_Genutil_sched_t *sched = s; vtx_t *vtxp; @@ -247,6 +248,7 @@ int MPIR_TSP_sched_irecv(void *buf, vtxp->u.irecv.src = source; vtxp->u.irecv.tag = tag; vtxp->u.irecv.comm = comm_ptr; + vtxp->u.irecv.collattr = collattr; MPIR_Comm_add_ref(comm_ptr); MPIR_Datatype_add_ref_if_not_builtin(dt); @@ -262,7 +264,7 @@ int MPIR_TSP_sched_irecv_status(void *buf, MPI_Datatype dt, int source, int tag, - MPIR_Comm * comm_ptr, MPI_Status * status, + MPIR_Comm * comm_ptr, int collattr, MPI_Status * status, MPIR_TSP_sched_t sched, int n_in_vtcs, int *in_vtcs, int *vtx_id) { vtx_t *vtxp; @@ -282,6 +284,7 @@ int MPIR_TSP_sched_irecv_status(void *buf, vtxp->u.irecv_status.tag = tag; vtxp->u.irecv_status.comm = comm_ptr; vtxp->u.irecv_status.status = status; + vtxp->u.irecv_status.collattr = collattr; MPIR_Comm_add_ref(comm_ptr); MPIR_Datatype_add_ref_if_not_builtin(dt); @@ -300,8 +303,8 @@ int MPIR_TSP_sched_imcast(const void *buf, int *dests, int num_dests, int tag, - MPIR_Comm * comm_ptr, MPIR_TSP_sched_t s, int n_in_vtcs, int *in_vtcs, - int *vtx_id) + MPIR_Comm * comm_ptr, int collattr, MPIR_TSP_sched_t s, int n_in_vtcs, + int *in_vtcs, int *vtx_id) { MPII_Genutil_sched_t *sched = s; vtx_t *vtxp; @@ -321,6 +324,7 @@ int MPIR_TSP_sched_imcast(const void *buf, memcpy(ut_int_array(&vtxp->u.imcast.dests), dests, num_dests * sizeof(int)); vtxp->u.imcast.tag = tag; vtxp->u.imcast.comm = comm_ptr; + vtxp->u.imcast.collattr = collattr; vtxp->u.imcast.req = (struct MPIR_Request **) MPL_malloc(sizeof(struct MPIR_Request *) * num_dests, MPL_MEM_COLL); @@ -339,8 +343,8 @@ int MPIR_TSP_sched_issend(const void *buf, MPI_Datatype dt, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_TSP_sched_t s, int n_in_vtcs, int *in_vtcs, - int *vtx_id) + MPIR_Comm * comm_ptr, int collattr, MPIR_TSP_sched_t s, int n_in_vtcs, + int *in_vtcs, int *vtx_id) { MPII_Genutil_sched_t *sched = s; vtx_t *vtxp; @@ -357,6 +361,7 @@ int MPIR_TSP_sched_issend(const void *buf, vtxp->u.issend.dest = dest; vtxp->u.issend.tag = tag; vtxp->u.issend.comm = comm_ptr; + vtxp->u.issend.collattr = collattr; MPIR_Comm_add_ref(comm_ptr); MPIR_Datatype_add_ref_if_not_builtin(dt); diff --git a/src/mpi/coll/transports/tsp_impl.h b/src/mpi/coll/transports/tsp_impl.h index 4204637376e..1ac8b145a90 100644 --- a/src/mpi/coll/transports/tsp_impl.h +++ b/src/mpi/coll/transports/tsp_impl.h @@ -49,8 +49,8 @@ int MPIR_TSP_sched_isend(const void *buf, MPI_Datatype dt, int dest, int tag, - MPIR_Comm * comm_ptr, MPIR_TSP_sched_t sched, int n_in_vtcs, int *in_vtcs, - int *vtx_id); + MPIR_Comm * comm_ptr, int collattr, + MPIR_TSP_sched_t sched, int n_in_vtcs, int *in_vtcs, int *vtx_id); /* Transport function to schedule a issend vertex */ int MPIR_TSP_sched_issend(const void *buf, @@ -58,7 +58,7 @@ int MPIR_TSP_sched_issend(const void *buf, MPI_Datatype dt, int dest, int tag, - MPIR_Comm * comm_ptr, + MPIR_Comm * comm_ptr, int collattr, MPIR_TSP_sched_t sched, int n_in_vtcs, int *in_vtcs, int *vtx_id); /* Transport function to schedule an irecv vertex */ @@ -67,8 +67,8 @@ int MPIR_TSP_sched_irecv(void *buf, MPI_Datatype dt, int source, int tag, - MPIR_Comm * comm_ptr, MPIR_TSP_sched_t sched, int n_in_vtcs, int *in_vtcs, - int *vtx_id); + MPIR_Comm * comm_ptr, int collattr, + MPIR_TSP_sched_t sched, int n_in_vtcs, int *in_vtcs, int *vtx_id); /* Transport function to schedule a irecv with status vertex */ int MPIR_TSP_sched_irecv_status(void *buf, @@ -76,7 +76,7 @@ int MPIR_TSP_sched_irecv_status(void *buf, MPI_Datatype dt, int source, int tag, - MPIR_Comm * comm_ptr, MPI_Status * status, + MPIR_Comm * comm_ptr, int collattr, MPI_Status * status, MPIR_TSP_sched_t sched, int n_in_vtcs, int *in_vtcs, int *vtx_id); /* Transport function to schedule an imcast vertex */ @@ -86,7 +86,7 @@ int MPIR_TSP_sched_imcast(const void *buf, int *dests, int num_dests, int tag, - MPIR_Comm * comm_ptr, + MPIR_Comm * comm_ptr, int collattr, MPIR_TSP_sched_t sched, int n_in_vtcs, int *in_vtcs, int *vtx_id); diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c index 922f93d37e7..0a0305c8c1e 100644 --- a/src/mpi/comm/commutil.c +++ b/src/mpi/comm/commutil.c @@ -288,6 +288,7 @@ int MPII_Comm_init(MPIR_Comm * comm_p) comm_p->hierarchy_kind = MPIR_COMM_HIERARCHY_KIND__FLAT; comm_p->node_comm = NULL; comm_p->node_roots_comm = NULL; + comm_p->subcomm_depth = 0; comm_p->intranode_table = NULL; comm_p->internode_table = NULL; @@ -699,6 +700,18 @@ int MPIR_Comm_create_subcomms(MPIR_Comm * comm) comm->hierarchy_kind = MPIR_COMM_HIERARCHY_KIND__PARENT; + /* create new lightweight subcomms */ + comm->subcomm_depth = 1; + comm->child_subcomm[0].size = num_local; + comm->child_subcomm[0].rank = local_rank; + comm->child_subcomm[0].ranklist = local_procs; + local_procs = NULL; + + comm->roots_subcomm[0].size = num_external; + comm->roots_subcomm[0].rank = external_rank; + comm->roots_subcomm[0].ranklist = external_procs; + external_procs = NULL; + fn_exit: MPL_free(local_procs); MPL_free(external_procs); @@ -818,7 +831,7 @@ int MPIR_Comm_commit(MPIR_Comm * comm) collective communication, for example. */ int MPIR_Comm_is_parent_comm(MPIR_Comm * comm) { - return (comm->hierarchy_kind == MPIR_COMM_HIERARCHY_KIND__PARENT); + return (comm->subcomm_depth > 0); } /* Returns true if the communicator is node-aware and processes in all the nodes @@ -1174,6 +1187,10 @@ int MPIR_Comm_delete_internal(MPIR_Comm * comm_ptr) MPIR_Comm_release(comm_ptr->node_comm); if (comm_ptr->node_roots_comm) MPIR_Comm_release(comm_ptr->node_roots_comm); + for (int i = 0; i < comm_ptr->subcomm_depth; i++) { + MPL_free(comm_ptr->child_subcomm[i].ranklist); + MPL_free(comm_ptr->roots_subcomm[i].ranklist); + } MPL_free(comm_ptr->intranode_table); MPL_free(comm_ptr->internode_table); diff --git a/src/mpi/comm/contextid.c b/src/mpi/comm/contextid.c index 56f0fae5f64..f5eec6a5e33 100644 --- a/src/mpi/comm/contextid.c +++ b/src/mpi/comm/contextid.c @@ -651,18 +651,18 @@ static int sched_cb_gcn_bcast(MPIR_Comm * comm, int tag, void *state) if (st->comm_ptr_inter->rank == 0) { mpi_errno = MPIR_Sched_recv(st->ctx1, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, st->comm_ptr_inter, - st->s); + MPIR_COLL_ATTR_NONE, st->s); MPIR_ERR_CHECK(mpi_errno); mpi_errno = MPIR_Sched_send(st->ctx0, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, st->comm_ptr_inter, - st->s); + MPIR_COLL_ATTR_NONE, st->s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(st->s); } mpi_errno = MPIR_Ibcast_intra_sched_auto(st->ctx1, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, st->comm_ptr, - st->s); + MPIR_COLL_ATTR_NONE, st->s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(st->s); } @@ -844,7 +844,7 @@ static int sched_cb_gcn_copy_mask(MPIR_Comm * comm, int tag, void *state) mpi_errno = MPIR_Iallreduce_intra_sched_auto(MPI_IN_PLACE, st->local_mask, MPIR_MAX_CONTEXT_MASK + 1, MPI_UINT32_T, MPI_BAND, - st->comm_ptr, st->s); + st->comm_ptr, MPIR_COLL_ATTR_NONE, st->s); MPIR_ERR_CHECK(mpi_errno); MPIR_SCHED_BARRIER(st->s); diff --git a/src/mpi/topo/dist_graph_create.c b/src/mpi/topo/dist_graph_create.c index ffe9c27c850..d848f0faf6f 100644 --- a/src/mpi/topo/dist_graph_create.c +++ b/src/mpi/topo/dist_graph_create.c @@ -150,14 +150,14 @@ int MPIR_Dist_graph_create_impl(MPIR_Comm * comm_ptr, /* send edges where i is a destination to process i */ mpi_errno = MPIC_Isend(&rin[i][0], rin_sizes[i], MPI_INT, i, MPIR_TOPO_A_TAG, comm_ptr, - &reqs[idx++], MPIR_ERR_NONE); + &reqs[idx++], MPIR_COLL_ATTR_NONE); MPIR_ERR_CHECK(mpi_errno); } if (rout_sizes[i]) { /* send edges where i is a source to process i */ mpi_errno = MPIC_Isend(&rout[i][0], rout_sizes[i], MPI_INT, i, MPIR_TOPO_B_TAG, comm_ptr, - &reqs[idx++], MPIR_ERR_NONE); + &reqs[idx++], MPIR_COLL_ATTR_NONE); MPIR_ERR_CHECK(mpi_errno); } } @@ -203,7 +203,7 @@ int MPIR_Dist_graph_create_impl(MPIR_Comm * comm_ptr, MPIR_ERR_CHKANDJUMP(!buf, mpi_errno, MPI_ERR_OTHER, "**nomem"); mpi_errno = MPIC_Recv(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_A_TAG, - comm_ptr, MPI_STATUS_IGNORE); + comm_ptr, MPIR_COLL_ATTR_NONE, MPI_STATUS_IGNORE); MPIR_ERR_CHECK(mpi_errno); for (int j = 0; j < count / 2; ++j) { @@ -236,7 +236,7 @@ int MPIR_Dist_graph_create_impl(MPIR_Comm * comm_ptr, MPIR_ERR_CHKANDJUMP(!buf, mpi_errno, MPI_ERR_OTHER, "**nomem"); mpi_errno = MPIC_Recv(buf, count, MPI_INT, MPI_ANY_SOURCE, MPIR_TOPO_B_TAG, - comm_ptr, MPI_STATUS_IGNORE); + comm_ptr, MPIR_COLL_ATTR_NONE, MPI_STATUS_IGNORE); MPIR_ERR_CHECK(mpi_errno); for (int j = 0; j < count / 2; ++j) { diff --git a/src/mpid/ch3/include/mpid_coll.h b/src/mpid/ch3/include/mpid_coll.h index 7de2103a3f9..d7eadad63d1 100644 --- a/src/mpid/ch3/include/mpid_coll.h +++ b/src/mpid/ch3/include/mpid_coll.h @@ -11,39 +11,39 @@ #include "../../common/hcoll/hcoll.h" #endif -static inline int MPID_Barrier(MPIR_Comm * comm, MPIR_Errflag_t errflag) +static inline int MPID_Barrier(MPIR_Comm * comm, int collattr) { #ifdef HAVE_HCOLL if (MPI_SUCCESS == hcoll_Barrier(comm, errflag)) return MPI_SUCCESS; #endif - return MPIR_Barrier_impl(comm, errflag); + return MPIR_Barrier_impl(comm, collattr); } static inline int MPID_Bcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { #ifdef HAVE_HCOLL if (MPI_SUCCESS == hcoll_Bcast(buffer, count, datatype, root, comm, errflag)) return MPI_SUCCESS; #endif - return MPIR_Bcast_impl(buffer, count, datatype, root, comm, errflag); + return MPIR_Bcast_impl(buffer, count, datatype, root, comm, collattr); } static inline int MPID_Allreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { #ifdef HAVE_HCOLL if (MPI_SUCCESS == hcoll_Allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag)) return MPI_SUCCESS; #endif - return MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + return MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); } static inline int MPID_Allgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { #ifdef HAVE_HCOLL if (MPI_SUCCESS == hcoll_Allgather(sendbuf, sendcount, sendtype, recvbuf, @@ -51,30 +51,30 @@ static inline int MPID_Allgather(const void *sendbuf, MPI_Aint sendcount, MPI_Da return MPI_SUCCESS; #endif return MPIR_Allgather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, errflag); + recvcount, recvtype, comm, collattr); } static inline int MPID_Allgatherv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, - MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Allgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, - errflag); + collattr); return mpi_errno; } static inline int MPID_Scatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Scatter_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, errflag); + recvcount, recvtype, root, comm, collattr); return mpi_errno; } @@ -82,25 +82,25 @@ static inline int MPID_Scatter(const void *sendbuf, MPI_Aint sendcount, MPI_Data static inline int MPID_Scatterv(const void *sendbuf, const MPI_Aint * sendcounts, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Scatterv_impl(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, - errflag); + collattr); return mpi_errno; } static inline int MPID_Gather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Gather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, errflag); + recvcount, recvtype, root, comm, collattr); return mpi_errno; } @@ -108,25 +108,25 @@ static inline int MPID_Gather(const void *sendbuf, MPI_Aint sendcount, MPI_Datat static inline int MPID_Gatherv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Gatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, - errflag); + collattr); return mpi_errno; } static inline int MPID_Alltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, errflag); + recvcount, recvtype, comm, collattr); return mpi_errno; } @@ -134,13 +134,13 @@ static inline int MPID_Alltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Dat static inline int MPID_Alltoallv(const void *sendbuf, const MPI_Aint * sendcounts, const MPI_Aint * sdispls, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, - comm, errflag); + comm, collattr); return mpi_errno; } @@ -149,37 +149,37 @@ static inline int MPID_Alltoallw(const void *sendbuf, const MPI_Aint sendcounts[ const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, - comm_ptr, errflag); + comm_ptr, collattr); return mpi_errno; } static inline int MPID_Reduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, - comm, errflag); + comm, collattr); return mpi_errno; } static inline int MPID_Reduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, - datatype, op, comm_ptr, errflag); + datatype, op, comm_ptr, collattr); return mpi_errno; } @@ -187,37 +187,37 @@ static inline int MPID_Reduce_scatter(const void *sendbuf, void *recvbuf, const static inline int MPID_Reduce_scatter_block(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, - errflag); + collattr); return mpi_errno; } static inline int MPID_Scan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm, - errflag); + collattr); return mpi_errno; } static inline int MPID_Exscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm, - errflag); + collattr); return mpi_errno; } @@ -366,70 +366,70 @@ static inline int MPID_Ineighbor_alltoallw(const void *sendbuf, const MPI_Aint s return mpi_errno; } -static inline int MPID_Ibarrier(MPIR_Comm * comm, MPIR_Request **request) +static inline int MPID_Ibarrier(MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; - mpi_errno = MPIR_Ibarrier_impl(comm, request); + mpi_errno = MPIR_Ibarrier_impl(comm, collattr, request); return mpi_errno; } static inline int MPID_Ibcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm, MPIR_Request **request) + MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; - mpi_errno = MPIR_Ibcast_impl(buffer, count, datatype, root, comm, request); + mpi_errno = MPIR_Ibcast_impl(buffer, count, datatype, root, comm, collattr, request); return mpi_errno; } static inline int MPID_Iallgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request **request) + MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iallgather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, request); + recvcount, recvtype, comm, collattr, request); return mpi_errno; } static inline int MPID_Iallgatherv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, - MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Request **request) + MPI_Datatype recvtype, MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iallgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, - request); + collattr, request); return mpi_errno; } static inline int MPID_Iallreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request **request) + int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iallreduce_impl(sendbuf, recvbuf, count, datatype, op, - comm, request); + comm, collattr, request); return mpi_errno; } static inline int MPID_Ialltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request **request) + MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ialltoall_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, request); + recvcount, recvtype, comm, collattr, request); return mpi_errno; } @@ -438,13 +438,13 @@ static inline int MPID_Ialltoallv(const void *sendbuf, const MPI_Aint sendcounts const MPI_Aint sdispls[], MPI_Datatype sendtype, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request **request) + MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ialltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, - comm, request); + comm, collattr, request); return mpi_errno; } @@ -453,37 +453,37 @@ static inline int MPID_Ialltoallw(const void *sendbuf, const MPI_Aint sendcounts const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm, MPIR_Request **request) + MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ialltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, - comm, request); + comm, collattr, request); return mpi_errno; } static inline int MPID_Iexscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request **request) + int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iexscan_impl(sendbuf, recvbuf, count, datatype, op, comm, - request); + collattr, request); return mpi_errno; } static inline int MPID_Igather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Request **request) + int root, MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Igather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, request); + recvcount, recvtype, root, comm, collattr, request); return mpi_errno; } @@ -491,71 +491,71 @@ static inline int MPID_Igather(const void *sendbuf, MPI_Aint sendcount, MPI_Data static inline int MPID_Igatherv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Request **request) + int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Igatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, - request); + collattr, request); return mpi_errno; } static inline int MPID_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request **request) + int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ireduce_scatter_block_impl(sendbuf, recvbuf, recvcount, - datatype, op, comm, request); + datatype, op, comm, collattr, request); return mpi_errno; } static inline int MPID_Ireduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request **request) + int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ireduce_scatter_impl(sendbuf, recvbuf, recvcounts, - datatype, op, comm, request); + datatype, op, comm, collattr, request); return mpi_errno; } static inline int MPID_Ireduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, int root, MPIR_Comm * comm, MPIR_Request **request) + MPI_Op op, int root, MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ireduce_impl(sendbuf, recvbuf, count, datatype, op, root, - comm, request); + comm, collattr, request); return mpi_errno; } static inline int MPID_Iscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm, MPIR_Request **request) + MPI_Op op, MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iscan_impl(sendbuf, recvbuf, count, datatype, op, comm, - request); + collattr, request); return mpi_errno; } static inline int MPID_Iscatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Request **request) + int root, MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iscatter_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, request); + recvcount, recvtype, root, comm, collattr, request); return mpi_errno; } @@ -563,13 +563,13 @@ static inline int MPID_Iscatter(const void *sendbuf, MPI_Aint sendcount, MPI_Dat static inline int MPID_Iscatterv(const void *sendbuf, const MPI_Aint * sendcounts, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Request **request) + int root, MPIR_Comm * comm, int collattr, MPIR_Request **request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iscatterv_impl(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, - request); + collattr, request); return mpi_errno; } diff --git a/src/mpid/ch3/src/ch3u_port.c b/src/mpid/ch3/src/ch3u_port.c index 3ef43d48aab..379a1acb21f 100644 --- a/src/mpid/ch3/src/ch3u_port.c +++ b/src/mpid/ch3/src/ch3u_port.c @@ -647,7 +647,7 @@ int MPIDI_Comm_connect(const char *port_name, MPIR_Info *info, int root, mpi_errno = MPIC_Sendrecv(send_ints, 3, MPI_INT, 0, sendtag++, recv_ints, 3, MPI_INT, 0, recvtag++, tmp_comm, - MPI_STATUS_IGNORE, MPIR_ERR_NONE); + MPI_STATUS_IGNORE, MPIR_COLL_ATTR_NONE); if (mpi_errno != MPI_SUCCESS) { /* this is a no_port error because we may fail to connect on the send if the port name is invalid */ @@ -690,7 +690,7 @@ int MPIDI_Comm_connect(const char *port_name, MPIR_Info *info, int root, MPI_INT, 0, sendtag++, remote_translation, remote_comm_size * 2, MPI_INT, 0, recvtag++, tmp_comm, - MPI_STATUS_IGNORE, MPIR_ERR_NONE); + MPI_STATUS_IGNORE, MPIR_COLL_ATTR_NONE); MPIR_ERR_CHECK(mpi_errno); #ifdef MPICH_DBG_OUTPUT @@ -741,7 +741,7 @@ int MPIDI_Comm_connect(const char *port_name, MPIR_Info *info, int root, mpi_errno = MPIC_Sendrecv(&i, 0, MPI_INT, 0, sendtag++, &j, 0, MPI_INT, 0, recvtag++, tmp_comm, - MPI_STATUS_IGNORE, MPIR_ERR_NONE); + MPI_STATUS_IGNORE, MPIR_COLL_ATTR_NONE); MPIR_ERR_CHECK(mpi_errno); /* All communication with remote root done. Release the communicator. */ @@ -928,7 +928,7 @@ static int ReceivePGAndDistribute( MPIR_Comm *tmp_comm, MPIR_Comm *comm_ptr, if (rank == root) { /* First, receive the pg description from the partner */ mpi_errno = MPIC_Recv(&j, 1, MPI_INT, 0, recvtag++, - tmp_comm, MPI_STATUS_IGNORE); + tmp_comm, MPIR_COLL_ATTR_NONE, MPI_STATUS_IGNORE); *recvtag_p = recvtag; MPIR_ERR_CHECK(mpi_errno); pg_str = (char*)MPL_malloc(j, MPL_MEM_DYNAMIC); @@ -936,7 +936,7 @@ static int ReceivePGAndDistribute( MPIR_Comm *tmp_comm, MPIR_Comm *comm_ptr, MPIR_ERR_POP(mpi_errno); } mpi_errno = MPIC_Recv(pg_str, j, MPI_CHAR, 0, recvtag++, - tmp_comm, MPI_STATUS_IGNORE); + tmp_comm, MPIR_COLL_ATTR_NONE, MPI_STATUS_IGNORE); *recvtag_p = recvtag; MPIR_ERR_CHECK(mpi_errno); } @@ -1083,13 +1083,13 @@ static int SendPGtoPeerAndFree( MPIR_Comm *tmp_comm, int *sendtag_p, pg_iter = pg_list; i = pg_iter->lenStr; /*printf("connect:sending 1 int: %d\n", i);fflush(stdout);*/ - mpi_errno = MPIC_Send(&i, 1, MPI_INT, 0, sendtag++, tmp_comm, MPIR_ERR_NONE); + mpi_errno = MPIC_Send(&i, 1, MPI_INT, 0, sendtag++, tmp_comm, MPIR_COLL_ATTR_NONE); *sendtag_p = sendtag; MPIR_ERR_CHECK(mpi_errno); /* printf("connect:sending string length %d\n", i);fflush(stdout); */ mpi_errno = MPIC_Send(pg_iter->str, i, MPI_CHAR, 0, sendtag++, - tmp_comm, MPIR_ERR_NONE); + tmp_comm, MPIR_COLL_ATTR_NONE); *sendtag_p = sendtag; MPIR_ERR_CHECK(mpi_errno); @@ -1183,7 +1183,7 @@ int MPIDI_Comm_accept(const char *port_name, MPIR_Info *info, int root, mpi_errno = MPIC_Sendrecv(send_ints, 3, MPI_INT, 0, sendtag++, recv_ints, 3, MPI_INT, 0, recvtag++, tmp_comm, - MPI_STATUS_IGNORE, MPIR_ERR_NONE); + MPI_STATUS_IGNORE, MPIR_COLL_ATTR_NONE); MPIR_ERR_CHECK(mpi_errno); } @@ -1222,7 +1222,7 @@ int MPIDI_Comm_accept(const char *port_name, MPIR_Info *info, int root, MPI_INT, 0, sendtag++, remote_translation, remote_comm_size * 2, MPI_INT, 0, recvtag++, tmp_comm, - MPI_STATUS_IGNORE, MPIR_ERR_NONE); + MPI_STATUS_IGNORE, MPIR_COLL_ATTR_NONE); MPIR_ERR_CHECK(mpi_errno); #ifdef MPICH_DBG_OUTPUT @@ -1272,7 +1272,7 @@ int MPIDI_Comm_accept(const char *port_name, MPIR_Info *info, int root, mpi_errno = MPIC_Sendrecv(&i, 0, MPI_INT, 0, sendtag++, &j, 0, MPI_INT, 0, recvtag++, tmp_comm, - MPI_STATUS_IGNORE, MPIR_ERR_NONE); + MPI_STATUS_IGNORE, MPIR_COLL_ATTR_NONE); MPIR_ERR_CHECK(mpi_errno); /* All communication with remote root done. Release the communicator. */ diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c index 311f863cffa..7046820cbb4 100644 --- a/src/mpid/ch3/src/ch3u_rma_sync.c +++ b/src/mpid/ch3/src/ch3u_rma_sync.c @@ -493,7 +493,7 @@ int MPID_Win_fence(int assert, MPIR_Win * win_ptr) MPIR_ERR_CHECK(mpi_errno); } - mpi_errno = MPIR_Ibarrier(win_ptr->comm_ptr, &fence_sync_req_ptr); + mpi_errno = MPIR_Ibarrier(win_ptr->comm_ptr, MPIR_COLL_ATTR_NONE, &fence_sync_req_ptr); MPIR_ERR_CHECK(mpi_errno); if (fence_sync_req_ptr == NULL) { @@ -604,7 +604,7 @@ int MPID_Win_fence(int assert, MPIR_Win * win_ptr) MPIR_Request* fence_sync_req_ptr; /* Prepare for the next possible epoch */ - mpi_errno = MPIR_Ibarrier(win_ptr->comm_ptr, &fence_sync_req_ptr); + mpi_errno = MPIR_Ibarrier(win_ptr->comm_ptr, MPIR_COLL_ATTR_NONE, &fence_sync_req_ptr); MPIR_ERR_CHECK(mpi_errno); if (fence_sync_req_ptr == NULL) { diff --git a/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c b/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c index 0c1ed9377c2..2f19e6b1c8f 100644 --- a/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c +++ b/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c @@ -107,7 +107,7 @@ int MPID_Comm_get_all_failed_procs(MPIR_Comm *comm_ptr, MPIR_Group **failed_grou for (i = 1; i < comm_ptr->local_size; i++) { /* Get everyone's list of failed processes to aggregate */ ret_errno = MPIC_Recv(remote_bitarray, bitarray_size, MPI_INT, - i, tag, comm_ptr, MPI_STATUS_IGNORE); + i, tag, comm_ptr, MPIR_COLL_ATTR_NONE, MPI_STATUS_IGNORE); if (ret_errno) continue; /* Combine the received bitarray with my own */ @@ -121,7 +121,7 @@ int MPID_Comm_get_all_failed_procs(MPIR_Comm *comm_ptr, MPIR_Group **failed_grou for (i = 1; i < comm_ptr->local_size; i++) { /* Send the list to each rank to be processed locally */ ret_errno = MPIC_Send(bitarray, bitarray_size, MPI_INT, i, - tag, comm_ptr, MPIR_ERR_NONE); + tag, comm_ptr, MPIR_COLL_ATTR_NONE); if (ret_errno) continue; } @@ -130,11 +130,11 @@ int MPID_Comm_get_all_failed_procs(MPIR_Comm *comm_ptr, MPIR_Group **failed_grou } else { /* Send my bitarray to rank 0 */ mpi_errno = MPIC_Send(bitarray, bitarray_size, MPI_INT, 0, - tag, comm_ptr, MPIR_ERR_NONE); + tag, comm_ptr, MPIR_COLL_ATTR_NONE); /* Get the resulting bitarray back from rank 0 */ mpi_errno = MPIC_Recv(remote_bitarray, bitarray_size, MPI_INT, 0, - tag, comm_ptr, MPI_STATUS_IGNORE); + tag, comm_ptr, MPIR_COLL_ATTR_NONE, MPI_STATUS_IGNORE); /* Convert the bitarray into a group */ *failed_group = bitarray_to_group(comm_ptr, remote_bitarray); diff --git a/src/mpid/ch4/ch4_api.txt b/src/mpid/ch4/ch4_api.txt index 1ded2f6ff98..f1d5f6ee9d4 100644 --- a/src/mpid/ch4/ch4_api.txt +++ b/src/mpid/ch4/ch4_api.txt @@ -272,56 +272,56 @@ Native API: rank_is_local : int NM*: target, comm mpi_barrier : int - NM*: comm, errflag - SHM*: comm, errflag + NM*: comm, collattr + SHM*: comm, collattr mpi_bcast : int - NM*: buffer, count, datatype, root, comm, errflag - SHM*: buffer, count, datatype, root, comm, errflag + NM*: buffer, count, datatype, root, comm, collattr + SHM*: buffer, count, datatype, root, comm, collattr mpi_allreduce : int - NM*: sendbuf, recvbuf, count, datatype, op, comm, errflag - SHM*: sendbuf, recvbuf, count, datatype, op, comm, errflag + NM*: sendbuf, recvbuf, count, datatype, op, comm, collattr + SHM*: sendbuf, recvbuf, count, datatype, op, comm, collattr mpi_allgather : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, errflag - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, errflag + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, collattr + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, collattr mpi_allgatherv : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, errflag - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, errflag + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, collattr + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, collattr mpi_scatter : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, errflag - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, errflag + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, collattr + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, collattr mpi_scatterv : int - NM*: sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, errflag - SHM*: sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, errflag + NM*: sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, collattr + SHM*: sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, collattr mpi_gather : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, errflag - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, errflag + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, collattr + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, collattr mpi_gatherv : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, errflag - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, errflag + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, collattr + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, collattr mpi_alltoall : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, errflag - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, errflag + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, collattr + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, collattr mpi_alltoallv : int - NM*: sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, errflag - SHM*: sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, errflag + NM*: sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, collattr + SHM*: sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, collattr mpi_alltoallw : int - NM*: sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, errflag - SHM*: sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, errflag + NM*: sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, collattr + SHM*: sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, collattr mpi_reduce : int - NM*: sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag - SHM*: sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag + NM*: sendbuf, recvbuf, count, datatype, op, root, comm_ptr, collattr + SHM*: sendbuf, recvbuf, count, datatype, op, root, comm_ptr, collattr mpi_reduce_scatter : int - NM*: sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag - SHM*: sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag + NM*: sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, collattr + SHM*: sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, collattr mpi_reduce_scatter_block : int - NM*: sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, errflag - SHM*: sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, errflag + NM*: sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, collattr + SHM*: sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, collattr mpi_scan : int - NM*: sendbuf, recvbuf, count, datatype, op, comm, errflag - SHM*: sendbuf, recvbuf, count, datatype, op, comm, errflag + NM*: sendbuf, recvbuf, count, datatype, op, comm, collattr + SHM*: sendbuf, recvbuf, count, datatype, op, comm, collattr mpi_exscan : int - NM*: sendbuf, recvbuf, count, datatype, op, comm, errflag - SHM*: sendbuf, recvbuf, count, datatype, op, comm, errflag + NM*: sendbuf, recvbuf, count, datatype, op, comm, collattr + SHM*: sendbuf, recvbuf, count, datatype, op, comm, collattr mpi_neighbor_allgather : int NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm @@ -353,56 +353,56 @@ Native API: NM*: sendbuf, sendcounts, sdispls-2, sendtypes, recvbuf, recvcounts, rdispls-2, recvtypes, comm, req_p SHM*: sendbuf, sendcounts, sdispls-2, sendtypes, recvbuf, recvcounts, rdispls-2, recvtypes, comm, req_p mpi_ibarrier : int - NM*: comm, req_p - SHM*: comm, req_p + NM*: comm, collattr, req_p + SHM*: comm, collattr, req_p mpi_ibcast : int - NM*: buffer, count, datatype, root, comm, req_p - SHM*: buffer, count, datatype, root, comm, req_p + NM*: buffer, count, datatype, root, comm, collattr, req_p + SHM*: buffer, count, datatype, root, comm, collattr, req_p mpi_iallgather : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, req_p - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, req_p + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, collattr, req_p + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, collattr, req_p mpi_iallgatherv : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, req_p - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, req_p + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, collattr, req_p + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, collattr, req_p mpi_iallreduce : int - NM*: sendbuf, recvbuf, count, datatype, op, comm, req_p - SHM*: sendbuf, recvbuf, count, datatype, op, comm, req_p + NM*: sendbuf, recvbuf, count, datatype, op, comm, collattr, req_p + SHM*: sendbuf, recvbuf, count, datatype, op, comm, collattr, req_p mpi_ialltoall : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, req_p - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, req_p + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, collattr, req_p + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, collattr, req_p mpi_ialltoallv : int - NM*: sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, req_p - SHM*: sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, req_p + NM*: sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, collattr, req_p + SHM*: sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, collattr, req_p mpi_ialltoallw : int - NM*: sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, req_p - SHM*: sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, req_p + NM*: sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, collattr, req_p + SHM*: sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, collattr, req_p mpi_iexscan : int - NM*: sendbuf, recvbuf, count, datatype, op, comm, req_p - SHM*: sendbuf, recvbuf, count, datatype, op, comm, req_p + NM*: sendbuf, recvbuf, count, datatype, op, comm, collattr, req_p + SHM*: sendbuf, recvbuf, count, datatype, op, comm, collattr, req_p mpi_igather : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, req_p - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, req_p + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, collattr, req_p + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, collattr, req_p mpi_igatherv : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, req_p - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, req_p + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, collattr, req_p + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, collattr, req_p mpi_ireduce_scatter_block : int - NM*: sendbuf, recvbuf, recvcount, datatype, op, comm, req_p - SHM*: sendbuf, recvbuf, recvcount, datatype, op, comm, req_p + NM*: sendbuf, recvbuf, recvcount, datatype, op, comm, collattr, req_p + SHM*: sendbuf, recvbuf, recvcount, datatype, op, comm, collattr, req_p mpi_ireduce_scatter : int - NM*: sendbuf, recvbuf, recvcounts, datatype, op, comm, req_p - SHM*: sendbuf, recvbuf, recvcounts, datatype, op, comm, req_p + NM*: sendbuf, recvbuf, recvcounts, datatype, op, comm, collattr, req_p + SHM*: sendbuf, recvbuf, recvcounts, datatype, op, comm, collattr, req_p mpi_ireduce : int - NM*: sendbuf, recvbuf, count, datatype, op, root, comm_ptr, req_p - SHM*: sendbuf, recvbuf, count, datatype, op, root, comm_ptr, req_p + NM*: sendbuf, recvbuf, count, datatype, op, root, comm, collattr, req_p + SHM*: sendbuf, recvbuf, count, datatype, op, root, comm, collattr, req_p mpi_iscan : int - NM*: sendbuf, recvbuf, count, datatype, op, comm, req_p - SHM*: sendbuf, recvbuf, count, datatype, op, comm, req_p + NM*: sendbuf, recvbuf, count, datatype, op, comm, collattr, req_p + SHM*: sendbuf, recvbuf, count, datatype, op, comm, collattr, req_p mpi_iscatter : int - NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, req_p - SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, req_p + NM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, collattr, req_p + SHM*: sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, collattr, req_p mpi_iscatterv : int - NM*: sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, req_p - SHM*: sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, req_p + NM*: sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, collattr, req_p + SHM*: sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, collattr, req_p mpi_type_commit_hook : int NM : datatype_p SHM : type @@ -438,6 +438,7 @@ PARAM: buf: const void * buf-2: void * buffer: void * + collattr: int comm: MPIR_Comm * comm_ptr: MPIR_Comm * compare_addr: const void * @@ -451,7 +452,6 @@ PARAM: disp_unit_p: int * displs: const MPI_Aint * dst_vci: int - errflag: MPIR_Errflag_t flag: int * group: MPIR_Group * handler_id: int diff --git a/src/mpid/ch4/include/mpidch4.h b/src/mpid/ch4/include/mpidch4.h index 51b98fed4cc..8b521d2c67e 100644 --- a/src/mpid/ch4/include/mpidch4.h +++ b/src/mpid/ch4/include/mpidch4.h @@ -177,52 +177,51 @@ int MPID_Comm_set_hints(MPIR_Comm *, MPIR_Info *); int MPID_Comm_commit_post_hook(MPIR_Comm *); int MPID_Stream_create_hook(MPIR_Stream * stream); int MPID_Stream_free_hook(MPIR_Stream * stream); -MPL_STATIC_INLINE_PREFIX int MPID_Barrier(MPIR_Comm *, MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; +MPL_STATIC_INLINE_PREFIX int MPID_Barrier(MPIR_Comm *, int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Bcast(void *, MPI_Aint, MPI_Datatype, int, MPIR_Comm *, - MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Allreduce(const void *, void *, MPI_Aint, MPI_Datatype, MPI_Op, - MPIR_Comm *, MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Allgather(const void *, MPI_Aint, MPI_Datatype, void *, MPI_Aint, MPI_Datatype, MPIR_Comm *, - MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Allgatherv(const void *, MPI_Aint, MPI_Datatype, void *, const MPI_Aint *, const MPI_Aint *, MPI_Datatype, - MPIR_Comm *, MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Scatter(const void *, MPI_Aint, MPI_Datatype, void *, MPI_Aint, MPI_Datatype, int, MPIR_Comm *, - MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Scatterv(const void *, const MPI_Aint *, const MPI_Aint *, MPI_Datatype, void *, MPI_Aint, MPI_Datatype, int, - MPIR_Comm *, MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Gather(const void *, MPI_Aint, MPI_Datatype, void *, MPI_Aint, MPI_Datatype, int, MPIR_Comm *, - MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Gatherv(const void *, MPI_Aint, MPI_Datatype, void *, const MPI_Aint *, const MPI_Aint *, MPI_Datatype, int, - MPIR_Comm *, MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Alltoall(const void *, MPI_Aint, MPI_Datatype, void *, MPI_Aint, - MPI_Datatype, MPIR_Comm *, - MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + MPI_Datatype, MPIR_Comm *, int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Alltoallv(const void *, const MPI_Aint *, const MPI_Aint *, MPI_Datatype, void *, const MPI_Aint *, const MPI_Aint *, MPI_Datatype, MPIR_Comm *, - MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Alltoallw(const void *, const MPI_Aint[], const MPI_Aint[], const MPI_Datatype[], void *, const MPI_Aint[], const MPI_Aint[], const MPI_Datatype[], MPIR_Comm *, - MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Reduce(const void *, void *, MPI_Aint, MPI_Datatype, MPI_Op, int, - MPIR_Comm *, MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Reduce_scatter(const void *, void *, const MPI_Aint[], MPI_Datatype, MPI_Op, MPIR_Comm *, - MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Reduce_scatter_block(const void *, void *, MPI_Aint, MPI_Datatype, MPI_Op, MPIR_Comm *, - MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Scan(const void *, void *, MPI_Aint, MPI_Datatype, MPI_Op, - MPIR_Comm *, MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Exscan(const void *, void *, MPI_Aint, MPI_Datatype, MPI_Op, - MPIR_Comm *, MPIR_Errflag_t) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Neighbor_allgather(const void *, MPI_Aint, MPI_Datatype, void *, MPI_Aint, MPI_Datatype, MPIR_Comm *) MPL_STATIC_INLINE_SUFFIX; @@ -263,61 +262,67 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ineighbor_alltoallw(const void *, const MPI_Ai void *, const MPI_Aint[], const MPI_Aint[], const MPI_Datatype[], MPIR_Comm *, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; -MPL_STATIC_INLINE_PREFIX int MPID_Ibarrier(MPIR_Comm *, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; -MPL_STATIC_INLINE_PREFIX int MPID_Ibcast(void *, MPI_Aint, MPI_Datatype, int, MPIR_Comm *, +MPL_STATIC_INLINE_PREFIX int MPID_Ibarrier(MPIR_Comm *, int, + MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; +MPL_STATIC_INLINE_PREFIX int MPID_Ibcast(void *, MPI_Aint, MPI_Datatype, int, MPIR_Comm *, int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Iallgather(const void *, MPI_Aint, MPI_Datatype, void *, MPI_Aint, - MPI_Datatype, MPIR_Comm *, + MPI_Datatype, MPIR_Comm *, int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Iallgatherv(const void *, MPI_Aint, MPI_Datatype, void *, const MPI_Aint *, const MPI_Aint *, MPI_Datatype, - MPIR_Comm *, + MPIR_Comm *, int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Iallreduce(const void *, void *, MPI_Aint, MPI_Datatype, MPI_Op, - MPIR_Comm *, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int, + MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Ialltoall(const void *, MPI_Aint, MPI_Datatype, void *, MPI_Aint, - MPI_Datatype, MPIR_Comm *, + MPI_Datatype, MPIR_Comm *, int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Ialltoallv(const void *, const MPI_Aint[], const MPI_Aint[], MPI_Datatype, void *, const MPI_Aint[], - const MPI_Aint[], MPI_Datatype, MPIR_Comm *, + const MPI_Aint[], MPI_Datatype, MPIR_Comm *, int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Ialltoallw(const void *, const MPI_Aint[], const MPI_Aint[], const MPI_Datatype[], void *, const MPI_Aint[], const MPI_Aint[], const MPI_Datatype[], MPIR_Comm *, - MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; + int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Iexscan(const void *, void *, MPI_Aint, MPI_Datatype, MPI_Op, - MPIR_Comm *, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int, + MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Igather(const void *, MPI_Aint, MPI_Datatype, void *, MPI_Aint, - MPI_Datatype, int, MPIR_Comm *, + MPI_Datatype, int, MPIR_Comm *, int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Igatherv(const void *, MPI_Aint, MPI_Datatype, void *, const MPI_Aint *, const MPI_Aint *, MPI_Datatype, int, - MPIR_Comm *, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int, + MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Ireduce_scatter_block(const void *, void *, MPI_Aint, - MPI_Datatype, MPI_Op, MPIR_Comm *, + MPI_Datatype, MPI_Op, MPIR_Comm *, int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Ireduce_scatter(const void *, void *, const MPI_Aint[], - MPI_Datatype, MPI_Op, MPIR_Comm *, + MPI_Datatype, MPI_Op, MPIR_Comm *, int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Ireduce(const void *, void *, MPI_Aint, MPI_Datatype, MPI_Op, int, - MPIR_Comm *, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int, + MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Iscan(const void *, void *, MPI_Aint, MPI_Datatype, MPI_Op, - MPIR_Comm *, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; + MPIR_Comm *, int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Iscatter(const void *, MPI_Aint, MPI_Datatype, void *, MPI_Aint, - MPI_Datatype, int, MPIR_Comm *, + MPI_Datatype, int, MPIR_Comm *, int, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; MPL_STATIC_INLINE_PREFIX int MPID_Iscatterv(const void *, const MPI_Aint *, const MPI_Aint *, MPI_Datatype, void *, MPI_Aint, MPI_Datatype, int, - MPIR_Comm *, MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; -int MPID_Send_enqueue(const void *buf, MPI_Aint count, MPI_Datatype datatype, - int dest, int tag, MPIR_Comm * comm_ptr); -int MPID_Recv_enqueue(void *buf, MPI_Aint count, MPI_Datatype datatype, - int source, int tag, MPIR_Comm * comm_ptr, MPI_Status * status); -int MPID_Isend_enqueue(const void *buf, MPI_Aint count, MPI_Datatype datatype, - int dest, int tag, MPIR_Comm * comm_ptr, MPIR_Request ** req); -int MPID_Irecv_enqueue(void *buf, MPI_Aint count, MPI_Datatype datatype, - int source, int tag, MPIR_Comm * comm_ptr, MPIR_Request ** req); + MPIR_Comm *, int, + MPIR_Request **) MPL_STATIC_INLINE_SUFFIX; +int MPID_Send_enqueue(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, + MPIR_Comm * comm_ptr); +int MPID_Recv_enqueue(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag, + MPIR_Comm * comm_ptr, MPI_Status * status); +int MPID_Isend_enqueue(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, + MPIR_Comm * comm_ptr, MPIR_Request ** req); +int MPID_Irecv_enqueue(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag, + MPIR_Comm * comm_ptr, MPIR_Request ** req); int MPID_Wait_enqueue(MPIR_Request * req_ptr, MPI_Status * status); int MPID_Waitall_enqueue(int count, MPI_Request * array_of_requests, MPI_Status * array_of_statuses); diff --git a/src/mpid/ch4/netmod/include/netmod_am_fallback_coll.h b/src/mpid/ch4/netmod/include/netmod_am_fallback_coll.h index 9ea0e1f6048..baab3e3773f 100644 --- a/src/mpid/ch4/netmod/include/netmod_am_fallback_coll.h +++ b/src/mpid/ch4/netmod/include/netmod_am_fallback_coll.h @@ -6,22 +6,20 @@ #ifndef NETMOD_AM_FALLBACK_COLL_H_INCLUDED #define NETMOD_AM_FALLBACK_COLL_H_INCLUDED -MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) +MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, int collattr) { return MPIR_Barrier_impl(comm_ptr, errflag); } MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_bcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { return MPIR_Bcast_impl(buffer, count, datatype, root, comm_ptr, errflag); } MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { return MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); } @@ -29,7 +27,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *r MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Allgather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm_ptr, errflag); @@ -39,7 +37,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgatherv(const void *sendbuf, MPI_Ai MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Allgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm_ptr, errflag); @@ -48,8 +46,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgatherv(const void *sendbuf, MPI_Ai MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { return MPIR_Gather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, errflag); @@ -59,8 +56,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gatherv(const void *sendbuf, MPI_Aint MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { return MPIR_Gatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm_ptr, errflag); @@ -69,8 +65,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gatherv(const void *sendbuf, MPI_Aint MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { return MPIR_Scatter_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, errflag); @@ -80,7 +75,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatterv(const void *sendbuf, const MP const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Scatterv_impl(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, errflag); @@ -89,7 +84,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatterv(const void *sendbuf, const MP MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm_ptr, errflag); @@ -100,7 +95,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const MPI_Aint * sdispls, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm_ptr, errflag); @@ -113,7 +108,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm_ptr, errflag); @@ -121,7 +116,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallw(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag); } @@ -129,8 +124,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recv MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag); } @@ -138,8 +132,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, vo MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, errflag); @@ -147,14 +140,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter_block(const void *sendb MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); } MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); } diff --git a/src/mpid/ch4/netmod/ofi/ofi_coll.h b/src/mpid/ch4/netmod/ofi/ofi_coll.h index 4ac6edea790..4b297b0b44a 100644 --- a/src/mpid/ch4/netmod/ofi/ofi_coll.h +++ b/src/mpid/ch4/netmod/ofi/ofi_coll.h @@ -9,13 +9,13 @@ #include "ofi_impl.h" #include "ch4_csel_container.h" -MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_barrier(MPIR_Comm * comm, MPIR_Errflag_t errflag) +MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_barrier(MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Barrier_impl(comm, errflag); + mpi_errno = MPIR_Barrier_impl(comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -28,13 +28,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_barrier(MPIR_Comm * comm, MPIR_Errflag } MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_bcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, - int root, MPIR_Comm * comm, MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm, errflag); + mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -48,14 +48,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_bcast(void *buffer, MPI_Aint count, MP MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -70,14 +69,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *r MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Allgather_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, comm, errflag); + recvbuf, recvcount, recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -93,14 +92,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgatherv(const void *sendbuf, MPI_Ai MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Allgatherv_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcounts, displs, recvtype, comm, errflag); + recvbuf, recvcounts, displs, recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -115,14 +114,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgatherv(const void *sendbuf, MPI_Ai MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Gather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, errflag); + recvcount, recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -138,15 +137,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gatherv(const void *sendbuf, MPI_Aint MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Gatherv_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm, errflag); + recvcounts, displs, recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -162,15 +160,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gatherv(const void *sendbuf, MPI_Aint MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Scatter_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, errflag); + recvcount, recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -186,14 +183,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatterv(const void *sendbuf, const MP const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Scatterv_impl(sendbuf, sendcounts, displs, sendtype, recvbuf, - recvcount, recvtype, root, comm, errflag); + recvcount, recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -208,14 +205,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatterv(const void *sendbuf, const MP MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, comm, errflag); + recvbuf, recvcount, recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -232,7 +229,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const MPI_Aint * sdispls, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; @@ -240,7 +237,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallv(const void *sendbuf, mpi_errno = MPIR_Alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, - rdispls, recvtype, comm, errflag); + rdispls, recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -259,7 +256,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; @@ -267,7 +264,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallw(const void *sendbuf, mpi_errno = MPIR_Alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, - rdispls, recvtypes, comm, errflag); + rdispls, recvtypes, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -281,13 +278,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallw(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, errflag); + mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -302,13 +299,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recv MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, errflag); + mpi_errno = + MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -323,14 +321,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, vo MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm, errflag); + MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -344,13 +341,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter_block(const void *sendb MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -364,13 +361,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbu MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -564,12 +561,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_alltoallw(const void *sendbu return mpi_errno; } -MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm, MPIR_Request ** req) +MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ibarrier_impl(comm, req); + mpi_errno = MPIR_Ibarrier_impl(comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -577,12 +575,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm, MPIR_Reques MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ibcast_impl(buffer, count, datatype, root, comm, req); + mpi_errno = MPIR_Ibcast_impl(buffer, count, datatype, root, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -591,13 +589,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibcast(void *buffer, MPI_Aint count, MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iallgather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, req); + recvcount, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -608,13 +607,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, MPI_A const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iallgatherv_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcounts, displs, recvtype, comm, req); + recvbuf, recvcounts, displs, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -623,12 +622,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, MPI_A MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** request) + int collattr, MPIR_Request ** request) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Iallreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, request); + mpi_errno = + MPIR_Iallreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr, request); MPIR_FUNC_EXIT; return mpi_errno; @@ -637,13 +637,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void * MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ialltoall_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, req); + recvcount, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -656,13 +657,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoallv(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ialltoallv_impl(sendbuf, sendcounts, sdispls, - sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, req); + sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, + collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -675,13 +677,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, const MPI_Datatype recvtypes[], - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ialltoallw_impl(sendbuf, sendcounts, sdispls, - sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, req); + sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, + collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -689,12 +693,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Iexscan_impl(sendbuf, recvbuf, count, datatype, op, comm, req); + mpi_errno = MPIR_Iexscan_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -703,13 +708,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *rec MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_igather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Request ** req) + int root, MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Igather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, req); + recvcount, recvtype, root, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -719,13 +725,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_igatherv(const void *sendbuf, MPI_Aint MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Request ** req) + int root, MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Igatherv_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcounts, displs, recvtype, root, comm, req); + recvbuf, recvcounts, displs, recvtype, root, comm, collattr, + req); MPIR_FUNC_EXIT; return mpi_errno; @@ -735,13 +743,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter_block(const void *send MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ireduce_scatter_block_impl(sendbuf, recvbuf, recvcount, - datatype, op, comm, req); + datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -750,12 +758,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter_block(const void *send MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ireduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, req); + mpi_errno = + MPIR_Ireduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -763,12 +773,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, v MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - int root, MPIR_Comm * comm, MPIR_Request ** req) + int root, MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ireduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, req); + mpi_errno = MPIR_Ireduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -776,12 +787,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *rec MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Iscan_impl(sendbuf, recvbuf, count, datatype, op, comm, req); + mpi_errno = MPIR_Iscan_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -791,13 +802,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscatter(const void *sendbuf, MPI_Aint MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Request ** request) + int collattr, MPIR_Request ** request) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iscatter_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, request); + recvcount, recvtype, root, comm, collattr, request); MPIR_FUNC_EXIT; return mpi_errno; @@ -808,13 +819,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscatterv(const void *sendbuf, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm, MPIR_Request ** request) + MPIR_Comm * comm, int collattr, + MPIR_Request ** request) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iscatterv_impl(sendbuf, sendcounts, displs, sendtype, - recvbuf, recvcount, recvtype, root, comm, request); + recvbuf, recvcount, recvtype, root, comm, collattr, request); MPIR_FUNC_EXIT; return mpi_errno; diff --git a/src/mpid/ch4/netmod/ucx/ucx_coll.h b/src/mpid/ch4/netmod/ucx/ucx_coll.h index 6a1d4759958..0fab801e9a8 100644 --- a/src/mpid/ch4/netmod/ucx/ucx_coll.h +++ b/src/mpid/ch4/netmod/ucx/ucx_coll.h @@ -11,17 +11,17 @@ #include "../../../common/hcoll/hcoll.h" #endif -MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) +MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; #ifdef HAVE_HCOLL - mpi_errno = hcoll_Barrier(comm_ptr, errflag); + mpi_errno = hcoll_Barrier(comm_ptr, collattr); if (mpi_errno != MPI_SUCCESS) #endif { - mpi_errno = MPIR_Barrier_impl(comm_ptr, errflag); + mpi_errno = MPIR_Barrier_impl(comm_ptr, collattr); } MPIR_FUNC_EXIT; @@ -29,18 +29,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Err } MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_bcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; #ifdef HAVE_HCOLL - mpi_errno = hcoll_Bcast(buffer, count, datatype, root, comm_ptr, errflag); + mpi_errno = hcoll_Bcast(buffer, count, datatype, root, comm_ptr, collattr); if (mpi_errno != MPI_SUCCESS) #endif { - mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm_ptr, errflag); + mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm_ptr, collattr); } MPIR_FUNC_EXIT; @@ -49,18 +48,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_bcast(void *buffer, MPI_Aint count, MP MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; #ifdef HAVE_HCOLL - mpi_errno = hcoll_Allreduce(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); + mpi_errno = hcoll_Allreduce(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr); if (mpi_errno != MPI_SUCCESS) #endif { - mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); + mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr); } MPIR_FUNC_EXIT; @@ -70,19 +68,19 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allreduce(const void *sendbuf, void *r MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; #ifdef HAVE_HCOLL mpi_errno = hcoll_Allgather(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm_ptr, errflag); + recvcount, recvtype, comm_ptr, collattr); if (mpi_errno != MPI_SUCCESS) #endif { mpi_errno = MPIR_Allgather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm_ptr, errflag); + recvcount, recvtype, comm_ptr, collattr); } MPIR_FUNC_EXIT; @@ -93,13 +91,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgatherv(const void *sendbuf, MPI_Ai MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Allgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, comm_ptr, errflag); + recvcounts, displs, recvtype, comm_ptr, collattr); MPIR_FUNC_EXIT; return mpi_errno; @@ -108,14 +106,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_allgatherv(const void *sendbuf, MPI_Ai MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Gather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm_ptr, errflag); + recvcount, recvtype, root, comm_ptr, collattr); MPIR_FUNC_EXIT; return mpi_errno; @@ -125,14 +122,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gatherv(const void *sendbuf, MPI_Aint MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Gatherv_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm_ptr, errflag); + recvcounts, displs, recvtype, root, comm_ptr, collattr); MPIR_FUNC_EXIT; return mpi_errno; @@ -141,14 +137,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_gatherv(const void *sendbuf, MPI_Aint MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Scatter_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm_ptr, errflag); + recvcount, recvtype, root, comm_ptr, collattr); MPIR_FUNC_EXIT; return mpi_errno; @@ -158,13 +153,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatterv(const void *sendbuf, const MP const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Scatterv_impl(sendbuf, sendcounts, displs, sendtype, - recvbuf, recvcount, recvtype, root, comm_ptr, errflag); + recvbuf, recvcount, recvtype, root, comm_ptr, collattr); MPIR_FUNC_EXIT; return mpi_errno; @@ -173,19 +168,19 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scatterv(const void *sendbuf, const MP MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; #ifdef HAVE_HCOLL mpi_errno = hcoll_Alltoall(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm_ptr, errflag); + recvcount, recvtype, comm_ptr, collattr); if (mpi_errno != MPI_SUCCESS) #endif { mpi_errno = MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm_ptr, errflag); + recvcount, recvtype, comm_ptr, collattr); } MPIR_FUNC_EXIT; return mpi_errno; @@ -196,19 +191,19 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallv(const void *sendbuf, const MPI_Aint * sdispls, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; #ifdef HAVE_HCOLL mpi_errno = hcoll_Alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, - recvcounts, rdispls, recvtype, comm_ptr, errflag); + recvcounts, rdispls, recvtype, comm_ptr, collattr); if (mpi_errno != MPI_SUCCESS) #endif { mpi_errno = MPIR_Alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, - recvbuf, recvcounts, rdispls, recvtype, comm_ptr, errflag); + recvbuf, recvcounts, rdispls, recvtype, comm_ptr, collattr); } MPIR_FUNC_EXIT; return mpi_errno; @@ -221,13 +216,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallw(const void *sendbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, - recvbuf, recvcounts, rdispls, recvtypes, comm_ptr, errflag); + recvbuf, recvcounts, rdispls, recvtypes, comm_ptr, collattr); MPIR_FUNC_EXIT; return mpi_errno; @@ -235,18 +230,18 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_alltoallw(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; #ifdef HAVE_HCOLL - mpi_errno = hcoll_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag); + mpi_errno = hcoll_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, collattr); if (mpi_errno != MPI_SUCCESS) #endif { mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, - errflag); + collattr); } MPIR_FUNC_EXIT; return mpi_errno; @@ -255,14 +250,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce(const void *sendbuf, void *recv MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, - datatype, op, comm_ptr, errflag); + datatype, op, comm_ptr, collattr); MPIR_FUNC_EXIT; return mpi_errno; @@ -271,14 +265,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter(const void *sendbuf, vo MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, - datatype, op, comm_ptr, errflag); + datatype, op, comm_ptr, collattr); MPIR_FUNC_EXIT; return mpi_errno; @@ -286,12 +279,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_reduce_scatter_block(const void *sendb MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); + mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr); MPIR_FUNC_EXIT; return mpi_errno; @@ -299,12 +292,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_scan(const void *sendbuf, void *recvbu MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_exscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); + mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr); MPIR_FUNC_EXIT; return mpi_errno; @@ -501,12 +494,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ineighbor_alltoallw(const void *sendbu return mpi_errno; } -MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm_ptr, MPIR_Request ** req) +MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm_ptr, + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ibarrier_impl(comm_ptr, req); + mpi_errno = MPIR_Ibarrier_impl(comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -514,12 +508,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibarrier(MPIR_Comm * comm_ptr, MPIR_Re MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, MPIR_Request ** req) + MPIR_Comm * comm_ptr, + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ibcast_impl(buffer, count, datatype, root, comm_ptr, req); + mpi_errno = MPIR_Ibcast_impl(buffer, count, datatype, root, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -528,13 +523,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ibcast(void *buffer, MPI_Aint count, MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Request ** req) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iallgather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm_ptr, req); + recvcount, recvtype, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -545,13 +541,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, MPI_A const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iallgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, comm_ptr, req); + recvcounts, displs, recvtype, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -560,12 +556,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallgatherv(const void *sendbuf, MPI_A MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** request) + int collattr, MPIR_Request ** request) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Iallreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, request); + mpi_errno = + MPIR_Iallreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr, request); MPIR_FUNC_EXIT; return mpi_errno; @@ -574,13 +571,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iallreduce(const void *sendbuf, void * MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Request ** req) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ialltoall_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm_ptr, req); + recvcount, recvtype, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -593,13 +591,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoallv(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ialltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, - recvbuf, recvcounts, rdispls, recvtype, comm_ptr, req); + recvbuf, recvcounts, rdispls, recvtype, comm_ptr, collattr, + req); MPIR_FUNC_EXIT; return mpi_errno; @@ -612,13 +611,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Request ** req) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ialltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, - recvbuf, recvcounts, rdispls, recvtypes, comm_ptr, req); + recvbuf, recvcounts, rdispls, recvtypes, comm_ptr, collattr, + req); MPIR_FUNC_EXIT; return mpi_errno; @@ -626,12 +627,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ialltoallw(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iexscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Request ** req) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Iexscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, req); + mpi_errno = MPIR_Iexscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -641,13 +643,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_igather(const void *sendbuf, MPI_Aint MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Igather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm_ptr, req); + recvcount, recvtype, root, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -658,13 +660,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_igatherv(const void *sendbuf, MPI_Aint const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, int root, MPIR_Comm * comm_ptr, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Igatherv_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm_ptr, req); + recvcounts, displs, recvtype, root, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -674,13 +676,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter_block(const void *send MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ireduce_scatter_block_impl(sendbuf, recvbuf, recvcount, - datatype, op, comm_ptr, req); + datatype, op, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -689,13 +691,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter_block(const void *send MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Request ** req) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ireduce_scatter_impl(sendbuf, recvbuf, recvcounts, - datatype, op, comm_ptr, req); + datatype, op, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -704,12 +707,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce_scatter(const void *sendbuf, v MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ireduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, req); + mpi_errno = + MPIR_Ireduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -717,12 +721,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_ireduce(const void *sendbuf, void *rec MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Request ** req) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Iscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, req); + mpi_errno = MPIR_Iscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -732,13 +737,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscatter(const void *sendbuf, MPI_Aint MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Request ** request) + int collattr, MPIR_Request ** request) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iscatter_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, request); + recvcount, recvtype, root, comm, collattr, request); MPIR_FUNC_EXIT; return mpi_errno; @@ -749,13 +754,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_iscatterv(const void *sendbuf, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm, MPIR_Request ** request) + MPIR_Comm * comm, int collattr, + MPIR_Request ** request) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iscatterv_impl(sendbuf, sendcounts, displs, sendtype, - recvbuf, recvcount, recvtype, root, comm, request); + recvbuf, recvcount, recvtype, root, comm, collattr, request); MPIR_FUNC_EXIT; return mpi_errno; diff --git a/src/mpid/ch4/shm/posix/posix_coll.h b/src/mpid/ch4/shm/posix/posix_coll.h index ae13535c48f..14e988d649d 100644 --- a/src/mpid/ch4/shm/posix/posix_coll.h +++ b/src/mpid/ch4/shm/posix/posix_coll.h @@ -110,7 +110,7 @@ */ -MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_barrier(MPIR_Comm * comm, MPIR_Errflag_t errflag) +MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_barrier(MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Csel_coll_sig_s coll_sig = { @@ -125,7 +125,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_barrier(MPIR_Comm * comm, MPIR_Errf case MPIR_CVAR_BARRIER_POSIX_INTRA_ALGORITHM_release_gather: MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, !MPIR_IS_THREADED, mpi_errno, "Barrier release_gather cannot be applied.\n"); - mpi_errno = MPIDI_POSIX_mpi_barrier_release_gather(comm, errflag); + mpi_errno = MPIDI_POSIX_mpi_barrier_release_gather(comm, collattr); break; case MPIR_CVAR_BARRIER_POSIX_INTRA_ALGORITHM_mpir: @@ -139,7 +139,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_barrier(MPIR_Comm * comm, MPIR_Errf switch (cnt->id) { case MPIDI_POSIX_CSEL_CONTAINER_TYPE__ALGORITHM__MPIDI_POSIX_mpi_barrier_release_gather: mpi_errno = - MPIDI_POSIX_mpi_barrier_release_gather(comm, errflag); + MPIDI_POSIX_mpi_barrier_release_gather(comm, collattr); break; case MPIDI_POSIX_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Barrier_impl: goto fallback; @@ -156,7 +156,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_barrier(MPIR_Comm * comm, MPIR_Errf goto fn_exit; fallback: - mpi_errno = MPIR_Barrier_impl(comm, errflag); + mpi_errno = MPIR_Barrier_impl(comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -168,7 +168,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_barrier(MPIR_Comm * comm, MPIR_Errf MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_bcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Csel_coll_sig_s coll_sig = { @@ -188,7 +188,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_bcast(void *buffer, MPI_Aint count, MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, !MPIR_IS_THREADED, mpi_errno, "Bcast release_gather cannot be applied.\n"); mpi_errno = - MPIDI_POSIX_mpi_bcast_release_gather(buffer, count, datatype, root, comm, errflag); + MPIDI_POSIX_mpi_bcast_release_gather(buffer, count, datatype, root, comm, collattr); break; case MPIR_CVAR_BCAST_POSIX_INTRA_ALGORITHM_mpir: @@ -203,7 +203,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_bcast(void *buffer, MPI_Aint count, case MPIDI_POSIX_CSEL_CONTAINER_TYPE__ALGORITHM__MPIDI_POSIX_mpi_bcast_release_gather: mpi_errno = MPIDI_POSIX_mpi_bcast_release_gather(buffer, count, datatype, root, comm, - errflag); + collattr); break; case MPIDI_POSIX_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Bcast_impl: goto fallback; @@ -220,7 +220,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_bcast(void *buffer, MPI_Aint count, goto fn_exit; fallback: - mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm, errflag); + mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -232,8 +232,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_bcast(void *buffer, MPI_Aint count, MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_allreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Csel_coll_sig_s coll_sig = { @@ -256,7 +255,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_allreduce(const void *sendbuf, void "Allreduce release_gather cannot be applied.\n"); mpi_errno = MPIDI_POSIX_mpi_allreduce_release_gather(sendbuf, recvbuf, count, datatype, op, - comm, errflag); + comm, collattr); break; case MPIR_CVAR_ALLREDUCE_POSIX_INTRA_ALGORITHM_mpir: @@ -271,7 +270,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_allreduce(const void *sendbuf, void case MPIDI_POSIX_CSEL_CONTAINER_TYPE__ALGORITHM__MPIDI_POSIX_mpi_allreduce_release_gather: mpi_errno = MPIDI_POSIX_mpi_allreduce_release_gather(sendbuf, recvbuf, count, datatype, - op, comm, errflag); + op, comm, collattr); break; case MPIDI_POSIX_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Allreduce_impl: @@ -290,7 +289,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_allreduce(const void *sendbuf, void goto fn_exit; fallback: - mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -303,14 +302,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_allreduce(const void *sendbuf, void MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_allgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Allgather_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, comm, errflag); + recvbuf, recvcount, recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -327,14 +326,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_allgatherv(const void *sendbuf, MPI const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Allgatherv_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcounts, displs, recvtype, comm, errflag); + recvbuf, recvcounts, displs, recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -349,15 +348,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_allgatherv(const void *sendbuf, MPI MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_gather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Gather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm, errflag); + recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -373,15 +371,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_gatherv(const void *sendbuf, MPI_Ai MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Gatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, root, comm, errflag); + displs, recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -397,15 +394,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_gatherv(const void *sendbuf, MPI_Ai MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_scatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Scatter_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm, errflag); + recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -422,15 +418,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_scatterv(const void *sendbuf, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; mpi_errno = MPIR_Scatterv_impl(sendbuf, sendcounts, displs, sendtype, - recvbuf, recvcount, recvtype, root, comm, errflag); + recvbuf, recvcount, recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -445,14 +440,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_scatterv(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_alltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, comm, errflag); + recvbuf, recvcount, recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -471,7 +466,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_alltoallv(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno; @@ -479,7 +474,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_alltoallv(const void *sendbuf, mpi_errno = MPIR_Alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, - rdispls, recvtype, comm, errflag); + rdispls, recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -498,7 +493,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_alltoallw(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno; @@ -506,7 +501,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_alltoallw(const void *sendbuf, mpi_errno = MPIR_Alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, - rdispls, recvtypes, comm, errflag); + rdispls, recvtypes, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -521,7 +516,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_alltoallw(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_reduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Csel_coll_sig_s coll_sig = { @@ -545,7 +540,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_reduce(const void *sendbuf, void *r "Reduce release_gather cannot be applied.\n"); mpi_errno = MPIDI_POSIX_mpi_reduce_release_gather(sendbuf, recvbuf, count, datatype, op, root, - comm, errflag); + comm, collattr); break; case MPIR_CVAR_REDUCE_POSIX_INTRA_ALGORITHM_mpir: @@ -560,7 +555,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_reduce(const void *sendbuf, void *r case MPIDI_POSIX_CSEL_CONTAINER_TYPE__ALGORITHM__MPIDI_POSIX_mpi_reduce_release_gather: mpi_errno = MPIDI_POSIX_mpi_reduce_release_gather(sendbuf, recvbuf, count, datatype, op, - root, comm, errflag); + root, comm, collattr); break; case MPIDI_POSIX_CSEL_CONTAINER_TYPE__ALGORITHM__MPIR_Reduce_impl: @@ -579,7 +574,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_reduce(const void *sendbuf, void *r goto fn_exit; fallback: - mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, errflag); + mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -592,14 +587,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_reduce(const void *sendbuf, void *r MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, errflag); + mpi_errno = + MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -614,14 +609,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_reduce_scatter(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm, errflag); + MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -635,13 +629,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_reduce_scatter_block(const void *se MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_scan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -655,14 +649,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_scan(const void *sendbuf, void *rec MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_exscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); @@ -866,12 +859,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ineighbor_alltoallw(const void *sen return mpi_errno; } -MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ibarrier(MPIR_Comm * comm, MPIR_Request ** req) +MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ibarrier(MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ibarrier_impl(comm, req); + mpi_errno = MPIR_Ibarrier_impl(comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -879,12 +873,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ibarrier(MPIR_Comm * comm, MPIR_Req MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ibcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ibcast_impl(buffer, count, datatype, root, comm, req); + mpi_errno = MPIR_Ibcast_impl(buffer, count, datatype, root, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -893,13 +888,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ibcast(void *buffer, MPI_Aint count MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iallgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iallgather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, req); + recvcount, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -910,13 +906,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iallgatherv(const void *sendbuf, MP const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iallgatherv_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcounts, displs, recvtype, comm, req); + recvbuf, recvcounts, displs, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -925,13 +921,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iallgatherv(const void *sendbuf, MP MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ialltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ialltoall_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, req); + recvcount, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -944,13 +941,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ialltoallv(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ialltoallv_impl(sendbuf, sendcounts, sdispls, - sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, req); + sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, + collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -963,13 +961,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ialltoallw(const void *sendbuf, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, const MPI_Datatype recvtypes[], - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Ialltoallw_impl(sendbuf, sendcounts, sdispls, - sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, req); + sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, + collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -978,12 +978,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ialltoallw(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iexscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Iexscan_impl(sendbuf, recvbuf, count, datatype, op, comm, req); + mpi_errno = MPIR_Iexscan_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -993,13 +993,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_igather(const void *sendbuf, MPI_Ai MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Igather_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, req); + recvcount, recvtype, root, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -1010,13 +1010,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_igatherv(const void *sendbuf, MPI_A const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, int root, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Igatherv_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcounts, displs, recvtype, root, comm, req); + recvbuf, recvcounts, displs, recvtype, root, comm, collattr, + req); MPIR_FUNC_EXIT; return mpi_errno; @@ -1027,13 +1029,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ireduce_scatter_block(const void *s MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = - MPIR_Ireduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm, req); + MPIR_Ireduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm, collattr, + req); MPIR_FUNC_EXIT; return mpi_errno; @@ -1042,12 +1046,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ireduce_scatter_block(const void *s MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ireduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, req); + mpi_errno = + MPIR_Ireduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -1056,12 +1062,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ireduce_scatter(const void *sendbuf MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ireduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Ireduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, req); + mpi_errno = MPIR_Ireduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -1070,12 +1076,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_ireduce(const void *sendbuf, void * MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iallreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Iallreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, req); + mpi_errno = MPIR_Iallreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -1083,12 +1089,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iallreduce(const void *sendbuf, voi MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int mpi_errno; MPIR_FUNC_ENTER; - mpi_errno = MPIR_Iscan_impl(sendbuf, recvbuf, count, datatype, op, comm, req); + mpi_errno = MPIR_Iscan_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return mpi_errno; @@ -1098,13 +1105,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iscatter(const void *sendbuf, MPI_A MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Request ** request) + int collattr, MPIR_Request ** request) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iscatter_impl(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, request); + recvcount, recvtype, root, comm, collattr, request); MPIR_FUNC_EXIT; return mpi_errno; @@ -1116,13 +1123,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_iscatterv(const void *sendbuf, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Request ** request) + int collattr, MPIR_Request ** request) { int mpi_errno; MPIR_FUNC_ENTER; mpi_errno = MPIR_Iscatterv_impl(sendbuf, sendcounts, displs, sendtype, - recvbuf, recvcount, recvtype, root, comm, request); + recvbuf, recvcount, recvtype, root, comm, collattr, request); MPIR_FUNC_EXIT; return mpi_errno; diff --git a/src/mpid/ch4/shm/posix/release_gather/nb_bcast_release_gather.h b/src/mpid/ch4/shm/posix/release_gather/nb_bcast_release_gather.h index 7c685f2c36d..f471903d6db 100644 --- a/src/mpid/ch4/shm/posix/release_gather/nb_bcast_release_gather.h +++ b/src/mpid/ch4/shm/posix/release_gather/nb_bcast_release_gather.h @@ -76,6 +76,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_NB_RG_root_datacopy_completion(void *v, MPIDI_POSIX_release_gather_comm_t *nb_release_gather_info_ptr; int segment = per_call_data->seq_no % num_cells; MPIR_Comm *comm_ptr = per_call_data->comm_ptr; + int collattr = per_call_data->collattr; + int errflag = 0; nb_release_gather_info_ptr = &MPIDI_POSIX_COMM(comm_ptr, nb_release_gather); int rank = MPIR_Comm_rank(comm_ptr); int num_ranks = MPIR_Comm_size(comm_ptr); @@ -94,12 +96,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_NB_RG_root_datacopy_completion(void *v, /* Root sends data to rank 0 */ if (rank == root) { MPIC_Isend(per_call_data->local_buf, per_call_data->count, per_call_data->datatype, - 0, per_call_data->tag, comm_ptr, &(per_call_data->sreq), MPIR_ERR_NONE); + 0, per_call_data->tag, comm_ptr, &(per_call_data->sreq), + collattr | errflag); *done = 1; } else if (rank == 0) { MPIC_Irecv(MPIDI_POSIX_RELEASE_GATHER_NB_IBCAST_DATA_ADDR(segment), per_call_data->count, per_call_data->datatype, per_call_data->root, - per_call_data->tag, comm_ptr, &(per_call_data->rreq)); + per_call_data->tag, comm_ptr, collattr, &(per_call_data->rreq)); *done = 1; } } else { @@ -335,6 +338,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_nb_release_gather_ibcast_impl(void *loc MPI_Datatype datatype, const int root, MPIR_Comm * comm_ptr, + int collattr, MPIR_TSP_sched_t sched) { MPIR_FUNC_ENTER; @@ -439,6 +443,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_nb_release_gather_ibcast_impl(void *loc data->datatype = MPI_BYTE; data->root = root; data->comm_ptr = comm_ptr; + data->collattr = collattr; data->tag = tag; data->sreq = NULL; data->rreq = NULL; diff --git a/src/mpid/ch4/shm/posix/release_gather/nb_reduce_release_gather.h b/src/mpid/ch4/shm/posix/release_gather/nb_reduce_release_gather.h index b51adf1343d..b6dcdaddf22 100644 --- a/src/mpid/ch4/shm/posix/release_gather/nb_reduce_release_gather.h +++ b/src/mpid/ch4/shm/posix/release_gather/nb_reduce_release_gather.h @@ -240,6 +240,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_NB_RG_reduce_start_sendrecv_completion( int root = per_call_data->root; int segment = per_call_data->seq_no % MPIR_CVAR_REDUCE_INTRANODE_NUM_CELLS; MPIR_Comm *comm_ptr = per_call_data->comm_ptr; + int collattr = per_call_data->collattr; MPIDI_POSIX_release_gather_comm_t *nb_release_gather_info_ptr; nb_release_gather_info_ptr = &MPIDI_POSIX_COMM(comm_ptr, nb_release_gather); int rank = MPIR_Comm_rank(comm_ptr); @@ -248,11 +249,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_NB_RG_reduce_start_sendrecv_completion( if (root != 0) { if (rank == root) { MPIC_Irecv(per_call_data->recv_buf, per_call_data->count, per_call_data->datatype, - 0, per_call_data->tag, comm_ptr, &(per_call_data->rreq)); + 0, per_call_data->tag, comm_ptr, collattr, &(per_call_data->rreq)); } else if (rank == 0) { MPIC_Isend(MPIDI_POSIX_RELEASE_GATHER_NB_REDUCE_DATA_ADDR(rank, segment), per_call_data->count, per_call_data->datatype, per_call_data->root, - per_call_data->tag, comm_ptr, &(per_call_data->sreq), MPIR_ERR_NONE); + per_call_data->tag, comm_ptr, &(per_call_data->sreq), collattr); } } @@ -348,6 +349,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_nb_release_gather_ireduce_impl(void *se MPI_Datatype datatype, MPI_Op op, const int root, MPIR_Comm * comm_ptr, + int collattr, MPIR_TSP_sched_t sched) { MPIR_FUNC_ENTER; @@ -437,6 +439,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_nb_release_gather_ireduce_impl(void *se data->root = root; data->op = op; data->comm_ptr = comm_ptr; + data->collattr = collattr; data->tag = tag; data->sreq = NULL; data->rreq = NULL; diff --git a/src/mpid/ch4/shm/posix/release_gather/release_gather.h b/src/mpid/ch4/shm/posix/release_gather/release_gather.h index 4f72d687de8..40ed96e1985 100644 --- a/src/mpid/ch4/shm/posix/release_gather/release_gather.h +++ b/src/mpid/ch4/shm/posix/release_gather/release_gather.h @@ -68,7 +68,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_ MPI_Datatype datatype, const int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag, + int collattr, const MPIDI_POSIX_release_gather_opcode_t operation) @@ -77,6 +77,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_ int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; MPIDI_POSIX_release_gather_comm_t *release_gather_info_ptr; int segment, rank; void *bcast_data_addr = NULL; @@ -101,7 +102,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_ /* Root sends data to rank 0 */ if (rank == root) { mpi_errno = - MPIC_Send(local_buf, count, datatype, 0, MPIR_BCAST_TAG, comm_ptr, errflag); + MPIC_Send(local_buf, count, datatype, 0, MPIR_BCAST_TAG, comm_ptr, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (rank == 0) { #ifdef HAVE_ERROR_CHECKING @@ -113,7 +115,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_ MPI_Aint recv_bytes; mpi_errno = MPIC_Recv((char *) bcast_data_addr + 2 * MPIDU_SHM_CACHE_LINE_LEN, count, - datatype, root, MPIR_BCAST_TAG, comm_ptr, &status); + datatype, root, MPIR_BCAST_TAG, comm_ptr, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); MPIR_Get_count_impl(&status, MPI_BYTE, &recv_bytes); MPIR_Typerep_copy(bcast_data_addr, &recv_bytes, sizeof(int), @@ -123,7 +125,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_ * roots might expect same data as other ranks but different from the actual root. * So only datasize mismatch handling is not sufficient */ MPIR_Typerep_copy((char *) bcast_data_addr + MPIDU_SHM_CACHE_LINE_LEN, &errflag, - sizeof(MPIR_Errflag_t), MPIR_TYPEREP_FLAG_NONE); + sizeof(int), MPIR_TYPEREP_FLAG_NONE); if ((int) recv_bytes != count) { /* It is OK to compare with count because datatype is always MPI_BYTE for Bcast */ errflag = MPIR_ERR_OTHER; @@ -134,7 +136,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_ /* When error checking is disabled, MPI_STATUS_IGNORE is used */ mpi_errno = MPIC_Recv(bcast_data_addr, count, datatype, root, MPIR_BCAST_TAG, comm_ptr, - MPI_STATUS_IGNORE); + collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); #endif } @@ -149,7 +151,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_ * expect same data as other ranks but different from the actual root. So only * datasize mismatch handling is not sufficient */ MPIR_Typerep_copy((char *) bcast_data_addr + MPIDU_SHM_CACHE_LINE_LEN, &errflag, - sizeof(MPIR_Errflag_t), MPIR_TYPEREP_FLAG_NONE); + sizeof(int), MPIR_TYPEREP_FLAG_NONE); mpi_errno = MPIR_Localcopy(local_buf, count, datatype, (char *) bcast_data_addr + 2 * MPIDU_SHM_CACHE_LINE_LEN, count, @@ -247,7 +249,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_gather(const void *i MPI_Datatype datatype, MPI_Op op, const int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag, + int collattr, const MPIDI_POSIX_release_gather_opcode_t operation) @@ -260,6 +262,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_gather(const void *i MPL_atomic_uint64_t *child_flag_addr; void *reduce_data_addr = NULL; int i, mpi_errno = MPI_SUCCESS, mpi_errno_ret = MPI_SUCCESS; + int errflag = 0; bool skip_checking = false; /* Set the relaxation to 0 because in Reduce, release step is "relaxed" to make sure multiple * buffers can be used to pipeline the copying in and out of shared memory, and data is not @@ -352,14 +355,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_gather(const void *i /* send-recv between root and rank 0 */ if (rank == root) { mpi_errno = - MPIC_Recv(outbuf, count, datatype, 0, MPIR_REDUCE_TAG, comm_ptr, + MPIC_Recv(outbuf, count, datatype, 0, MPIR_REDUCE_TAG, comm_ptr, collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } else if (rank == 0) { MPIR_ERR_CHKANDJUMP(!reduce_data_addr, mpi_errno, MPI_ERR_OTHER, "**nomem"); mpi_errno = MPIC_Send((void *) reduce_data_addr, count, datatype, root, MPIR_REDUCE_TAG, - comm_ptr, errflag); + comm_ptr, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret); } } diff --git a/src/mpid/ch4/shm/posix/release_gather/release_gather_types.h b/src/mpid/ch4/shm/posix/release_gather/release_gather_types.h index 27c25f0c7f3..4857d18fc1e 100644 --- a/src/mpid/ch4/shm/posix/release_gather/release_gather_types.h +++ b/src/mpid/ch4/shm/posix/release_gather/release_gather_types.h @@ -54,6 +54,7 @@ typedef struct MPIDI_POSIX_per_call_ibcast_info_t { int root, tag; MPI_Datatype datatype; MPIR_Comm *comm_ptr; + int collattr; MPIR_Request *sreq, *rreq; } MPIDI_POSIX_per_call_ibcast_info_t; @@ -66,6 +67,7 @@ typedef struct MPIDI_POSIX_per_call_ireduce_info_t { MPI_Op op; MPI_Datatype datatype; MPIR_Comm *comm_ptr; + int collattr; MPIR_Request *sreq, *rreq; } MPIDI_POSIX_per_call_ireduce_info_t; diff --git a/src/mpid/ch4/shm/src/shm_am_fallback_coll.h b/src/mpid/ch4/shm/src/shm_am_fallback_coll.h index b9e4d53ef40..a04eb7a11a8 100644 --- a/src/mpid/ch4/shm/src/shm_am_fallback_coll.h +++ b/src/mpid/ch4/shm/src/shm_am_fallback_coll.h @@ -6,22 +6,21 @@ #ifndef SHM_AM_FALLBACK_COLL_H_INCLUDED #define SHM_AM_FALLBACK_COLL_H_INCLUDED -MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_barrier(MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) +MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_barrier(MPIR_Comm * comm_ptr, int collattr) { return MPIR_Barrier_impl(comm_ptr, errflag); } MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_bcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Bcast_impl(buffer, count, datatype, root, comm_ptr, errflag); } MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_allreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm_ptr, int collattr) { return MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); } @@ -29,7 +28,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_allreduce(const void *sendbuf, void * MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_allgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Allgather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm_ptr, errflag); @@ -40,7 +39,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_allgatherv(const void *sendbuf, MPI_A const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { return MPIR_Allgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm_ptr, errflag); @@ -49,8 +48,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_allgatherv(const void *sendbuf, MPI_A MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_gather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { return MPIR_Gather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, errflag); @@ -60,8 +58,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_gatherv(const void *sendbuf, MPI_Aint MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { return MPIR_Gatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm_ptr, errflag); @@ -70,8 +67,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_gatherv(const void *sendbuf, MPI_Aint MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_scatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { return MPIR_Scatter_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, errflag); @@ -82,7 +78,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_scatterv(const void *sendbuf, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Scatterv_impl(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm_ptr, errflag); @@ -91,7 +87,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_scatterv(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_alltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm_ptr, errflag); @@ -104,7 +100,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_alltoallv(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { return MPIR_Alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm_ptr, errflag); @@ -117,7 +113,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_alltoallw(const void *sendbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm_ptr, errflag); @@ -125,8 +121,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_alltoallw(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { return MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag); } @@ -134,8 +129,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce(const void *sendbuf, void *rec MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag); } @@ -143,8 +137,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce_scatter(const void *sendbuf, v MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, errflag); @@ -152,14 +145,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce_scatter_block(const void *send MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_scan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); } MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_exscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { return MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); } diff --git a/src/mpid/ch4/shm/src/shm_coll.h b/src/mpid/ch4/shm/src/shm_coll.h index 737cc921de2..e99289afc87 100644 --- a/src/mpid/ch4/shm/src/shm_coll.h +++ b/src/mpid/ch4/shm/src/shm_coll.h @@ -9,13 +9,13 @@ #include #include "../posix/shm_inline.h" -MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_barrier(MPIR_Comm * comm, MPIR_Errflag_t errflag) +MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_barrier(MPIR_Comm * comm, int collattr) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_barrier(comm, errflag); + ret = MPIDI_POSIX_mpi_barrier(comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -23,13 +23,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_barrier(MPIR_Comm * comm, MPIR_Errfla MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_bcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_bcast(buffer, count, datatype, root, comm, errflag); + ret = MPIDI_POSIX_mpi_bcast(buffer, count, datatype, root, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -37,14 +37,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_bcast(void *buffer, MPI_Aint count, MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_allreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm, int collattr) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag); + ret = MPIDI_POSIX_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -53,14 +52,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_allreduce(const void *sendbuf, void * MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_allgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm, errflag); + recvtype, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -71,14 +70,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_allgatherv(const void *sendbuf, MPI_A const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, comm, errflag); + displs, recvtype, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -87,15 +86,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_allgatherv(const void *sendbuf, MPI_A MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_scatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm, errflag); + recvtype, root, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -106,14 +104,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_scatterv(const void *sendbuf, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, - recvcount, recvtype, root, comm_ptr, errflag); + recvcount, recvtype, root, comm_ptr, collattr); MPIR_FUNC_EXIT; return ret; @@ -122,15 +120,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_scatterv(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_gather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm, errflag); + recvtype, root, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -140,15 +137,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_gatherv(const void *sendbuf, MPI_Aint MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, root, comm, errflag); + displs, recvtype, root, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -157,14 +153,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_gatherv(const void *sendbuf, MPI_Aint MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_alltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm, errflag); + recvtype, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -177,14 +173,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_alltoallv(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, - recvcounts, rdispls, recvtype, comm, errflag); + recvcounts, rdispls, recvtype, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -197,14 +193,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_alltoallw(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, const MPI_Datatype recvtypes[], - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, - recvcounts, rdispls, recvtypes, comm, errflag); + recvcounts, rdispls, recvtypes, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -212,14 +208,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_alltoallw(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - int root, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm_ptr, int collattr) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_reduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, errflag); + ret = MPIDI_POSIX_mpi_reduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, collattr); MPIR_FUNC_EXIT; return ret; @@ -228,15 +223,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce(const void *sendbuf, void *rec MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint * recvcounts, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, - comm_ptr, errflag); + comm_ptr, collattr); MPIR_FUNC_EXIT; return ret; @@ -245,15 +239,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce_scatter(const void *sendbuf, v MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce_scatter_block(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_reduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, - op, comm_ptr, errflag); + op, comm_ptr, collattr); MPIR_FUNC_EXIT; return ret; @@ -261,13 +254,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_reduce_scatter_block(const void *send MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_scan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm, errflag); + ret = MPIDI_POSIX_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -275,13 +268,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_scan(const void *sendbuf, void *recvb MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_exscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_exscan(sendbuf, recvbuf, count, datatype, op, comm, errflag); + ret = MPIDI_POSIX_mpi_exscan(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_FUNC_EXIT; return ret; @@ -486,13 +479,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ineighbor_alltoallw(const void *sendb return ret; } -MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ibarrier(MPIR_Comm * comm, MPIR_Request ** req) +MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ibarrier(MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_ibarrier(comm, req); + ret = MPIDI_POSIX_mpi_ibarrier(comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -500,13 +494,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ibarrier(MPIR_Comm * comm, MPIR_Reque MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ibcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_ibcast(buffer, count, datatype, root, comm, req); + ret = MPIDI_POSIX_mpi_ibcast(buffer, count, datatype, root, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -515,14 +509,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ibcast(void *buffer, MPI_Aint count, MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iallgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_iallgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm, req); + recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -533,14 +528,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iallgatherv(const void *sendbuf, MPI_ const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, comm, req); + displs, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -549,13 +544,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iallgatherv(const void *sendbuf, MPI_ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iallreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_iallreduce(sendbuf, recvbuf, count, datatype, op, comm, req); + ret = MPIDI_POSIX_mpi_iallreduce(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -564,14 +559,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iallreduce(const void *sendbuf, void MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ialltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_ialltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm, req); + recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -584,14 +580,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ialltoallv(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_ialltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, - recvcounts, rdispls, recvtype, comm, req); + recvcounts, rdispls, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -604,14 +600,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ialltoallw(const void *sendbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, const MPI_Datatype recvtypes[], - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_ialltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, - recvcounts, rdispls, recvtypes, comm, req); + recvcounts, rdispls, recvtypes, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -619,13 +616,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ialltoallw(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iexscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_iexscan(sendbuf, recvbuf, count, datatype, op, comm, req); + ret = MPIDI_POSIX_mpi_iexscan(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -634,14 +632,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iexscan(const void *sendbuf, void *re MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_igather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Request ** req) + int root, MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_igather(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm, req); + recvtype, root, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -651,14 +650,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_igatherv(const void *sendbuf, MPI_Ain MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Request ** req) + int root, MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_igatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, root, comm, req); + displs, recvtype, root, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -668,14 +668,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ireduce_scatter_block(const void *sen void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, - op, comm, req); + op, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -684,13 +684,16 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ireduce_scatter_block(const void *sen MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ireduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint * recvcounts, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, req); + ret = + MPIDI_POSIX_mpi_ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, collattr, + req); MPIR_FUNC_EXIT; return ret; @@ -699,13 +702,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ireduce_scatter(const void *sendbuf, MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ireduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm_ptr, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_ireduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, req); + ret = + MPIDI_POSIX_mpi_ireduce(sendbuf, recvbuf, count, datatype, op, root, comm_ptr, collattr, + req); MPIR_FUNC_EXIT; return ret; @@ -713,13 +718,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_ireduce(const void *sendbuf, void *re MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_POSIX_mpi_iscan(sendbuf, recvbuf, count, datatype, op, comm, req); + ret = MPIDI_POSIX_mpi_iscan(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -728,14 +734,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iscan(const void *sendbuf, void *recv MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iscatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Request ** req) + int root, MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm, req); + recvtype, root, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -746,14 +753,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_SHM_mpi_iscatterv(const void *sendbuf, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, - MPIR_Comm * comm_ptr, MPIR_Request ** req) + MPIR_Comm * comm_ptr, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_POSIX_mpi_iscatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, - recvcount, recvtype, root, comm_ptr, req); + recvcount, recvtype, root, comm_ptr, collattr, req); MPIR_FUNC_EXIT; return ret; diff --git a/src/mpid/ch4/src/ch4_coll.h b/src/mpid/ch4/src/ch4_coll.h index a0e820824e6..fe00e0d5fbf 100644 --- a/src/mpid/ch4/src/ch4_coll.h +++ b/src/mpid/ch4/src/ch4_coll.h @@ -99,8 +99,7 @@ === END_MPI_T_CVAR_INFO_BLOCK === */ -MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_allcomm_composition_json(MPIR_Comm * comm, - MPIR_Errflag_t errflag) +MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_allcomm_composition_json(MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -113,17 +112,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_allcomm_composition_json(MPIR_Comm * cnt = MPIR_Csel_search(MPIDI_COMM(comm, csel_comm), coll_sig); if (cnt == NULL) { - mpi_errno = MPIR_Barrier_impl(comm, errflag); + mpi_errno = MPIR_Barrier_impl(comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } switch (cnt->id) { case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Barrier_intra_composition_alpha: - mpi_errno = MPIDI_Barrier_intra_composition_alpha(comm, errflag); + mpi_errno = MPIDI_Barrier_intra_composition_alpha(comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Barrier_intra_composition_beta: - mpi_errno = MPIDI_Barrier_intra_composition_beta(comm, errflag); + mpi_errno = MPIDI_Barrier_intra_composition_beta(comm, collattr); break; default: MPIR_Assert(0); @@ -137,7 +136,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_allcomm_composition_json(MPIR_Comm * goto fn_exit; } -MPL_STATIC_INLINE_PREFIX int MPID_Barrier(MPIR_Comm * comm, MPIR_Errflag_t errflag) +MPL_STATIC_INLINE_PREFIX int MPID_Barrier(MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; @@ -151,16 +150,16 @@ MPL_STATIC_INLINE_PREFIX int MPID_Barrier(MPIR_Comm * comm, MPIR_Errflag_t errfl (comm->hierarchy_kind == MPIR_COMM_HIERARCHY_KIND__PARENT), mpi_errno, "Barrier composition alpha cannot be applied.\n"); - mpi_errno = MPIDI_Barrier_intra_composition_alpha(comm, errflag); + mpi_errno = MPIDI_Barrier_intra_composition_alpha(comm, collattr); break; case 2: MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, comm->comm_kind == MPIR_COMM_KIND__INTRACOMM, mpi_errno, "Barrier composition beta cannot be applied.\n"); - mpi_errno = MPIDI_Barrier_intra_composition_beta(comm, errflag); + mpi_errno = MPIDI_Barrier_intra_composition_beta(comm, collattr); break; default: - mpi_errno = MPIDI_Barrier_allcomm_composition_json(comm, errflag); + mpi_errno = MPIDI_Barrier_allcomm_composition_json(comm, collattr); break; } @@ -169,9 +168,9 @@ MPL_STATIC_INLINE_PREFIX int MPID_Barrier(MPIR_Comm * comm, MPIR_Errflag_t errfl fallback: if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) - mpi_errno = MPIR_Barrier_impl(comm, errflag); + mpi_errno = MPIR_Barrier_impl(comm, collattr); else - mpi_errno = MPIDI_Barrier_intra_composition_beta(comm, errflag); + mpi_errno = MPIDI_Barrier_intra_composition_beta(comm, collattr); fn_exit: MPIR_FUNC_EXIT; @@ -182,8 +181,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Barrier(MPIR_Comm * comm, MPIR_Errflag_t errfl MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_allcomm_composition_json(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPIR_Csel_coll_sig_s coll_sig = { @@ -200,7 +198,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_allcomm_composition_json(void *buffer, cnt = MPIR_Csel_search(MPIDI_COMM(comm, csel_comm), coll_sig); if (cnt == NULL) { - mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm, errflag); + mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -208,15 +206,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_allcomm_composition_json(void *buffer, switch (cnt->id) { case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Bcast_intra_composition_alpha: mpi_errno = - MPIDI_Bcast_intra_composition_alpha(buffer, count, datatype, root, comm, errflag); + MPIDI_Bcast_intra_composition_alpha(buffer, count, datatype, root, comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Bcast_intra_composition_beta: mpi_errno = - MPIDI_Bcast_intra_composition_beta(buffer, count, datatype, root, comm, errflag); + MPIDI_Bcast_intra_composition_beta(buffer, count, datatype, root, comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Bcast_intra_composition_gamma: mpi_errno = - MPIDI_Bcast_intra_composition_gamma(buffer, count, datatype, root, comm, errflag); + MPIDI_Bcast_intra_composition_gamma(buffer, count, datatype, root, comm, collattr); break; default: MPIR_Assert(0); @@ -231,7 +229,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_allcomm_composition_json(void *buffer, } MPL_STATIC_INLINE_PREFIX int MPID_Bcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, - int root, MPIR_Comm * comm, MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; @@ -245,7 +243,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Bcast(void *buffer, MPI_Aint count, MPI_Dataty MPIR_COMM_HIERARCHY_KIND__PARENT), mpi_errno, "Bcast composition alpha cannot be applied.\n"); mpi_errno = - MPIDI_Bcast_intra_composition_alpha(buffer, count, datatype, root, comm, errflag); + MPIDI_Bcast_intra_composition_alpha(buffer, count, datatype, root, comm, collattr); break; case 2: MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, @@ -254,18 +252,18 @@ MPL_STATIC_INLINE_PREFIX int MPID_Bcast(void *buffer, MPI_Aint count, MPI_Dataty MPIR_COMM_HIERARCHY_KIND__PARENT), mpi_errno, "Bcast composition beta cannot be applied.\n"); mpi_errno = - MPIDI_Bcast_intra_composition_beta(buffer, count, datatype, root, comm, errflag); + MPIDI_Bcast_intra_composition_beta(buffer, count, datatype, root, comm, collattr); break; case 3: MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, comm->comm_kind == MPIR_COMM_KIND__INTRACOMM, mpi_errno, "Bcast composition gamma cannot be applied.\n"); mpi_errno = - MPIDI_Bcast_intra_composition_gamma(buffer, count, datatype, root, comm, errflag); + MPIDI_Bcast_intra_composition_gamma(buffer, count, datatype, root, comm, collattr); break; default: mpi_errno = - MPIDI_Bcast_allcomm_composition_json(buffer, count, datatype, root, comm, errflag); + MPIDI_Bcast_allcomm_composition_json(buffer, count, datatype, root, comm, collattr); break; } @@ -274,10 +272,10 @@ MPL_STATIC_INLINE_PREFIX int MPID_Bcast(void *buffer, MPI_Aint count, MPI_Dataty fallback: if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) - mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm, errflag); + mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm, collattr); else mpi_errno = - MPIDI_Bcast_intra_composition_gamma(buffer, count, datatype, root, comm, errflag); + MPIDI_Bcast_intra_composition_gamma(buffer, count, datatype, root, comm, collattr); fn_exit: MPIR_FUNC_EXIT; @@ -321,7 +319,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_allcomm_composition_json(const void void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -341,7 +339,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_allcomm_composition_json(const void cnt = MPIR_Csel_search(MPIDI_COMM(comm, csel_comm), coll_sig); if (cnt == NULL) { - mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -350,17 +348,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_allcomm_composition_json(const void case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Allreduce_intra_composition_alpha: mpi_errno = MPIDI_Allreduce_intra_composition_alpha(sendbuf, recvbuf, count, datatype, op, - comm, errflag); + comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Allreduce_intra_composition_beta: mpi_errno = MPIDI_Allreduce_intra_composition_beta(sendbuf, recvbuf, count, datatype, op, - comm, errflag); + comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Allreduce_intra_composition_gamma: mpi_errno = MPIDI_Allreduce_intra_composition_gamma(sendbuf, recvbuf, count, datatype, op, - comm, errflag); + comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Allreduce_intra_composition_delta: if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { @@ -379,10 +377,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_allcomm_composition_json(const void count >= num_leads && MPIR_Op_is_commutative(op)) { mpi_errno = MPIDI_Allreduce_intra_composition_delta(sendbuf, recvbuf, count, datatype, op, - num_leads, comm, errflag); + num_leads, comm, collattr); } else mpi_errno = - MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); break; default: MPIR_Assert(0); @@ -398,7 +396,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_allcomm_composition_json(const void MPL_STATIC_INLINE_PREFIX int MPID_Allreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; int is_commutative = -1; @@ -426,7 +424,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allreduce(const void *sendbuf, void *recvbuf, "Allreduce composition alpha cannot be applied.\n"); mpi_errno = MPIDI_Allreduce_intra_composition_alpha(sendbuf, recvbuf, count, datatype, op, comm, - errflag); + collattr); break; case 2: MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, @@ -434,7 +432,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allreduce(const void *sendbuf, void *recvbuf, "Allreduce composition beta cannot be applied.\n"); mpi_errno = MPIDI_Allreduce_intra_composition_beta(sendbuf, recvbuf, count, datatype, op, comm, - errflag); + collattr); break; case 3: MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, @@ -445,7 +443,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allreduce(const void *sendbuf, void *recvbuf, "Allreduce composition gamma cannot be applied.\n"); mpi_errno = MPIDI_Allreduce_intra_composition_gamma(sendbuf, recvbuf, count, datatype, op, comm, - errflag); + collattr); break; case 4: if (comm->comm_kind == MPIR_COMM_KIND__INTRACOMM) { @@ -470,13 +468,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allreduce(const void *sendbuf, void *recvbuf, mpi_errno = MPIDI_Allreduce_intra_composition_delta(sendbuf, recvbuf, count, datatype, op, - num_leads, comm, errflag); + num_leads, comm, collattr); break; default: mpi_errno = MPIDI_Allreduce_allcomm_composition_json(sendbuf, recvbuf, count, datatype, op, - comm, errflag); + comm, collattr); break; } @@ -485,11 +483,11 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allreduce(const void *sendbuf, void *recvbuf, fallback: if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) - mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); else mpi_errno = MPIDI_Allreduce_intra_composition_beta(sendbuf, recvbuf, count, datatype, op, comm, - errflag); + collattr); fn_exit: MPIR_FUNC_EXIT; @@ -533,7 +531,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_allcomm_composition_json(const void MPI_Aint recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -555,7 +553,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_allcomm_composition_json(const void if (cnt == NULL) { mpi_errno = MPIR_Allgather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, - errflag); + collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -568,16 +566,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_allcomm_composition_json(const void mpi_errno = MPIDI_Allgather_intra_composition_alpha(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, - comm, errflag); + comm, collattr); } else mpi_errno = MPIR_Allgather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, - comm, errflag); + comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Allgather_intra_composition_beta: mpi_errno = MPIDI_Allgather_intra_composition_beta(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, comm, errflag); + recvbuf, recvcount, recvtype, comm, + collattr); break; default: MPIR_Assert(0); @@ -594,7 +593,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_allcomm_composition_json(const void MPL_STATIC_INLINE_PREFIX int MPID_Allgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPI_Aint type_size; @@ -625,7 +624,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allgather(const void *sendbuf, MPI_Aint sendco mpi_errno = MPIDI_Allgather_intra_composition_alpha(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, - comm, errflag); + comm, collattr); break; case 2: MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, @@ -633,12 +632,12 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allgather(const void *sendbuf, MPI_Aint sendco "Allgather composition beta cannot be applied.\n"); mpi_errno = MPIDI_Allgather_intra_composition_beta(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, errflag); + recvcount, recvtype, comm, collattr); break; default: mpi_errno = MPIDI_Allgather_allcomm_composition_json(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, - errflag); + collattr); break; } @@ -649,11 +648,11 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allgather(const void *sendbuf, MPI_Aint sendco if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) mpi_errno = MPIR_Allgather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, - errflag); + collattr); else mpi_errno = MPIDI_Allgather_intra_composition_beta(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, comm, errflag); + recvtype, comm, collattr); fn_exit: MPIR_FUNC_ENTER; @@ -665,8 +664,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allgather(const void *sendbuf, MPI_Aint sendco MPL_STATIC_INLINE_PREFIX int MPID_Allgatherv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, - MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -691,7 +689,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allgatherv(const void *sendbuf, MPI_Aint sendc if (cnt == NULL) { mpi_errno = MPIR_Allgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, - recvtype, comm, errflag); + recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -701,7 +699,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allgatherv(const void *sendbuf, MPI_Aint sendc mpi_errno = MPIDI_Allgatherv_intra_composition_alpha(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, - recvtype, comm, errflag); + recvtype, comm, collattr); break; default: MPIR_Assert(0); @@ -719,7 +717,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Allgatherv(const void *sendbuf, MPI_Aint sendc MPL_STATIC_INLINE_PREFIX int MPID_Scatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -743,7 +741,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Scatter(const void *sendbuf, MPI_Aint sendcoun if (cnt == NULL) { MPIR_Scatter_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, - errflag); + collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -752,7 +750,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Scatter(const void *sendbuf, MPI_Aint sendcoun case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Scatter_intra_composition_alpha: mpi_errno = MPIDI_Scatter_intra_composition_alpha(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, errflag); + recvcount, recvtype, root, comm, collattr); break; default: MPIR_Assert(0); @@ -770,7 +768,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Scatter(const void *sendbuf, MPI_Aint sendcoun MPL_STATIC_INLINE_PREFIX int MPID_Scatterv(const void *sendbuf, const MPI_Aint * sendcounts, const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - int root, MPIR_Comm * comm, MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -795,7 +793,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Scatterv(const void *sendbuf, const MPI_Aint * if (cnt == NULL) { MPIR_Scatterv_impl(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, - root, comm, errflag); + root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -805,7 +803,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Scatterv(const void *sendbuf, const MPI_Aint * mpi_errno = MPIDI_Scatterv_intra_composition_alpha(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, - comm, errflag); + comm, collattr); break; default: MPIR_Assert(0); @@ -823,7 +821,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Scatterv(const void *sendbuf, const MPI_Aint * MPL_STATIC_INLINE_PREFIX int MPID_Gather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -848,7 +846,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Gather(const void *sendbuf, MPI_Aint sendcount if (cnt == NULL) { mpi_errno = MPIR_Gather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, - errflag); + collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -857,7 +855,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Gather(const void *sendbuf, MPI_Aint sendcount case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Gather_intra_composition_alpha: mpi_errno = MPIDI_Gather_intra_composition_alpha(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, errflag); + recvcount, recvtype, root, comm, collattr); break; default: MPIR_Assert(0); @@ -876,7 +874,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Gatherv(const void *sendbuf, MPI_Aint sendcoun MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -901,7 +899,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Gatherv(const void *sendbuf, MPI_Aint sendcoun if (cnt == NULL) { mpi_errno = MPIR_Gatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, root, comm, errflag); + displs, recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -911,7 +909,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Gatherv(const void *sendbuf, MPI_Aint sendcoun mpi_errno = MPIDI_Gatherv_intra_composition_alpha(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, - comm, errflag); + comm, collattr); break; default: MPIR_Assert(0); @@ -960,8 +958,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_allcomm_composition_json(const void void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -982,7 +979,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_allcomm_composition_json(const void if (cnt == NULL) { mpi_errno = MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, comm, errflag); + recvbuf, recvcount, recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -995,15 +992,15 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_allcomm_composition_json(const void mpi_errno = MPIDI_Alltoall_intra_composition_alpha(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, - comm, errflag); + comm, collattr); } else mpi_errno = MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, comm, errflag); + recvbuf, recvcount, recvtype, comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Alltoall_intra_composition_beta: mpi_errno = MPIDI_Alltoall_intra_composition_beta(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, comm, errflag); + recvbuf, recvcount, recvtype, comm, collattr); break; default: MPIR_Assert(0); @@ -1019,8 +1016,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_allcomm_composition_json(const void MPL_STATIC_INLINE_PREFIX int MPID_Alltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, - MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPI_Datatype recvtype, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; MPI_Aint type_size; @@ -1050,7 +1046,8 @@ MPL_STATIC_INLINE_PREFIX int MPID_Alltoall(const void *sendbuf, MPI_Aint sendcou mpi_errno = MPIDI_Alltoall_intra_composition_alpha(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, comm, errflag); + recvbuf, recvcount, recvtype, comm, + collattr); break; case 2: MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, @@ -1058,12 +1055,12 @@ MPL_STATIC_INLINE_PREFIX int MPID_Alltoall(const void *sendbuf, MPI_Aint sendcou "Alltoall composition beta cannot be applied.\n"); mpi_errno = MPIDI_Alltoall_intra_composition_beta(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, errflag); + recvcount, recvtype, comm, collattr); break; default: mpi_errno = MPIDI_Alltoall_allcomm_composition_json(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, - errflag); + collattr); break; } @@ -1074,10 +1071,10 @@ MPL_STATIC_INLINE_PREFIX int MPID_Alltoall(const void *sendbuf, MPI_Aint sendcou if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) mpi_errno = MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, - errflag); + collattr); else mpi_errno = MPIDI_Alltoall_intra_composition_beta(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, errflag); + recvcount, recvtype, comm, collattr); fn_exit: MPIR_FUNC_ENTER; @@ -1090,7 +1087,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Alltoallv(const void *sendbuf, const MPI_Aint const MPI_Aint * sdispls, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -1116,7 +1113,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Alltoallv(const void *sendbuf, const MPI_Aint if (cnt == NULL) { mpi_errno = MPIR_Alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, - rdispls, recvtype, comm, errflag); + rdispls, recvtype, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -1126,7 +1123,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Alltoallv(const void *sendbuf, const MPI_Aint mpi_errno = MPIDI_Alltoallv_intra_composition_alpha(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, - rdispls, recvtype, comm, errflag); + rdispls, recvtype, comm, collattr); break; default: MPIR_Assert(0); @@ -1146,7 +1143,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Alltoallw(const void *sendbuf, const MPI_Aint const MPI_Datatype sendtypes[], void *recvbuf, const MPI_Aint recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -1172,7 +1169,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Alltoallw(const void *sendbuf, const MPI_Aint if (cnt == NULL) { mpi_errno = MPIR_Alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, - rdispls, recvtypes, comm, errflag); + rdispls, recvtypes, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -1182,7 +1179,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Alltoallw(const void *sendbuf, const MPI_Aint mpi_errno = MPIDI_Alltoallw_intra_composition_alpha(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, - rdispls, recvtypes, comm, errflag); + rdispls, recvtypes, comm, collattr); break; default: MPIR_Assert(0); @@ -1201,7 +1198,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_allcomm_composition_json(const void *s void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -1221,7 +1218,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_allcomm_composition_json(const void *s cnt = MPIR_Csel_search(MPIDI_COMM(comm, csel_comm), coll_sig); if (cnt == NULL) { - mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, errflag); + mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -1230,17 +1227,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_allcomm_composition_json(const void *s case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Reduce_intra_composition_alpha: mpi_errno = MPIDI_Reduce_intra_composition_alpha(sendbuf, recvbuf, count, datatype, op, - root, comm, errflag); + root, comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Reduce_intra_composition_beta: mpi_errno = MPIDI_Reduce_intra_composition_beta(sendbuf, recvbuf, count, datatype, op, - root, comm, errflag); + root, comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Reduce_intra_composition_gamma: mpi_errno = MPIDI_Reduce_intra_composition_gamma(sendbuf, recvbuf, count, datatype, op, - root, comm, errflag); + root, comm, collattr); break; default: MPIR_Assert(0); @@ -1256,7 +1253,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_allcomm_composition_json(const void *s MPL_STATIC_INLINE_PREFIX int MPID_Reduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - int root, MPIR_Comm * comm, MPIR_Errflag_t errflag) + int root, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; @@ -1279,7 +1276,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce(const void *sendbuf, void *recvbuf, "Reduce composition alpha cannot be applied.\n"); mpi_errno = MPIDI_Reduce_intra_composition_alpha(sendbuf, recvbuf, count, datatype, op, root, - comm, errflag); + comm, collattr); break; case 2: MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, comm->comm_kind == MPIR_COMM_KIND__INTRACOMM @@ -1289,7 +1286,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce(const void *sendbuf, void *recvbuf, "Reduce composition beta cannot be applied.\n"); mpi_errno = MPIDI_Reduce_intra_composition_beta(sendbuf, recvbuf, count, datatype, op, root, - comm, errflag); + comm, collattr); break; case 3: MPII_COLLECTIVE_FALLBACK_CHECK(comm->rank, @@ -1297,12 +1294,12 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce(const void *sendbuf, void *recvbuf, "Reduce composition gamma cannot be applied.\n"); mpi_errno = MPIDI_Reduce_intra_composition_gamma(sendbuf, recvbuf, count, datatype, op, root, - comm, errflag); + comm, collattr); break; default: mpi_errno = MPIDI_Reduce_allcomm_composition_json(sendbuf, recvbuf, count, datatype, op, - root, comm, errflag); + root, comm, collattr); break; } @@ -1311,11 +1308,11 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce(const void *sendbuf, void *recvbuf, fallback: if (comm->comm_kind == MPIR_COMM_KIND__INTERCOMM) - mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, errflag); + mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, collattr); else mpi_errno = MPIDI_Reduce_intra_composition_gamma(sendbuf, recvbuf, count, datatype, op, root, comm, - errflag); + collattr); fn_exit: MPIR_FUNC_EXIT; @@ -1326,8 +1323,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce(const void *sendbuf, void *recvbuf, MPL_STATIC_INLINE_PREFIX int MPID_Reduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint recvcounts[], MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -1349,7 +1345,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce_scatter(const void *sendbuf, void *recv if (cnt == NULL) { mpi_errno = - MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, errflag); + MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -1358,7 +1354,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce_scatter(const void *sendbuf, void *recv case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Reduce_scatter_intra_composition_alpha: mpi_errno = MPIDI_Reduce_scatter_intra_composition_alpha(sendbuf, recvbuf, recvcounts, - datatype, op, comm, errflag); + datatype, op, comm, collattr); break; default: MPIR_Assert(0); @@ -1375,8 +1371,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce_scatter(const void *sendbuf, void *recv MPL_STATIC_INLINE_PREFIX int MPID_Reduce_scatter_block(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, - MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPI_Op op, MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -1399,7 +1394,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce_scatter_block(const void *sendbuf, void if (cnt == NULL) { mpi_errno = MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm, - errflag); + collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -1408,7 +1403,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce_scatter_block(const void *sendbuf, void case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Reduce_scatter_block_intra_composition_alpha: mpi_errno = MPIDI_Reduce_scatter_block_intra_composition_alpha(sendbuf, recvbuf, recvcount, - datatype, op, comm, errflag); + datatype, op, comm, collattr); break; default: MPIR_Assert(0); @@ -1425,7 +1420,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Reduce_scatter_block(const void *sendbuf, void MPL_STATIC_INLINE_PREFIX int MPID_Scan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -1446,7 +1441,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Scan(const void *sendbuf, void *recvbuf, MPI_A cnt = MPIR_Csel_search(MPIDI_COMM(comm, csel_comm), coll_sig); if (cnt == NULL) { - mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -1455,12 +1450,12 @@ MPL_STATIC_INLINE_PREFIX int MPID_Scan(const void *sendbuf, void *recvbuf, MPI_A case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Scan_intra_composition_alpha: mpi_errno = MPIDI_Scan_intra_composition_alpha(sendbuf, recvbuf, count, - datatype, op, comm, errflag); + datatype, op, comm, collattr); break; case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Scan_intra_composition_beta: mpi_errno = MPIDI_Scan_intra_composition_beta(sendbuf, recvbuf, count, - datatype, op, comm, errflag); + datatype, op, comm, collattr); break; default: MPIR_Assert(0); @@ -1477,7 +1472,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Scan(const void *sendbuf, void *recvbuf, MPI_A MPL_STATIC_INLINE_PREFIX int MPID_Exscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; const MPIDI_Csel_container_s *cnt = NULL; @@ -1498,7 +1493,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Exscan(const void *sendbuf, void *recvbuf, MPI cnt = MPIR_Csel_search(MPIDI_COMM(comm, csel_comm), coll_sig); if (cnt == NULL) { - mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag);; + mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm, collattr);; MPIR_ERR_CHECK(mpi_errno); goto fn_exit; } @@ -1507,7 +1502,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Exscan(const void *sendbuf, void *recvbuf, MPI case MPIDI_CSEL_CONTAINER_TYPE__COMPOSITION__MPIDI_Exscan_intra_composition_alpha: mpi_errno = MPIDI_Exscan_intra_composition_alpha(sendbuf, recvbuf, count, - datatype, op, comm, errflag); + datatype, op, comm, collattr); break; default: MPIR_Assert(0); @@ -1702,26 +1697,27 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ineighbor_alltoallw(const void *sendbuf, return ret; } -MPL_STATIC_INLINE_PREFIX int MPID_Ibarrier(MPIR_Comm * comm, MPIR_Request ** req) +MPL_STATIC_INLINE_PREFIX int MPID_Ibarrier(MPIR_Comm * comm, int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_NM_mpi_ibarrier(comm, req); + ret = MPIDI_NM_mpi_ibarrier(comm, collattr, req); MPIR_FUNC_EXIT; return ret; } MPL_STATIC_INLINE_PREFIX int MPID_Ibcast(void *buffer, MPI_Aint count, MPI_Datatype datatype, - int root, MPIR_Comm * comm, MPIR_Request ** req) + int root, MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_NM_mpi_ibcast(buffer, count, datatype, root, comm, req); + ret = MPIDI_NM_mpi_ibcast(buffer, count, datatype, root, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1730,14 +1726,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ibcast(void *buffer, MPI_Aint count, MPI_Datat MPL_STATIC_INLINE_PREFIX int MPID_Iallgather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_NM_mpi_iallgather(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, req); + recvcount, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1747,14 +1743,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Iallgatherv(const void *sendbuf, MPI_Aint send MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_NM_mpi_iallgatherv(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, comm, req); + recvcounts, displs, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1762,13 +1758,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Iallgatherv(const void *sendbuf, MPI_Aint send MPL_STATIC_INLINE_PREFIX int MPID_Iallreduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_NM_mpi_iallreduce(sendbuf, recvbuf, count, datatype, op, comm, req); + ret = MPIDI_NM_mpi_iallreduce(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1777,14 +1773,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Iallreduce(const void *sendbuf, void *recvbuf, MPL_STATIC_INLINE_PREFIX int MPID_Ialltoall(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_NM_mpi_ialltoall(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm, req); + recvcount, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1794,14 +1790,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ialltoallv(const void *sendbuf, const MPI_Aint const MPI_Aint * sdispls, MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, MPI_Datatype recvtype, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_NM_mpi_ialltoallv(sendbuf, sendcounts, sdispls, sendtype, - recvbuf, recvcounts, rdispls, recvtype, comm, req); + recvbuf, recvcounts, rdispls, recvtype, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1812,14 +1808,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ialltoallw(const void *sendbuf, const MPI_Aint const MPI_Datatype * sendtypes, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * rdispls, const MPI_Datatype * recvtypes, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_NM_mpi_ialltoallw(sendbuf, sendcounts, sdispls, sendtypes, - recvbuf, recvcounts, rdispls, recvtypes, comm, req); + recvbuf, recvcounts, rdispls, recvtypes, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1827,13 +1823,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ialltoallw(const void *sendbuf, const MPI_Aint MPL_STATIC_INLINE_PREFIX int MPID_Iexscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_NM_mpi_iexscan(sendbuf, recvbuf, count, datatype, op, comm, req); + ret = MPIDI_NM_mpi_iexscan(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1842,14 +1838,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Iexscan(const void *sendbuf, void *recvbuf, MP MPL_STATIC_INLINE_PREFIX int MPID_Igather(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_NM_mpi_igather(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, req); + recvcount, recvtype, root, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1859,14 +1855,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Igatherv(const void *sendbuf, MPI_Aint sendcou MPI_Datatype sendtype, void *recvbuf, const MPI_Aint * recvcounts, const MPI_Aint * displs, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_NM_mpi_igatherv(sendbuf, sendcount, sendtype, recvbuf, - recvcounts, displs, recvtype, root, comm, req); + recvcounts, displs, recvtype, root, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1875,13 +1871,15 @@ MPL_STATIC_INLINE_PREFIX int MPID_Igatherv(const void *sendbuf, MPI_Aint sendcou MPL_STATIC_INLINE_PREFIX int MPID_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, MPI_Aint recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_NM_mpi_ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm, req); + ret = + MPIDI_NM_mpi_ireduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, op, comm, + collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1890,13 +1888,16 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ireduce_scatter_block(const void *sendbuf, voi MPL_STATIC_INLINE_PREFIX int MPID_Ireduce_scatter(const void *sendbuf, void *recvbuf, const MPI_Aint * recvcounts, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, + MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_NM_mpi_ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, req); + ret = + MPIDI_NM_mpi_ireduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm, collattr, + req); MPIR_FUNC_EXIT; return ret; @@ -1904,13 +1905,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ireduce_scatter(const void *sendbuf, void *rec MPL_STATIC_INLINE_PREFIX int MPID_Ireduce(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm, MPIR_Request ** req) + MPIR_Comm * comm, int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_NM_mpi_ireduce(sendbuf, recvbuf, count, datatype, op, root, comm, req); + ret = MPIDI_NM_mpi_ireduce(sendbuf, recvbuf, count, datatype, op, root, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1918,13 +1919,13 @@ MPL_STATIC_INLINE_PREFIX int MPID_Ireduce(const void *sendbuf, void *recvbuf, MP MPL_STATIC_INLINE_PREFIX int MPID_Iscan(const void *sendbuf, void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; - ret = MPIDI_NM_mpi_iscan(sendbuf, recvbuf, count, datatype, op, comm, req); + ret = MPIDI_NM_mpi_iscan(sendbuf, recvbuf, count, datatype, op, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1933,14 +1934,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Iscan(const void *sendbuf, void *recvbuf, MPI_ MPL_STATIC_INLINE_PREFIX int MPID_Iscatter(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_NM_mpi_iscatter(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, root, comm, req); + recvcount, recvtype, root, comm, collattr, req); MPIR_FUNC_EXIT; return ret; @@ -1950,14 +1951,14 @@ MPL_STATIC_INLINE_PREFIX int MPID_Iscatterv(const void *sendbuf, const MPI_Aint const MPI_Aint * displs, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Request ** req) + int collattr, MPIR_Request ** req) { int ret; MPIR_FUNC_ENTER; ret = MPIDI_NM_mpi_iscatterv(sendbuf, sendcounts, displs, sendtype, - recvbuf, recvcount, recvtype, root, comm, req); + recvbuf, recvcount, recvtype, root, comm, collattr, req); MPIR_FUNC_EXIT; return ret; diff --git a/src/mpid/ch4/src/ch4_coll_impl.h b/src/mpid/ch4/src/ch4_coll_impl.h index 628783c0e60..aec2e99f9aa 100644 --- a/src/mpid/ch4/src/ch4_coll_impl.h +++ b/src/mpid/ch4/src/ch4_coll_impl.h @@ -83,26 +83,26 @@ #define MPIR_ALLREDUCE_SHM_PER_LEADER_MAX 4194304 -MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_alpha(MPIR_Comm * comm, - MPIR_Errflag_t errflag) +MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_alpha(MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; int coll_ret = MPI_SUCCESS; + int errflag = 0; /* do the intranode barrier on all nodes */ if (comm->node_comm != NULL) { #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_barrier(comm->node_comm, errflag); + coll_ret = MPIDI_SHM_mpi_barrier(comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #else - coll_ret = MPIDI_NM_mpi_barrier(comm->node_comm, errflag); + coll_ret = MPIDI_NM_mpi_barrier(comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #endif /* MPIDI_CH4_DIRECT_NETMOD */ } /* do the barrier across roots of all nodes */ if (comm->node_roots_comm != NULL) { - coll_ret = MPIDI_NM_mpi_barrier(comm->node_roots_comm, errflag); + coll_ret = MPIDI_NM_mpi_barrier(comm->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } @@ -112,10 +112,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_alpha(MPIR_Comm * c if (comm->node_comm != NULL) { int i = 0; #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_bcast(&i, 1, MPI_BYTE, 0, comm->node_comm, errflag); + coll_ret = MPIDI_SHM_mpi_bcast(&i, 1, MPI_BYTE, 0, comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #else - coll_ret = MPIDI_NM_mpi_bcast(&i, 1, MPI_BYTE, 0, comm->node_comm, errflag); + coll_ret = MPIDI_NM_mpi_bcast(&i, 1, MPI_BYTE, 0, comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #endif /* MPIDI_CH4_DIRECT_NETMOD */ } @@ -123,12 +123,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_alpha(MPIR_Comm * c return mpi_errno; } -MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_beta(MPIR_Comm * comm, - MPIR_Errflag_t errflag) +MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_beta(MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; - mpi_errno = MPIDI_NM_mpi_barrier(comm, errflag); + mpi_errno = MPIDI_NM_mpi_barrier(comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -140,10 +139,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_beta(MPIR_Comm * co MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_alpha(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; int coll_ret = MPI_SUCCESS; + int errflag = 0; #ifdef HAVE_ERROR_CHECKING MPI_Status status; @@ -151,7 +151,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_alpha(void *buffer, M #endif if (comm->node_roots_comm == NULL && comm->rank == root) { - coll_ret = MPIC_Send(buffer, count, datatype, 0, MPIR_BCAST_TAG, comm->node_comm, errflag); + coll_ret = + MPIC_Send(buffer, count, datatype, 0, MPIR_BCAST_TAG, comm->node_comm, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } @@ -160,12 +162,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_alpha(void *buffer, M #ifndef HAVE_ERROR_CHECKING coll_ret = MPIC_Recv(buffer, count, datatype, MPIR_Get_intranode_rank(comm, root), MPIR_BCAST_TAG, - comm->node_comm, MPI_STATUS_IGNORE); + comm->node_comm, collattr, MPI_STATUS_IGNORE); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #else coll_ret = MPIC_Recv(buffer, count, datatype, MPIR_Get_intranode_rank(comm, root), MPIR_BCAST_TAG, - comm->node_comm, &status); + comm->node_comm, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); MPIR_Datatype_get_size_macro(datatype, type_size); @@ -184,15 +186,17 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_alpha(void *buffer, M if (comm->node_roots_comm != NULL) { coll_ret = MPIDI_NM_mpi_bcast(buffer, count, datatype, MPIR_Get_internode_rank(comm, root), - comm->node_roots_comm, errflag); + comm->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } if (comm->node_comm != NULL) { #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, errflag); + coll_ret = + MPIDI_SHM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #else - coll_ret = MPIDI_NM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, errflag); + coll_ret = + MPIDI_NM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #endif /* MPIDI_CH4_DIRECT_NETMOD */ } @@ -203,36 +207,39 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_alpha(void *buffer, M MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_beta(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; int coll_ret = MPI_SUCCESS; + int errflag = 0; if (comm->node_comm != NULL && MPIR_Get_intranode_rank(comm, root) > 0) { #ifndef MPIDI_CH4_DIRECT_NETMOD coll_ret = MPIDI_SHM_mpi_bcast(buffer, count, datatype, MPIR_Get_intranode_rank(comm, root), - comm->node_comm, errflag); + comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #else coll_ret = MPIDI_NM_mpi_bcast(buffer, count, datatype, MPIR_Get_intranode_rank(comm, root), - comm->node_comm, errflag); + comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #endif /* MPIDI_CH4_DIRECT_NETMOD */ } if (comm->node_roots_comm != NULL) { coll_ret = MPIDI_NM_mpi_bcast(buffer, count, datatype, MPIR_Get_internode_rank(comm, root), - comm->node_roots_comm, errflag); + comm->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } if (comm->node_comm != NULL && MPIR_Get_intranode_rank(comm, root) <= 0) { #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, errflag); + coll_ret = + MPIDI_SHM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #else - coll_ret = MPIDI_NM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, errflag); + coll_ret = + MPIDI_NM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #endif /* MPIDI_CH4_DIRECT_NETMOD */ } @@ -243,11 +250,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_beta(void *buffer, MP MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_gamma(void *buffer, MPI_Aint count, MPI_Datatype datatype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; - mpi_errno = MPIDI_NM_mpi_bcast(buffer, count, datatype, root, comm, errflag); + mpi_errno = MPIDI_NM_mpi_bcast(buffer, count, datatype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -260,11 +267,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_alpha(const void void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; int coll_ret = MPI_SUCCESS; + int errflag = 0; if (comm->node_comm != NULL) { if ((sendbuf == MPI_IN_PLACE) && (comm->node_comm->rank != 0)) { @@ -302,16 +309,18 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_alpha(const void if (comm->node_roots_comm != NULL) { coll_ret = MPIDI_NM_mpi_allreduce(MPI_IN_PLACE, recvbuf, count, datatype, op, - comm->node_roots_comm, errflag); + comm->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } if (comm->node_comm != NULL) { #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_bcast(recvbuf, count, datatype, 0, comm->node_comm, errflag); + coll_ret = + MPIDI_SHM_mpi_bcast(recvbuf, count, datatype, 0, comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #else - coll_ret = MPIDI_NM_mpi_bcast(recvbuf, count, datatype, 0, comm->node_comm, errflag); + coll_ret = + MPIDI_NM_mpi_bcast(recvbuf, count, datatype, 0, comm->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #endif } @@ -323,12 +332,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_beta(const void * void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; - mpi_errno = MPIDI_NM_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIDI_NM_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -341,15 +349,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_gamma(const void void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; #ifndef MPIDI_CH4_DIRECT_NETMOD - mpi_errno = MPIDI_SHM_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIDI_SHM_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, collattr); #else - mpi_errno = MPIDI_NM_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag); + mpi_errno = MPIDI_NM_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, collattr); #endif MPIR_ERR_CHECK(mpi_errno); @@ -372,9 +379,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_delta(const void MPI_Op op, int num_leads, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS, coll_ret = MPI_SUCCESS; + int errflag = 0; char *shm_addr; int my_leader_rank = -1, iter; MPI_Aint num_chunks, chunk_size_floor, chunk_size_ceil; @@ -450,9 +458,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_delta(const void /* Step 0: Barrier to make sure the shm_buffer can be reused after the previous call */ #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #else - coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #endif MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); @@ -468,7 +476,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_delta(const void coll_ret = MPIDI_NM_mpi_reduce((char *) sendbuf + offset * extent, (char *) shm_addr + my_leader_rank * shm_size_per_lead, chunk_count, - datatype, op, 0, MPIDI_COMM(comm_ptr, sub_node_comm), errflag); + datatype, op, 0, MPIDI_COMM(comm_ptr, sub_node_comm), + collattr | errflag); #endif MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); @@ -476,9 +485,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_delta(const void * buffers. */ if (MPIDI_COMM(comm_ptr, intra_node_leads_comm) != NULL) { #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_barrier(MPIDI_COMM(comm_ptr, intra_node_leads_comm), errflag); + coll_ret = + MPIDI_SHM_mpi_barrier(MPIDI_COMM(comm_ptr, intra_node_leads_comm), + collattr | errflag); #else - coll_ret = MPIDI_NM_mpi_barrier(MPIDI_COMM(comm_ptr, intra_node_leads_comm), errflag); + coll_ret = + MPIDI_NM_mpi_barrier(MPIDI_COMM(comm_ptr, intra_node_leads_comm), + collattr | errflag); #endif MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } @@ -531,9 +544,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_delta(const void /* Step 5: Barrier to make sure non-leaders wait for leaders to finish reducing the data * from other nodes */ #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #else - coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #endif MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); @@ -570,11 +583,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_alpha(const void *se void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; int coll_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint true_lb = 0; MPI_Aint true_extent = 0; MPI_Aint extent = 0; @@ -618,7 +631,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_alpha(const void *se if (comm->node_roots_comm != NULL) { coll_ret = MPIDI_NM_mpi_reduce(comm->node_roots_comm->rank == 0 ? MPI_IN_PLACE : inter_sendbuf, - recvbuf, count, datatype, op, 0, comm->node_roots_comm, errflag); + recvbuf, count, datatype, op, 0, comm->node_roots_comm, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } @@ -626,9 +640,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_alpha(const void *se /* Send data to root via point-to-point message if root is not rank 0 in comm */ if (root != 0) { if (comm->rank == 0) { - MPIC_Send(recvbuf, count, datatype, root, MPIR_REDUCE_TAG, comm, errflag); + MPIC_Send(recvbuf, count, datatype, root, MPIR_REDUCE_TAG, comm, collattr | errflag); } else if (comm->rank == root) { - MPIC_Recv(ori_recvbuf, count, datatype, 0, MPIR_REDUCE_TAG, comm, MPI_STATUS_IGNORE); + MPIC_Recv(ori_recvbuf, count, datatype, 0, MPIR_REDUCE_TAG, comm, collattr, + MPI_STATUS_IGNORE); } } @@ -643,11 +658,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sen void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; int coll_ret = MPI_SUCCESS; + int errflag = 0; MPI_Aint true_lb = 0; MPI_Aint true_extent = 0; MPI_Aint extent = 0; @@ -676,7 +691,8 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sen errflag); #else coll_ret = - MPIDI_NM_mpi_reduce(sendbuf, tmp_buf, count, datatype, op, 0, comm->node_comm, errflag); + MPIDI_NM_mpi_reduce(sendbuf, tmp_buf, count, datatype, op, 0, comm->node_comm, + collattr | errflag); #endif /* MPIDI_CH4_DIRECT_NETMOD */ MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } @@ -690,7 +706,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sen coll_ret = MPIDI_NM_mpi_reduce(buf, NULL, count, datatype, op, MPIR_Get_internode_rank(comm, root), - comm->node_roots_comm, errflag); + comm->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } else { /* I am on root's node. I have not participated in the earlier reduce. */ if (comm->rank != root) { @@ -699,7 +715,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sen coll_ret = MPIDI_NM_mpi_reduce(sendbuf, tmp_buf, count, datatype, op, MPIR_Get_internode_rank(comm, root), - comm->node_roots_comm, errflag); + comm->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); @@ -710,7 +726,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sen coll_ret = MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, MPIR_Get_internode_rank(comm, root), - comm->node_roots_comm, errflag); + comm->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); /* set sendbuf to MPI_IN_PLACE to make final intranode reduce easy. */ @@ -725,11 +741,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sen #ifndef MPIDI_CH4_DIRECT_NETMOD coll_ret = MPIDI_SHM_mpi_reduce(sendbuf, recvbuf, count, datatype, - op, MPIR_Get_intranode_rank(comm, root), comm->node_comm, errflag); + op, MPIR_Get_intranode_rank(comm, root), comm->node_comm, + collattr | errflag); #else coll_ret = MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype, - op, MPIR_Get_intranode_rank(comm, root), comm->node_comm, errflag); + op, MPIR_Get_intranode_rank(comm, root), comm->node_comm, + collattr | errflag); #endif /* MPIDI_CH4_DIRECT_NETMOD */ MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } @@ -747,12 +765,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_gamma(const void *se void *recvbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, int root, - MPIR_Comm * comm, - MPIR_Errflag_t errflag) + MPIR_Comm * comm, int collattr) { int mpi_errno = MPI_SUCCESS; - mpi_errno = MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, root, comm, errflag); + mpi_errno = MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -771,9 +788,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_intra_composition_alpha(const void * int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS, coll_ret = MPI_SUCCESS; + int errflag = 0; int num_nodes; int num_ranks = MPIR_Comm_size(comm_ptr); int node_comm_size = MPIR_Comm_size(comm_ptr->node_comm); @@ -814,9 +832,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_intra_composition_alpha(const void * /* Barrier to make sure that the shm buffer can be reused after the previous call to Alltoall */ #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #else - coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #endif MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); @@ -844,9 +862,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_intra_composition_alpha(const void * /* Barrier to make sure each rank has copied the data to the shm buf */ #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #else - coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #endif MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); @@ -862,7 +880,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_intra_composition_alpha(const void * my_node_comm_rank * num_nodes * node_comm_size * type_size * sendcount), node_comm_size * sendcount, sendtype, recvbuf, sendcount * node_comm_size, sendtype, - MPIDI_COMM(comm_ptr, multi_leads_comm), errflag); + MPIDI_COMM(comm_ptr, multi_leads_comm), collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); fn_exit: @@ -876,13 +894,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_intra_composition_beta(const void *s MPI_Aint recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIDI_NM_mpi_alltoall(sendbuf, sendcount, sendtype, recvbuf, - recvcount, recvtype, comm_ptr, errflag); + recvcount, recvtype, comm_ptr, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -900,13 +918,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallv_intra_composition_alpha(const void const MPI_Aint * rdispls, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIDI_NM_mpi_alltoallv(sendbuf, sendcounts, sdispls, - sendtype, recvbuf, recvcounts, rdispls, recvtype, comm_ptr, errflag); + sendtype, recvbuf, recvcounts, rdispls, recvtype, comm_ptr, + collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -926,14 +945,14 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallw_intra_composition_alpha(const void const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIDI_NM_mpi_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, - rdispls, recvtypes, comm_ptr, errflag); + rdispls, recvtypes, comm_ptr, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -949,9 +968,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_intra_composition_alpha(const void int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS, coll_ret = MPI_SUCCESS; + int errflag = 0; int node_comm_size = MPIR_Comm_size(comm_ptr->node_comm); int my_node_comm_rank = MPIR_Comm_rank(comm_ptr->node_comm); MPI_Aint type_size, extent, true_extent, lb; @@ -1006,9 +1026,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_intra_composition_alpha(const void /* Barrier to make sure that the shm buffer can be reused after the previous call to Allgather */ #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #else - coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #endif MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); @@ -1022,9 +1042,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_intra_composition_alpha(const void /* Barrier to make sure all the ranks in a node_comm copied data to shm buffer */ #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_SHM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #else - coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, errflag); + coll_ret = MPIDI_NM_mpi_barrier(comm_ptr->node_comm, collattr | errflag); #endif /* Perform inter-node allgather on the multi leader comms */ @@ -1032,7 +1052,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_intra_composition_alpha(const void MPIDI_NM_mpi_allgather((char *) MPIDI_COMM_ALLGATHER(comm_ptr, shm_addr), sendcount * node_comm_size, sendtype, recvbuf, recvcount * node_comm_size, recvtype, - MPIDI_COMM(comm_ptr, multi_leads_comm), errflag); + MPIDI_COMM(comm_ptr, multi_leads_comm), collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); fn_exit: @@ -1046,13 +1066,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_intra_composition_beta(const void * MPI_Aint recvcount, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIDI_NM_mpi_allgather(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, comm_ptr, errflag); + recvbuf, recvcount, recvtype, comm_ptr, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -1069,13 +1089,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Allgatherv_intra_composition_alpha(const void const MPI_Aint * displs, MPI_Datatype recvtype, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIDI_NM_mpi_allgatherv(sendbuf, sendcount, sendtype, - recvbuf, recvcounts, displs, recvtype, comm_ptr, errflag); + recvbuf, recvcounts, displs, recvtype, comm_ptr, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -1090,13 +1110,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Gather_intra_composition_alpha(const void *se void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIDI_NM_mpi_gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm, errflag); + recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -1113,13 +1133,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Gatherv_intra_composition_alpha(const void *s const MPI_Aint * displs, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIDI_NM_mpi_gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, - displs, recvtype, root, comm, errflag); + displs, recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -1135,13 +1155,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scatter_intra_composition_alpha(const void *s MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIDI_NM_mpi_scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, - recvtype, root, comm, errflag); + recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -1158,13 +1178,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scatterv_intra_composition_alpha(const void * MPI_Aint recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIDI_NM_mpi_scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, - recvcount, recvtype, root, comm, errflag); + recvcount, recvtype, root, comm, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -1180,12 +1200,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_intra_composition_alpha(const MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = - MPIDI_NM_mpi_reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag); + MPIDI_NM_mpi_reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -1203,14 +1223,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_block_intra_composition_alpha( MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t - errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIDI_NM_mpi_reduce_scatter_block(sendbuf, recvbuf, recvcount, datatype, - op, comm_ptr, errflag); + op, comm_ptr, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -1224,11 +1243,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *send MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; int coll_ret = MPI_SUCCESS; + int errflag = 0; int rank = comm_ptr->rank; MPI_Status status; void *tempbuf = NULL; @@ -1268,11 +1287,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *send if (comm_ptr->node_comm != NULL) { #ifndef MPIDI_CH4_DIRECT_NETMOD coll_ret = - MPIDI_SHM_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm_ptr->node_comm, errflag); + MPIDI_SHM_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm_ptr->node_comm, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #else coll_ret = - MPIDI_NM_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm_ptr->node_comm, errflag); + MPIDI_NM_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm_ptr->node_comm, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #endif /* MPIDI_CH4_DIRECT_NETMOD */ } else if (sendbuf != MPI_IN_PLACE) { @@ -1286,13 +1307,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *send if (comm_ptr->node_roots_comm != NULL && comm_ptr->node_comm != NULL) { coll_ret = MPIC_Recv(localfulldata, count, datatype, comm_ptr->node_comm->local_size - 1, MPIR_SCAN_TAG, - comm_ptr->node_comm, &status); + comm_ptr->node_comm, collattr, &status); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } else if (comm_ptr->node_roots_comm == NULL && comm_ptr->node_comm != NULL && MPIR_Get_intranode_rank(comm_ptr, rank) == comm_ptr->node_comm->local_size - 1) { coll_ret = MPIC_Send(recvbuf, count, datatype, - 0, MPIR_SCAN_TAG, comm_ptr->node_comm, errflag); + 0, MPIR_SCAN_TAG, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } else if (comm_ptr->node_roots_comm != NULL) { localfulldata = recvbuf; @@ -1304,19 +1325,19 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *send if (comm_ptr->node_roots_comm != NULL) { coll_ret = MPIDI_NM_mpi_scan(localfulldata, prefulldata, count, datatype, - op, comm_ptr->node_roots_comm, errflag); + op, comm_ptr->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); if (MPIR_Get_internode_rank(comm_ptr, rank) != comm_ptr->node_roots_comm->local_size - 1) { coll_ret = MPIC_Send(prefulldata, count, datatype, MPIR_Get_internode_rank(comm_ptr, rank) + 1, - MPIR_SCAN_TAG, comm_ptr->node_roots_comm, errflag); + MPIR_SCAN_TAG, comm_ptr->node_roots_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } if (MPIR_Get_internode_rank(comm_ptr, rank) != 0) { coll_ret = MPIC_Recv(tempbuf, count, datatype, MPIR_Get_internode_rank(comm_ptr, rank) - 1, - MPIR_SCAN_TAG, comm_ptr->node_roots_comm, &status); + MPIR_SCAN_TAG, comm_ptr->node_roots_comm, collattr, &status); noneed = 0; MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); } @@ -1330,10 +1351,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *send if (comm_ptr->node_comm != NULL) { #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_bcast(&noneed, 1, MPI_INT, 0, comm_ptr->node_comm, errflag); + coll_ret = + MPIDI_SHM_mpi_bcast(&noneed, 1, MPI_INT, 0, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #else - coll_ret = MPIDI_NM_mpi_bcast(&noneed, 1, MPI_INT, 0, comm_ptr->node_comm, errflag); + coll_ret = + MPIDI_NM_mpi_bcast(&noneed, 1, MPI_INT, 0, comm_ptr->node_comm, collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #endif /* MPIDI_CH4_DIRECT_NETMOD */ } @@ -1342,11 +1365,13 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *send if (comm_ptr->node_comm != NULL) { #ifndef MPIDI_CH4_DIRECT_NETMOD coll_ret = - MPIDI_SHM_mpi_bcast(tempbuf, count, datatype, 0, comm_ptr->node_comm, errflag); + MPIDI_SHM_mpi_bcast(tempbuf, count, datatype, 0, comm_ptr->node_comm, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #else coll_ret = - MPIDI_NM_mpi_bcast(tempbuf, count, datatype, 0, comm_ptr->node_comm, errflag); + MPIDI_NM_mpi_bcast(tempbuf, count, datatype, 0, comm_ptr->node_comm, + collattr | errflag); MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); #endif /* MPIDI_CH4_DIRECT_NETMOD */ } @@ -1367,12 +1392,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_beta(const void *sendb MPI_Aint count, MPI_Datatype datatype, MPI_Op op, - MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + MPIR_Comm * comm_ptr, int collattr) { int mpi_errno = MPI_SUCCESS; - mpi_errno = MPIDI_NM_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); + mpi_errno = MPIDI_NM_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: @@ -1387,11 +1411,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Exscan_intra_composition_alpha(const void *se MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, - MPIR_Errflag_t errflag) + int collattr) { int mpi_errno = MPI_SUCCESS; - mpi_errno = MPIDI_NM_mpi_exscan(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag); + mpi_errno = MPIDI_NM_mpi_exscan(sendbuf, recvbuf, count, datatype, op, comm_ptr, collattr); MPIR_ERR_CHECK(mpi_errno); fn_exit: diff --git a/src/mpid/common/sched/mpidu_sched.c b/src/mpid/common/sched/mpidu_sched.c index c92e980a6c4..62ff602a966 100644 --- a/src/mpid/common/sched/mpidu_sched.c +++ b/src/mpid/common/sched/mpidu_sched.c @@ -227,16 +227,16 @@ static int MPIDU_Sched_start_entry(struct MPIDU_Sched *s, size_t idx, struct MPI * during realloc of entries, so this is easier */ ret_errno = MPIC_Isend(e->u.send.buf, *e->u.send.count_p, e->u.send.datatype, e->u.send.dest, s->tag, comm, &e->u.send.sreq, - r->u.nbc.errflag); + e->u.send.collattr | r->u.nbc.errflag); } else { if (e->u.send.is_sync) { ret_errno = MPIC_Issend(e->u.send.buf, e->u.send.count, e->u.send.datatype, e->u.send.dest, s->tag, comm, &e->u.send.sreq, - r->u.nbc.errflag); + e->u.send.collattr | r->u.nbc.errflag); } else { ret_errno = MPIC_Isend(e->u.send.buf, e->u.send.count, e->u.send.datatype, e->u.send.dest, s->tag, comm, &e->u.send.sreq, - r->u.nbc.errflag); + e->u.send.collattr | r->u.nbc.errflag); } } /* Check if the error is actually fatal to the NBC or we can continue. */ @@ -259,7 +259,8 @@ static int MPIDU_Sched_start_entry(struct MPIDU_Sched *s, size_t idx, struct MPI MPL_DBG_MSG_D(MPIR_DBG_COMM, VERBOSE, "starting RECV entry %d\n", (int) idx); comm = e->u.recv.comm; ret_errno = MPIC_Irecv(e->u.recv.buf, e->u.recv.count, e->u.recv.datatype, - e->u.recv.src, s->tag, comm, &e->u.recv.rreq); + e->u.recv.src, s->tag, comm, e->u.recv.collattr, + &e->u.recv.rreq); /* Check if the error is actually fatal to the NBC or we can continue. */ if (unlikely(ret_errno)) { if (MPIR_ERR_NONE == r->u.nbc.errflag) { @@ -643,7 +644,7 @@ static int MPIDU_Sched_add_entry(struct MPIDU_Sched *s, int *idx, struct MPIDU_S /* do these ops need an entry handle returned? */ int MPIDU_Sched_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, - MPIR_Comm * comm, MPIR_Sched_t s) + MPIR_Comm * comm, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; struct MPIDU_Sched_entry *e = NULL; @@ -662,6 +663,7 @@ int MPIDU_Sched_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int e->u.send.dest = dest; e->u.send.sreq = NULL; /* will be populated by _start_entry */ e->u.send.comm = comm; + e->u.send.collattr = collattr; e->u.send.is_sync = FALSE; /* the user may free the comm & type after initiating but before the @@ -720,7 +722,7 @@ int MPIDU_Sched_pt2pt_send(const void *buf, MPI_Aint count, MPI_Datatype datatyp } int MPIDU_Sched_ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, - MPIR_Comm * comm, MPIR_Sched_t s) + MPIR_Comm * comm, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; struct MPIDU_Sched_entry *e = NULL; @@ -739,6 +741,7 @@ int MPIDU_Sched_ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, in e->u.send.dest = dest; e->u.send.sreq = NULL; /* will be populated by _start_entry */ e->u.send.comm = comm; + e->u.send.collattr = collattr; e->u.send.is_sync = TRUE; /* the user may free the comm & type after initiating but before the @@ -759,7 +762,7 @@ int MPIDU_Sched_ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, in int MPIDU_Sched_send_defer(const void *buf, const MPI_Aint * count, MPI_Datatype datatype, int dest, - MPIR_Comm * comm, MPIR_Sched_t s) + MPIR_Comm * comm, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; struct MPIDU_Sched_entry *e = NULL; @@ -778,6 +781,7 @@ int MPIDU_Sched_send_defer(const void *buf, const MPI_Aint * count, MPI_Datatype e->u.send.dest = dest; e->u.send.sreq = NULL; /* will be populated by _start_entry */ e->u.send.comm = comm; + e->u.send.collattr = collattr; e->u.send.is_sync = FALSE; /* the user may free the comm & type after initiating but before the @@ -797,7 +801,7 @@ int MPIDU_Sched_send_defer(const void *buf, const MPI_Aint * count, MPI_Datatype } int MPIDU_Sched_recv_status(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, - MPIR_Comm * comm, MPI_Status * status, MPIR_Sched_t s) + MPIR_Comm * comm, MPI_Status * status, int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; struct MPIDU_Sched_entry *e = NULL; @@ -815,6 +819,7 @@ int MPIDU_Sched_recv_status(void *buf, MPI_Aint count, MPI_Datatype datatype, in e->u.recv.src = src; e->u.recv.rreq = NULL; /* will be populated by _start_entry */ e->u.recv.comm = comm; + e->u.recv.collattr = collattr; e->u.recv.status = status; status->MPI_ERROR = MPI_SUCCESS; MPIR_Comm_add_ref(comm); @@ -831,7 +836,7 @@ int MPIDU_Sched_recv_status(void *buf, MPI_Aint count, MPI_Datatype datatype, in } int MPIDU_Sched_recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, MPIR_Comm * comm, - MPIR_Sched_t s) + int collattr, MPIR_Sched_t s) { int mpi_errno = MPI_SUCCESS; struct MPIDU_Sched_entry *e = NULL; @@ -849,6 +854,7 @@ int MPIDU_Sched_recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, e->u.recv.src = src; e->u.recv.rreq = NULL; /* will be populated by _start_entry */ e->u.recv.comm = comm; + e->u.recv.collattr = collattr; e->u.recv.status = MPI_STATUS_IGNORE; MPIR_Comm_add_ref(comm); diff --git a/src/mpid/common/sched/mpidu_sched.h b/src/mpid/common/sched/mpidu_sched.h index 3c7ce414bba..0cb67011425 100644 --- a/src/mpid/common/sched/mpidu_sched.h +++ b/src/mpid/common/sched/mpidu_sched.h @@ -44,6 +44,7 @@ struct MPIDU_Sched_send { int dest; struct MPIR_Comm *comm; struct MPIR_Request *sreq; + int collattr; int is_sync; /* TRUE iff this send is an ssend */ }; @@ -55,6 +56,7 @@ struct MPIDU_Sched_recv { int src; struct MPIR_Comm *comm; struct MPIR_Request *rreq; + int collattr; MPI_Status *status; }; @@ -142,9 +144,9 @@ int MPIDU_Sched_reset(MPIR_Sched_t s); void *MPIDU_Sched_alloc_state(MPIR_Sched_t s, MPI_Aint size); int MPIDU_Sched_start(MPIR_Sched_t sp, struct MPIR_Comm *comm, struct MPIR_Request **req); int MPIDU_Sched_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, - struct MPIR_Comm *comm, MPIR_Sched_t s); + struct MPIR_Comm *comm, int collattr, MPIR_Sched_t s); int MPIDU_Sched_recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, - struct MPIR_Comm *comm, MPIR_Sched_t s); + struct MPIR_Comm *comm, int collattr, MPIR_Sched_t s); int MPIDU_Sched_pt2pt_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int tag, int dest, struct MPIR_Comm *comm, MPIR_Sched_t s); int MPIDU_Sched_pt2pt_recv(void *buf, MPI_Aint count, MPI_Datatype datatype,