File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -323,10 +323,10 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
323
323
324
324
opal_progress_register (spml_ucx_default_progress );
325
325
326
- mca_spml_ucx .remote_addrs_tbl = (char * * * )calloc (mca_spml_ucx .ucp_workers , sizeof (char * * * ));
326
+ mca_spml_ucx .remote_addrs_tbl = (char * * * )calloc (mca_spml_ucx .ucp_workers ,
327
+ sizeof (mca_spml_ucx .remote_addrs_tbl [0 ]));
327
328
for (w = 0 ; w < ucp_workers ; w ++ ) {
328
- mca_spml_ucx .remote_addrs_tbl [w ] = (char * * )calloc (nprocs , sizeof (char * * ));
329
- memset (mca_spml_ucx .remote_addrs_tbl [w ], 0 , nprocs * sizeof (char * * ));
329
+ mca_spml_ucx .remote_addrs_tbl [w ] = (char * * )calloc (nprocs , sizeof (mca_spml_ucx .remote_addrs_tbl [w ][0 ]));
330
330
}
331
331
332
332
/* Store all remote addresses */
@@ -369,6 +369,8 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
369
369
free (wk_raddrs );
370
370
free (wk_rsizes );
371
371
free (wk_roffs );
372
+ free (wk_addr_len );
373
+ free (wk_local_addr );
372
374
373
375
SPML_UCX_VERBOSE (50 , "*** ADDED PROCS ***" );
374
376
@@ -404,6 +406,8 @@ int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
404
406
free (wk_rsizes );
405
407
free (wk_roffs );
406
408
error :
409
+ free (wk_addr_len );
410
+ free (wk_local_addr );
407
411
rc = OSHMEM_ERR_OUT_OF_RESOURCE ;
408
412
SPML_UCX_ERROR ("add procs FAILED rc=%d" , rc );
409
413
return rc ;
You can’t perform that action at this time.
0 commit comments