@@ -310,12 +310,14 @@ ompi_coll_base_alltoallv_intra_basic_linear(const void *sbuf, const int *scounts
310
310
continue ;
311
311
}
312
312
313
- ++ nreqs ;
314
- prcv = ((char * ) rbuf ) + (ptrdiff_t )rdisps [i ] * rext ;
315
- err = MCA_PML_CALL (irecv_init (prcv , rcounts [i ], rdtype ,
316
- i , MCA_COLL_BASE_TAG_ALLTOALLV , comm ,
317
- preq ++ ));
318
- if (MPI_SUCCESS != err ) { goto err_hndl ; }
313
+ if (rcounts [i ] > 0 ) {
314
+ ++ nreqs ;
315
+ prcv = ((char * ) rbuf ) + (ptrdiff_t )rdisps [i ] * rext ;
316
+ err = MCA_PML_CALL (irecv_init (prcv , rcounts [i ], rdtype ,
317
+ i , MCA_COLL_BASE_TAG_ALLTOALLV , comm ,
318
+ preq ++ ));
319
+ if (MPI_SUCCESS != err ) { goto err_hndl ; }
320
+ }
319
321
}
320
322
321
323
/* Now post all sends */
@@ -324,13 +326,15 @@ ompi_coll_base_alltoallv_intra_basic_linear(const void *sbuf, const int *scounts
324
326
continue ;
325
327
}
326
328
327
- ++ nreqs ;
328
- psnd = ((char * ) sbuf ) + (ptrdiff_t )sdisps [i ] * sext ;
329
- err = MCA_PML_CALL (isend_init (psnd , scounts [i ], sdtype ,
330
- i , MCA_COLL_BASE_TAG_ALLTOALLV ,
331
- MCA_PML_BASE_SEND_STANDARD , comm ,
332
- preq ++ ));
333
- if (MPI_SUCCESS != err ) { goto err_hndl ; }
329
+ if (scounts [i ] > 0 ) {
330
+ ++ nreqs ;
331
+ psnd = ((char * ) sbuf ) + (ptrdiff_t )sdisps [i ] * sext ;
332
+ err = MCA_PML_CALL (isend_init (psnd , scounts [i ], sdtype ,
333
+ i , MCA_COLL_BASE_TAG_ALLTOALLV ,
334
+ MCA_PML_BASE_SEND_STANDARD , comm ,
335
+ preq ++ ));
336
+ if (MPI_SUCCESS != err ) { goto err_hndl ; }
337
+ }
334
338
}
335
339
336
340
/* Start your engines. This will never return an error. */
0 commit comments