Update the gridengine allocator to support data from multiple queues by checking for duplicate node entries
This commit was SVN r26148.
Этот коммит содержится в:
родитель
61d2818831
Коммит
33ed3cda07
@ -64,6 +64,8 @@ static int orte_ras_gridengine_allocate(opal_list_t *nodelist)
|
|||||||
int rc;
|
int rc;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
orte_node_t *node;
|
orte_node_t *node;
|
||||||
|
opal_list_item_t *item;
|
||||||
|
bool found;
|
||||||
|
|
||||||
/* show the Grid Engine's JOB_ID */
|
/* show the Grid Engine's JOB_ID */
|
||||||
if (mca_ras_gridengine_component.show_jobid ||
|
if (mca_ras_gridengine_component.show_jobid ||
|
||||||
@ -92,6 +94,20 @@ static int orte_ras_gridengine_allocate(opal_list_t *nodelist)
|
|||||||
queue = strtok_r(NULL, " \n", &tok);
|
queue = strtok_r(NULL, " \n", &tok);
|
||||||
arch = strtok_r(NULL, " \n", &tok);
|
arch = strtok_r(NULL, " \n", &tok);
|
||||||
|
|
||||||
|
/* see if we already have this node */
|
||||||
|
found = false;
|
||||||
|
for (item = opal_list_get_first(nodelist);
|
||||||
|
item != opal_list_get_end(nodelist);
|
||||||
|
item = opal_list_get_next(item)) {
|
||||||
|
node = (orte_node_t*)item;
|
||||||
|
if (0 == strcmp(ptr, node->name)) {
|
||||||
|
/* just add the slots */
|
||||||
|
node->slots += (int)strtol(num, (char **)NULL, 10);
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found) {
|
||||||
/* create a new node entry */
|
/* create a new node entry */
|
||||||
node = OBJ_NEW(orte_node_t);
|
node = OBJ_NEW(orte_node_t);
|
||||||
if (NULL == node) {
|
if (NULL == node) {
|
||||||
@ -107,7 +123,7 @@ static int orte_ras_gridengine_allocate(opal_list_t *nodelist)
|
|||||||
"ras:gridengine: %s: PE_HOSTFILE shows slots=%d",
|
"ras:gridengine: %s: PE_HOSTFILE shows slots=%d",
|
||||||
node->name, node->slots);
|
node->name, node->slots);
|
||||||
opal_list_append(nodelist, &node->super);
|
opal_list_append(nodelist, &node->super);
|
||||||
|
}
|
||||||
} /* finished reading the $PE_HOSTFILE */
|
} /* finished reading the $PE_HOSTFILE */
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user