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-2015 Research Organization for Information Science
17
+ * Copyright (c) 2014-2016 Research Organization for Information Science
18
18
* and Technology (RIST). All rights reserved.
19
19
* $COPYRIGHT$
20
20
*
@@ -45,7 +45,7 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, const int *rcounts
45
45
mca_coll_base_module_t * base_module = (mca_coll_base_module_t * ) module ;
46
46
int i , j , size , rank , err = MPI_SUCCESS ;
47
47
ompi_request_t * * preq , * * reqs ;
48
- char * tmp_buffer ;
48
+ char * allocated_buffer , * tmp_buffer ;
49
49
size_t max_size , rdtype_size ;
50
50
OPAL_PTRDIFF_TYPE ext , gap = 0 ;
51
51
@@ -69,11 +69,11 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, const int *rcounts
69
69
/* The gap will always be the same as we are working on the same datatype */
70
70
71
71
/* Allocate a temporary buffer */
72
- tmp_buffer = calloc (max_size , 1 );
73
- if (NULL == tmp_buffer ) {
72
+ allocated_buffer = calloc (max_size , 1 );
73
+ if (NULL == allocated_buffer ) {
74
74
return OMPI_ERR_OUT_OF_RESOURCE ;
75
75
}
76
- tmp_buffer += gap ;
76
+ tmp_buffer = allocated_buffer - gap ;
77
77
78
78
/* Initiate all send/recv to/from others. */
79
79
reqs = preq = coll_base_comm_get_reqs (base_module -> base_data , 2 );
@@ -126,7 +126,7 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, const int *rcounts
126
126
127
127
error_hndl :
128
128
/* Free the temporary buffer */
129
- free (tmp_buffer );
129
+ free (allocated_buffer );
130
130
if ( MPI_SUCCESS != err ) {
131
131
ompi_coll_base_free_reqs (reqs , 2 );
132
132
}
0 commit comments