@@ -186,6 +186,7 @@ int orte_util_encode_nodemap(opal_buffer_t *buffer)
186186 char * * regexargs = NULL , * tmp , * tmp2 ;
187187 orte_node_t * nptr ;
188188 int rc ;
189+ uint8_t ui8 ;
189190
190191 /* setup the list of results */
191192 OBJ_CONSTRUCT (& nodenms , opal_list_t );
@@ -594,6 +595,28 @@ int orte_util_encode_nodemap(opal_buffer_t *buffer)
594595 free (tmp );
595596 }
596597
598+ /* pack a flag indicating if the HNP was included in the allocation */
599+ if (orte_hnp_is_allocated ) {
600+ ui8 = 1 ;
601+ } else {
602+ ui8 = 0 ;
603+ }
604+ if (ORTE_SUCCESS != (rc = opal_dss .pack (buffer , & ui8 , 1 , OPAL_UINT8 ))) {
605+ ORTE_ERROR_LOG (rc );
606+ return rc ;
607+ }
608+
609+ /* pack a flag indicating if we are in a managed allocation */
610+ if (orte_managed_allocation ) {
611+ ui8 = 1 ;
612+ } else {
613+ ui8 = 0 ;
614+ }
615+ if (ORTE_SUCCESS != (rc = opal_dss .pack (buffer , & ui8 , 1 , OPAL_UINT8 ))) {
616+ ORTE_ERROR_LOG (rc );
617+ return rc ;
618+ }
619+
597620 /* handle the topologies - as the most common case by far
598621 * is to have homogeneous topologies, we only send them
599622 * if something is different */
@@ -684,6 +707,7 @@ int orte_util_decode_daemon_nodemap(opal_buffer_t *buffer)
684707 opal_buffer_t * bptr = NULL ;
685708 orte_topology_t * t ;
686709 orte_regex_range_t * rng , * drng , * srng , * frng ;
710+ uint8_t ui8 ;
687711
688712 /* unpack the node regex */
689713 n = 1 ;
@@ -739,6 +763,30 @@ int orte_util_decode_daemon_nodemap(opal_buffer_t *buffer)
739763 goto cleanup ;
740764 }
741765
766+ /* unpack the flag indicating if the HNP was allocated */
767+ n = 1 ;
768+ if (ORTE_SUCCESS != (rc = opal_dss .unpack (buffer , & ui8 , & n , OPAL_UINT8 ))) {
769+ ORTE_ERROR_LOG (rc );
770+ goto cleanup ;
771+ }
772+ if (0 == ui8 ) {
773+ orte_hnp_is_allocated = false;
774+ } else {
775+ orte_hnp_is_allocated = true;
776+ }
777+
778+ /* unpack the flag indicating we are in a managed allocation */
779+ n = 1 ;
780+ if (ORTE_SUCCESS != (rc = opal_dss .unpack (buffer , & ui8 , & n , OPAL_UINT8 ))) {
781+ ORTE_ERROR_LOG (rc );
782+ goto cleanup ;
783+ }
784+ if (0 == ui8 ) {
785+ orte_managed_allocation = false;
786+ } else {
787+ orte_managed_allocation = true;
788+ }
789+
742790 /* unpack the topos regex - this may not have been
743791 * provided (e.g., for a homogeneous machine) */
744792 n = 1 ;
0 commit comments