Skip to content

Commit 2ab7ec9

Browse files
committed
small patch from dalcinl
again for the data free code for alltoallw non-blocking variants Signed-off-by: Howard Pritchard <[email protected]>
1 parent 7fced6c commit 2ab7ec9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/mpi/bindings/ompi_bindings/c_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ def final_code(self):
681681
code.append(f'if((MPI_SUCCESS == ret_value) && (MPI_REQUEST_NULL != {request_tmp_name}) && (!REQUEST_COMPLETE({request_tmp_name})))' + '{')
682682
code.append(f'ompi_coll_base_nbc_request_t* nb_request = (ompi_coll_base_nbc_request_t*){request_tmp_name};')
683683
code.append('assert(nb_request->data.release_arrays[idx] == NULL);')
684-
code.append(f'nb_request->data.release_arrays[idx++] = (void *){self.tmpname};')
684+
code.append(f'if (NULL != {self.tmpname}) nb_request->data.release_arrays[idx++] = (void *){self.tmpname};')
685685
code.append('nb_request->data.release_arrays[idx] = NULL;')
686686
code.append('} else {')
687687
code.append(f'if (NULL != {self.tmpname}) free({self.tmpname});')

0 commit comments

Comments
 (0)