@@ -448,7 +448,11 @@ int ompi_comm_create_w_info (ompi_communicator_t *comm, ompi_group_t *group, opa
448448 if (info ) {
449449 opal_info_dup (info , & (newcomp -> super .s_info ));
450450 }
451- ompi_info_memkind_copy_or_set (& comm -> instance -> super , & newcomp -> super , info );
451+ ompi_info_memkind_assert_type type ;
452+ ompi_info_memkind_copy_or_set (& comm -> instance -> super , & newcomp -> super , info , & type );
453+ if (OMPI_INFO_MEMKIND_ASSERT_NO_ACCEL == type ) {
454+ newcomp -> c_assertions |= OMPI_COMM_ASSERT_NO_ACCEL_BUF ;
455+ }
452456
453457 /* Set name for debugging purposes */
454458 snprintf (newcomp -> c_name , MPI_MAX_OBJECT_NAME , "MPI COMMUNICATOR %s CREATE FROM %s" ,
@@ -705,8 +709,11 @@ int ompi_comm_split_with_info( ompi_communicator_t* comm, int color, int key,
705709 if (info ) {
706710 opal_info_dup (info , & (newcomp -> super .s_info ));
707711 }
708- ompi_info_memkind_copy_or_set (& comm -> instance -> super , & newcomp -> super , info );
709-
712+ ompi_info_memkind_assert_type type ;
713+ ompi_info_memkind_copy_or_set (& comm -> instance -> super , & newcomp -> super , info , & type );
714+ if (OMPI_INFO_MEMKIND_ASSERT_NO_ACCEL == type ) {
715+ newcomp -> c_assertions |= OMPI_COMM_ASSERT_NO_ACCEL_BUF ;
716+ }
710717 /* Activate the communicator and init coll-component */
711718 rc = ompi_comm_activate (& newcomp , comm , NULL , NULL , NULL , false, mode );
712719
@@ -997,7 +1004,11 @@ static int ompi_comm_split_type_core(ompi_communicator_t *comm,
9971004 if (info ) {
9981005 opal_infosubscribe_change_info (& newcomp -> super , info );
9991006 }
1000- ompi_info_memkind_copy_or_set (& comm -> instance -> super , & newcomp -> super , info );
1007+ ompi_info_memkind_assert_type type ;
1008+ ompi_info_memkind_copy_or_set (& comm -> instance -> super , & newcomp -> super , info , & type );
1009+ if (OMPI_INFO_MEMKIND_ASSERT_NO_ACCEL == type ) {
1010+ newcomp -> c_assertions |= OMPI_COMM_ASSERT_NO_ACCEL_BUF ;
1011+ }
10011012
10021013 /* Activate the communicator and init coll-component */
10031014 rc = ompi_comm_activate (& newcomp , comm , NULL , NULL , NULL , false, mode );
@@ -1351,7 +1362,11 @@ int ompi_comm_dup_with_info ( ompi_communicator_t * comm, opal_info_t *info, omp
13511362 if (info ) {
13521363 opal_infosubscribe_change_info (& newcomp -> super , info );
13531364 }
1354- ompi_info_memkind_copy_or_set (& comm -> instance -> super , & newcomp -> super , info );
1365+ ompi_info_memkind_assert_type type ;
1366+ ompi_info_memkind_copy_or_set (& comm -> instance -> super , & newcomp -> super , info , & type );
1367+ if (OMPI_INFO_MEMKIND_ASSERT_NO_ACCEL == type ) {
1368+ newcomp -> c_assertions |= OMPI_COMM_ASSERT_NO_ACCEL_BUF ;
1369+ }
13551370
13561371 /* activate communicator and init coll-module */
13571372 rc = ompi_comm_activate (& newcomp , comm , NULL , NULL , NULL , false, mode );
@@ -1442,7 +1457,12 @@ static int ompi_comm_idup_internal (ompi_communicator_t *comm, ompi_group_t *gro
14421457 if (info ) {
14431458 opal_info_dup (info , & (newcomp -> super .s_info ));
14441459 }
1445- ompi_info_memkind_copy_or_set (& comm -> super , & newcomp -> super , info );
1460+
1461+ ompi_info_memkind_assert_type type ;
1462+ ompi_info_memkind_copy_or_set (& comm -> super , & newcomp -> super , info , & type );
1463+ if (OMPI_INFO_MEMKIND_ASSERT_NO_ACCEL == type ) {
1464+ newcomp -> c_assertions |= OMPI_COMM_ASSERT_NO_ACCEL_BUF ;
1465+ }
14461466 }
14471467
14481468 ompi_comm_request_schedule_append (request , ompi_comm_idup_getcid , subreq , subreq [0 ] ? 1 : 0 );
@@ -1594,7 +1614,11 @@ int ompi_comm_create_from_group (ompi_group_t *group, const char *tag, opal_info
15941614 if (NULL == newcomp -> super .s_info ) {
15951615 return OMPI_ERR_OUT_OF_RESOURCE ;
15961616 }
1597- ompi_info_memkind_copy_or_set (& group -> grp_instance -> super , & newcomp -> super , info );
1617+ ompi_info_memkind_assert_type type ;
1618+ ompi_info_memkind_copy_or_set (& group -> grp_instance -> super , & newcomp -> super , info , & type );
1619+ if (OMPI_INFO_MEMKIND_ASSERT_NO_ACCEL == type ) {
1620+ newcomp -> c_assertions |= OMPI_COMM_ASSERT_NO_ACCEL_BUF ;
1621+ }
15981622
15991623 /* activate communicator and init coll-module. use the group allreduce implementation as
16001624 * no collective module has yet been selected. the tag does not matter as any tag will
@@ -1736,7 +1760,12 @@ int ompi_intercomm_create (ompi_communicator_t *local_comm, int local_leader, om
17361760
17371761 // Copy info if there is one.
17381762 newcomp -> super .s_info = OBJ_NEW (opal_info_t );
1739- ompi_info_memkind_copy_or_set (& local_comm -> instance -> super , & newcomp -> super , & ompi_mpi_info_null .info .super );
1763+ ompi_info_memkind_assert_type type ;
1764+ ompi_info_memkind_copy_or_set (& local_comm -> instance -> super , & newcomp -> super ,
1765+ & ompi_mpi_info_null .info .super , & type );
1766+ if (OMPI_INFO_MEMKIND_ASSERT_NO_ACCEL == type ) {
1767+ newcomp -> c_assertions |= OMPI_COMM_ASSERT_NO_ACCEL_BUF ;
1768+ }
17401769
17411770 * newintercomm = newcomp ;
17421771
@@ -1900,7 +1929,11 @@ int ompi_intercomm_create_from_groups (ompi_group_t *local_group, int local_lead
19001929 if (info ) {
19011930 opal_info_dup (info , & (newcomp -> super .s_info ));
19021931 }
1903- ompi_info_memkind_copy_or_set (& local_group -> grp_instance -> super , & newcomp -> super , info );
1932+ ompi_info_memkind_assert_type type ;
1933+ ompi_info_memkind_copy_or_set (& local_group -> grp_instance -> super , & newcomp -> super , info , & type );
1934+ if (OMPI_INFO_MEMKIND_ASSERT_NO_ACCEL == type ) {
1935+ newcomp -> c_assertions |= OMPI_COMM_ASSERT_NO_ACCEL_BUF ;
1936+ }
19041937
19051938 /* activate communicator and init coll-module */
19061939 rc = ompi_comm_activate (& newcomp , local_comm , leader_comm , & local_leader , & leader_comm_remote_leader ,
0 commit comments