1414 * Copyright (c) 2013 Los Alamos National Security, LLC. All Rights
1515 * reserved.
1616 * Copyright (c) 2013 FUJITSU LIMITED. All rights reserved.
17- * Copyright (c) 2014-2016 Research Organization for Information Science
17+ * Copyright (c) 2014-2017 Research Organization for Information Science
1818 * and Technology (RIST). All rights reserved.
1919 * $COPYRIGHT$
2020 *
@@ -78,7 +78,7 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, const int *rcounts
7878 /* in-place alltoallv slow algorithm (but works) */
7979 for (i = 0 ; i < size ; ++ i ) {
8080 for (j = i + 1 ; j < size ; ++ j ) {
81- if (i == rank && rcounts [j ]) {
81+ if (i == rank && 0 != rcounts [j ] && 0 != rdtype_size ) {
8282 /* Copy the data into the temporary buffer */
8383 err = ompi_datatype_copy_content_same_ddt (rdtype , rcounts [j ],
8484 tmp_buffer , (char * ) rbuf + rdisps [j ] * ext );
@@ -93,7 +93,7 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, const int *rcounts
9393 j , MCA_COLL_BASE_TAG_ALLTOALLV , MCA_PML_BASE_SEND_STANDARD ,
9494 comm ));
9595 if (MPI_SUCCESS != err ) { goto error_hndl ; }
96- } else if (j == rank && rcounts [i ]) {
96+ } else if (j == rank && 0 != rcounts [i ] && 0 != rdtype_size ) {
9797 /* Copy the data into the temporary buffer */
9898 err = ompi_datatype_copy_content_same_ddt (rdtype , rcounts [i ],
9999 tmp_buffer , (char * ) rbuf + rdisps [i ] * ext );
0 commit comments