@@ -52,13 +52,13 @@ ompi_predefined_win_t *ompi_mpi_win_null_addr = &ompi_mpi_win_null;
5252mca_base_var_enum_t * ompi_win_accumulate_ops = NULL ;
5353mca_base_var_enum_flag_t * ompi_win_accumulate_order = NULL ;
5454
55- static mca_base_var_enum_value_t accumulate_ops_values [] = {
55+ static const mca_base_var_enum_value_t accumulate_ops_values [] = {
5656 {.value = OMPI_WIN_ACCUMULATE_OPS_SAME_OP_NO_OP , .string = "same_op_no_op" ,},
5757 {.value = OMPI_WIN_ACCUMULATE_OPS_SAME_OP , .string = "same_op" ,},
5858 {.value = -1 , .string = NULL },
5959};
6060
61- static mca_base_var_enum_value_flag_t accumulate_order_flags [] = {
61+ static const mca_base_var_enum_value_flag_t accumulate_order_flags [] = {
6262 {.flag = OMPI_WIN_ACC_ORDER_NONE , .string = "none" , .conflicting_flag = OMPI_WIN_ACC_ORDER_RAR |
6363 OMPI_WIN_ACC_ORDER_WAR | OMPI_WIN_ACC_ORDER_RAW | OMPI_WIN_ACC_ORDER_WAW },
6464 {.flag = OMPI_WIN_ACC_ORDER_RAR , .string = "rar" , .conflicting_flag = OMPI_WIN_ACC_ORDER_NONE },
@@ -152,7 +152,14 @@ static int alloc_window(struct ompi_communicator_t *comm, opal_info_t *info, int
152152 return OMPI_ERR_OUT_OF_RESOURCE ;
153153 }
154154
155- ret = opal_info_get_value_enum (info , "accumulate_ops" , & acc_ops ,
155+ /* Copy the info for the info layer */
156+ win -> super .s_info = OBJ_NEW (opal_info_t );
157+ if (info ) {
158+ opal_info_dup (info , & (win -> super .s_info ));
159+ }
160+
161+
162+ ret = opal_info_get_value_enum (win -> super .s_info , "accumulate_ops" , & acc_ops ,
156163 OMPI_WIN_ACCUMULATE_OPS_SAME_OP_NO_OP ,
157164 ompi_win_accumulate_ops , & flag );
158165 if (OMPI_SUCCESS != ret ) {
@@ -162,7 +169,7 @@ static int alloc_window(struct ompi_communicator_t *comm, opal_info_t *info, int
162169
163170 win -> w_acc_ops = (ompi_win_accumulate_ops_t )acc_ops ;
164171
165- ret = opal_info_get_value_enum (info , "accumulate_order" , & acc_order ,
172+ ret = opal_info_get_value_enum (win -> super . s_info , "accumulate_order" , & acc_order ,
166173 OMPI_WIN_ACC_ORDER_RAR | OMPI_WIN_ACC_ORDER_WAR |
167174 OMPI_WIN_ACC_ORDER_RAW | OMPI_WIN_ACC_ORDER_WAW ,
168175 & (ompi_win_accumulate_order -> super ), & flag );
@@ -180,12 +187,6 @@ static int alloc_window(struct ompi_communicator_t *comm, opal_info_t *info, int
180187 OBJ_RETAIN (group );
181188 win -> w_group = group ;
182189
183- /* Copy the info for the info layer */
184- win -> super .s_info = OBJ_NEW (opal_info_t );
185- if (info ) {
186- opal_info_dup (info , & (win -> super .s_info ));
187- }
188-
189190 * win_out = win ;
190191
191192 return OMPI_SUCCESS ;
@@ -243,7 +244,7 @@ ompi_win_create(void *base, size_t size,
243244 return ret ;
244245 }
245246
246- ret = ompi_osc_base_select (win , & base , size , disp_unit , comm , info , MPI_WIN_FLAVOR_CREATE , & model );
247+ ret = ompi_osc_base_select (win , & base , size , disp_unit , comm , MPI_WIN_FLAVOR_CREATE , & model );
247248 if (OMPI_SUCCESS != ret ) {
248249 OBJ_RELEASE (win );
249250 return ret ;
@@ -255,6 +256,9 @@ ompi_win_create(void *base, size_t size,
255256 return ret ;
256257 }
257258
259+ /* MPI-4 §12.2.7 requires us to remove all unknown keys from the info object */
260+ opal_info_remove_unreferenced (win -> super .s_info );
261+
258262 * newwin = win ;
259263
260264 return OMPI_SUCCESS ;
@@ -275,7 +279,7 @@ ompi_win_allocate(size_t size, int disp_unit, opal_info_t *info,
275279 return ret ;
276280 }
277281
278- ret = ompi_osc_base_select (win , & base , size , disp_unit , comm , info , MPI_WIN_FLAVOR_ALLOCATE , & model );
282+ ret = ompi_osc_base_select (win , & base , size , disp_unit , comm , MPI_WIN_FLAVOR_ALLOCATE , & model );
279283 if (OMPI_SUCCESS != ret ) {
280284 OBJ_RELEASE (win );
281285 return ret ;
@@ -287,6 +291,9 @@ ompi_win_allocate(size_t size, int disp_unit, opal_info_t *info,
287291 return ret ;
288292 }
289293
294+ /* MPI-4 §12.2.7 requires us to remove all unknown keys from the info object */
295+ opal_info_remove_unreferenced (win -> super .s_info );
296+
290297 * ((void * * ) baseptr ) = base ;
291298 * newwin = win ;
292299
@@ -308,7 +315,7 @@ ompi_win_allocate_shared(size_t size, int disp_unit, opal_info_t *info,
308315 return ret ;
309316 }
310317
311- ret = ompi_osc_base_select (win , & base , size , disp_unit , comm , info , MPI_WIN_FLAVOR_SHARED , & model );
318+ ret = ompi_osc_base_select (win , & base , size , disp_unit , comm , MPI_WIN_FLAVOR_SHARED , & model );
312319 if (OMPI_SUCCESS != ret ) {
313320 OBJ_RELEASE (win );
314321 return ret ;
@@ -320,6 +327,9 @@ ompi_win_allocate_shared(size_t size, int disp_unit, opal_info_t *info,
320327 return ret ;
321328 }
322329
330+ /* MPI-4 §12.2.7 requires us to remove all unknown keys from the info object */
331+ opal_info_remove_unreferenced (win -> super .s_info );
332+
323333 * ((void * * ) baseptr ) = base ;
324334 * newwin = win ;
325335
@@ -339,7 +349,7 @@ ompi_win_create_dynamic(opal_info_t *info, ompi_communicator_t *comm, ompi_win_t
339349 return ret ;
340350 }
341351
342- ret = ompi_osc_base_select (win , MPI_BOTTOM , 0 , 1 , comm , info , MPI_WIN_FLAVOR_DYNAMIC , & model );
352+ ret = ompi_osc_base_select (win , MPI_BOTTOM , 0 , 1 , comm , MPI_WIN_FLAVOR_DYNAMIC , & model );
343353 if (OMPI_SUCCESS != ret ) {
344354 OBJ_RELEASE (win );
345355 return ret ;
@@ -351,6 +361,9 @@ ompi_win_create_dynamic(opal_info_t *info, ompi_communicator_t *comm, ompi_win_t
351361 return ret ;
352362 }
353363
364+ /* MPI-4 §12.2.7 requires us to remove all unknown keys from the info object */
365+ opal_info_remove_unreferenced (win -> super .s_info );
366+
354367 * newwin = win ;
355368
356369 return OMPI_SUCCESS ;
0 commit comments