Skip to content

Commit dea9ef2

Browse files
author
Ralph Castain
authored
Merge pull request #3637 from hjelmn/osc_sm_info_fix
osc/sm: fix SEGV in new info usage
2 parents 6d68d2e + d10e645 commit dea9ef2

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

ompi/mca/osc/sm/osc_sm_component.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,9 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit
180180
calloc(1, sizeof(ompi_osc_sm_module_t));
181181
if (NULL == module) return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
182182

183-
OBJ_CONSTRUCT(&module->lock, opal_mutex_t);
184-
185-
ret = opal_infosubscribe_subscribe(&(win->super), "blocking_fence", "false",
186-
component_set_blocking_fence_info);
187-
188-
module->global_state->use_barrier_for_fence = 1;
183+
win->w_osc_module = &module->super;
189184

190-
if (OPAL_SUCCESS != ret) goto error;
185+
OBJ_CONSTRUCT(&module->lock, opal_mutex_t);
191186

192187
ret = opal_infosubscribe_subscribe(&(win->super), "alloc_shared_contig", "false", component_set_alloc_shared_noncontig_info);
193188

@@ -390,18 +385,20 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit
390385
#endif
391386
}
392387

388+
ret = opal_infosubscribe_subscribe(&(win->super), "blocking_fence", "false",
389+
component_set_blocking_fence_info);
390+
391+
if (OPAL_SUCCESS != ret) goto error;
392+
393393
ret = module->comm->c_coll->coll_barrier(module->comm,
394394
module->comm->c_coll->coll_barrier_module);
395395
if (OMPI_SUCCESS != ret) goto error;
396396

397397
*model = MPI_WIN_UNIFIED;
398398

399-
win->w_osc_module = &module->super;
400-
401399
return OMPI_SUCCESS;
402400

403401
error:
404-
win->w_osc_module = &module->super;
405402
ompi_osc_sm_free (win);
406403

407404
return ret;

0 commit comments

Comments
 (0)