@@ -44,7 +44,7 @@ int orte_ras_base_node_insert(opal_list_t* nodes, orte_job_t *jdata)
4444 opal_list_item_t * item ;
4545 orte_std_cntr_t num_nodes ;
4646 int rc , i ;
47- orte_node_t * node , * hnp_node ;
47+ orte_node_t * node , * hnp_node , * nptr ;
4848 char * ptr ;
4949 bool hnp_alone = true;
5050 orte_attribute_t * kv ;
@@ -61,10 +61,16 @@ int orte_ras_base_node_insert(opal_list_t* nodes, orte_job_t *jdata)
6161 ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ),
6262 (long )num_nodes ));
6363
64+ /* mark the job as being a large-cluster sim if that was requested */
65+ if (1 < orte_ras_base .multiplier ) {
66+ orte_set_attribute (& jdata -> attributes , ORTE_JOB_MULTI_DAEMON_SIM ,
67+ ORTE_ATTR_GLOBAL , NULL , OPAL_BOOL );
68+ }
69+
6470 /* set the size of the global array - this helps minimize time
6571 * spent doing realloc's
6672 */
67- if (ORTE_SUCCESS != (rc = opal_pointer_array_set_size (orte_node_pool , num_nodes ))) {
73+ if (ORTE_SUCCESS != (rc = opal_pointer_array_set_size (orte_node_pool , num_nodes * orte_ras_base . multiplier ))) {
6874 ORTE_ERROR_LOG (rc );
6975 return rc ;
7076 }
@@ -139,6 +145,12 @@ int orte_ras_base_node_insert(opal_list_t* nodes, orte_job_t *jdata)
139145 }
140146 /* don't keep duplicate copy */
141147 OBJ_RELEASE (node );
148+ /* create copies, if required */
149+ for (i = 1 ; i < orte_ras_base .multiplier ; i ++ ) {
150+ opal_dss .copy ((void * * )& node , hnp_node , ORTE_NODE );
151+ ORTE_FLAG_UNSET (node , ORTE_NODE_FLAG_DAEMON_LAUNCHED );
152+ node -> index = opal_pointer_array_add (orte_node_pool , node );
153+ }
142154 } else {
143155 /* insert the object onto the orte_nodes global array */
144156 OPAL_OUTPUT_VERBOSE ((5 , orte_ras_base_framework .framework_output ,
@@ -166,7 +178,11 @@ int orte_ras_base_node_insert(opal_list_t* nodes, orte_job_t *jdata)
166178 }
167179 /* indicate the HNP is not alone */
168180 hnp_alone = false;
169- }
181+ for (i = 1 ; i < orte_ras_base .multiplier ; i ++ ) {
182+ opal_dss .copy ((void * * )& nptr , node , ORTE_NODE );
183+ nptr -> index = opal_pointer_array_add (orte_node_pool , nptr );
184+ }
185+ }
170186 }
171187
172188 /* if we didn't find any fqdn names in the allocation, then
0 commit comments