1
1
/*
2
2
* Copyright (C) 2001-2017 Mellanox Technologies Ltd. ALL RIGHTS RESERVED.
3
- * Copyright (c) 2019-2020 High Performance Computing Center Stuttgart,
3
+ * Copyright (c) 2019-2022 High Performance Computing Center Stuttgart,
4
4
* University of Stuttgart. All rights reserved.
5
5
* Copyright (c) 2021 IBM Corporation. All rights reserved.
6
6
* $COPYRIGHT$
@@ -255,7 +255,7 @@ static inline int get_dynamic_win_info(uint64_t remote_addr, ompi_osc_ucx_module
255
255
int target , bool lock_required ) {
256
256
uint64_t remote_state_addr = (module -> state_addrs )[target ] + OSC_UCX_STATE_DYNAMIC_WIN_CNT_OFFSET ;
257
257
size_t remote_state_len = sizeof (uint64_t ) + sizeof (ompi_osc_dynamic_win_info_t ) * OMPI_OSC_UCX_ATTACH_MAX ;
258
- char * temp_buf = calloc ( remote_state_len , 1 ) ;
258
+ char * temp_buf ;
259
259
ompi_osc_dynamic_win_info_t * temp_dynamic_wins ;
260
260
int contain = 0 ;
261
261
uint64_t win_count ;
@@ -268,11 +268,12 @@ static inline int get_dynamic_win_info(uint64_t remote_addr, ompi_osc_ucx_module
268
268
* Therefore, force lock is needed. Remote process protects its window
269
269
* attach/detach operations with an acc-lock */
270
270
ret = ompi_osc_state_lock (module , target , & lock_acquired , true);
271
- if (ret != OMPI_SUCCESS ) {
271
+ if (OMPI_SUCCESS != ret ) {
272
272
return ret ;
273
273
}
274
274
}
275
275
276
+ temp_buf = calloc (remote_state_len , 1 );
276
277
ret = opal_common_ucx_wpmem_putget (module -> state_mem , OPAL_COMMON_UCX_GET , target ,
277
278
(void * )((intptr_t )temp_buf ),
278
279
remote_state_len , remote_state_addr );
0 commit comments