Remove the code handling zero count cases in ADAPT.
Set request in ibcast.c to empty when the count is 0. Signed-off-by: Xi Luo <xluo12@vols.utk.edu> Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Этот коммит содержится в:
родитель
c2970a3695
Коммит
e59bde912e
@ -15,9 +15,6 @@
|
||||
int ompi_coll_adapt_bcast(void *buff, int count, struct ompi_datatype_t *datatype, int root,
|
||||
struct ompi_communicator_t *comm, mca_coll_base_module_t * module)
|
||||
{
|
||||
if (count == 0) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
ompi_request_t *request = NULL;
|
||||
int err = ompi_coll_adapt_ibcast(buff, count, datatype, root, comm, &request, module);
|
||||
if( MPI_SUCCESS != err ) {
|
||||
|
@ -329,21 +329,6 @@ int ompi_coll_adapt_ibcast(void *buff, int count, struct ompi_datatype_t *dataty
|
||||
struct ompi_communicator_t *comm, ompi_request_t ** request,
|
||||
mca_coll_base_module_t * module)
|
||||
{
|
||||
if (0 == count) {
|
||||
ompi_request_t *temp_request = OBJ_NEW(ompi_request_t);
|
||||
OMPI_REQUEST_INIT(temp_request, false);
|
||||
temp_request->req_type = 0;
|
||||
temp_request->req_free = ompi_coll_adapt_request_free;
|
||||
temp_request->req_status.MPI_SOURCE = 0;
|
||||
temp_request->req_status.MPI_TAG = 0;
|
||||
temp_request->req_status.MPI_ERROR = 0;
|
||||
temp_request->req_status._cancelled = 0;
|
||||
temp_request->req_status._ucount = 0;
|
||||
ompi_request_complete(temp_request, 1);
|
||||
*request = temp_request;
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
OPAL_OUTPUT_VERBOSE((10, mca_coll_adapt_component.adapt_output,
|
||||
"ibcast root %d, algorithm %d, coll_adapt_ibcast_segment_size %zu, coll_adapt_ibcast_max_send_requests %d, coll_adapt_ibcast_max_recv_requests %d\n",
|
||||
root, mca_coll_adapt_component.adapt_ibcast_algorithm,
|
||||
|
@ -521,10 +521,6 @@ int ompi_coll_adapt_ireduce(const void *sbuf, void *rbuf, int count, struct ompi
|
||||
struct ompi_op_t *op, int root, struct ompi_communicator_t *comm,
|
||||
ompi_request_t ** request, mca_coll_base_module_t * module)
|
||||
{
|
||||
if (count == 0) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
OPAL_OUTPUT_VERBOSE((10, mca_coll_adapt_component.adapt_output,
|
||||
"ireduce root %d, algorithm %d, coll_adapt_ireduce_segment_size %zu, coll_adapt_ireduce_max_send_requests %d, coll_adapt_ireduce_max_recv_requests %d\n",
|
||||
root, mca_coll_adapt_component.adapt_ireduce_algorithm,
|
||||
|
@ -17,9 +17,6 @@ int ompi_coll_adapt_reduce(const void *sbuf, void *rbuf, int count, struct ompi_
|
||||
struct ompi_op_t *op, int root, struct ompi_communicator_t *comm,
|
||||
mca_coll_base_module_t * module)
|
||||
{
|
||||
if (count == 0) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
ompi_request_t *request = NULL;
|
||||
int err = ompi_coll_adapt_ireduce(sbuf, rbuf, count, dtype, op, root, comm, &request, module);
|
||||
if( MPI_SUCCESS != err ) {
|
||||
|
@ -100,6 +100,7 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype,
|
||||
|
||||
if ((OMPI_COMM_IS_INTRA(comm) && ompi_comm_size(comm) <= 1) ||
|
||||
0 == count) {
|
||||
*request = &ompi_request_empty;
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user