14
14
* Copyright (c) 2013 Los Alamos National Security, LLC. All Rights
15
15
* reserved.
16
16
* 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
18
18
* and Technology (RIST). All rights reserved.
19
19
* $COPYRIGHT$
20
20
*
@@ -78,7 +78,7 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, const int *rcounts
78
78
/* in-place alltoallv slow algorithm (but works) */
79
79
for (i = 0 ; i < size ; ++ i ) {
80
80
for (j = i + 1 ; j < size ; ++ j ) {
81
- if (i == rank && rcounts [j ]) {
81
+ if (i == rank && 0 != rcounts [j ] && 0 != rdtype_size ) {
82
82
/* Copy the data into the temporary buffer */
83
83
err = ompi_datatype_copy_content_same_ddt (rdtype , rcounts [j ],
84
84
tmp_buffer , (char * ) rbuf + rdisps [j ] * ext );
@@ -93,7 +93,7 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, const int *rcounts
93
93
j , MCA_COLL_BASE_TAG_ALLTOALLV , MCA_PML_BASE_SEND_STANDARD ,
94
94
comm ));
95
95
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 ) {
97
97
/* Copy the data into the temporary buffer */
98
98
err = ompi_datatype_copy_content_same_ddt (rdtype , rcounts [i ],
99
99
tmp_buffer , (char * ) rbuf + rdisps [i ] * ext );
0 commit comments