1515 * Copyright (c) 2015 Research Organization for Information Science
1616 * and Technology (RIST). All rights reserved.
1717 * Copyright (c) 2017-2022 IBM Corporation. All rights reserved.
18- * Copyright (c) 2024 Triad National Security, LLC. All rights
18+ * Copyright (c) 2024-2025 Triad National Security, LLC. All rights
1919 * reserved.
2020 * $COPYRIGHT$
2121 *
@@ -59,6 +59,7 @@ PROTOTYPE ERROR_CLASS comm_split_type(COMM comm, INT split_type, INT key,
5959 if ( MPI_COMM_TYPE_SHARED != split_type && // Same as OMPI_COMM_TYPE_NODE
6060 MPI_COMM_TYPE_HW_UNGUIDED != split_type &&
6161 MPI_COMM_TYPE_HW_GUIDED != split_type &&
62+ MPI_COMM_TYPE_RESOURCE_GUIDED != split_type &&
6263 OMPI_COMM_TYPE_CLUSTER != split_type &&
6364 OMPI_COMM_TYPE_CU != split_type &&
6465 OMPI_COMM_TYPE_HOST != split_type &&
@@ -93,8 +94,9 @@ PROTOTYPE ERROR_CLASS comm_split_type(COMM comm, INT split_type, INT key,
9394 }
9495#endif
9596
96- if ( MPI_COMM_TYPE_HW_GUIDED == split_type ) {
97- int flag;
97+ if (( MPI_COMM_TYPE_HW_GUIDED == split_type ) ||
98+ ( MPI_COMM_TYPE_RESOURCE_GUIDED == split_type)) {
99+ int flag_hw, flag_res;
98100 opal_cstring_t *value = NULL;
99101
100102 /* MPI_Info is required for this split_type.
@@ -106,15 +108,25 @@ PROTOTYPE ERROR_CLASS comm_split_type(COMM comm, INT split_type, INT key,
106108 OMPI_ERRHANDLER_RETURN ( rc, comm, rc, FUNC_NAME);
107109 }
108110
109- /* MPI_Info with key "mpi_hw_resource_type" is required for this split_type.
111+ /* MPI_Info with key "mpi_hw_resource_type" or "mpi_pset_name",
112+ * in the case of MPI_COMM_TYPE_RESOURCED_GUIDED, is required for
113+ * these split_types.
110114 * Not an error condition, per MPI 4.0.
111115 */
112- ompi_info_get(info, "mpi_hw_resource_type", &value, &flag );
113- if ( !flag ) {
116+ ompi_info_get(info, "mpi_hw_resource_type", &value, &flag_hw );
117+ if ( !flag_hw && (MPI_COMM_TYPE_HW_GUIDED == split_type) ) {
114118 *newcomm = MPI_COMM_NULL;
115119 rc = MPI_SUCCESS;
116120 OMPI_ERRHANDLER_RETURN ( rc, comm, rc, FUNC_NAME);
117121 }
122+ if( !flag_hw && (MPI_COMM_TYPE_RESOURCE_GUIDED == split_type)) {
123+ ompi_info_get(info, "mpi_pset_name", &value, &flag_res);
124+ if ( !flag_res ) {
125+ *newcomm = MPI_COMM_NULL;
126+ rc = MPI_SUCCESS;
127+ OMPI_ERRHANDLER_RETURN ( rc, comm, rc, FUNC_NAME);
128+ }
129+ }
118130 }
119131
120132 if( (MPI_COMM_SELF == comm) && (MPI_UNDEFINED == split_type) ) {
0 commit comments