@@ -186,6 +186,7 @@ int orte_util_encode_nodemap(opal_buffer_t *buffer)
186
186
char * * regexargs = NULL , * tmp , * tmp2 ;
187
187
orte_node_t * nptr ;
188
188
int rc ;
189
+ uint8_t ui8 ;
189
190
190
191
/* setup the list of results */
191
192
OBJ_CONSTRUCT (& nodenms , opal_list_t );
@@ -594,6 +595,28 @@ int orte_util_encode_nodemap(opal_buffer_t *buffer)
594
595
free (tmp );
595
596
}
596
597
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
+
597
620
/* handle the topologies - as the most common case by far
598
621
* is to have homogeneous topologies, we only send them
599
622
* if something is different */
@@ -684,6 +707,7 @@ int orte_util_decode_daemon_nodemap(opal_buffer_t *buffer)
684
707
opal_buffer_t * bptr = NULL ;
685
708
orte_topology_t * t ;
686
709
orte_regex_range_t * rng , * drng , * srng , * frng ;
710
+ uint8_t ui8 ;
687
711
688
712
/* unpack the node regex */
689
713
n = 1 ;
@@ -739,6 +763,30 @@ int orte_util_decode_daemon_nodemap(opal_buffer_t *buffer)
739
763
goto cleanup ;
740
764
}
741
765
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
+
742
790
/* unpack the topos regex - this may not have been
743
791
* provided (e.g., for a homogeneous machine) */
744
792
n = 1 ;
0 commit comments