Clean up a couple of minor typos. Bring the new bproc-related RAS components online.
This commit was SVN r15328.
Этот коммит содержится в:
родитель
5ae68f82b2
Коммит
39013e2a18
@ -110,7 +110,6 @@ static orte_ras_base_module_t *orte_ras_bjs_init(int* priority)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* see if bjs is running */
|
||||
if (getenv("BJS_SOCKET") == NULL) {
|
||||
return NULL;
|
||||
@ -122,7 +121,6 @@ static orte_ras_base_module_t *orte_ras_bjs_init(int* priority)
|
||||
if (getenv("NODES") == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
*priority = mca_ras_bjs_component.priority;
|
||||
return &orte_ras_bjs_module;
|
||||
|
@ -1,2 +0,0 @@
|
||||
rhc
|
||||
jsquyres
|
@ -91,7 +91,7 @@ static int orte_ras_bproc_raw_allocate(orte_jobid_t jobid, opal_list_t *attribut
|
||||
}
|
||||
|
||||
/* if no nodes available, let the user know and return error */
|
||||
if (0 == ns->size) {
|
||||
if (0 == ns.size) {
|
||||
opal_show_help("help-ras-broc-raw.txt", "no-nodes-found", true);
|
||||
return ORTE_ERR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -100,8 +100,8 @@ static int orte_ras_bproc_raw_allocate(orte_jobid_t jobid, opal_list_t *attribut
|
||||
OBJ_CONSTRUCT(&nodes, opal_list_t);
|
||||
|
||||
/* cycle through the list */
|
||||
for (i=0; i < ns->size; i++) {
|
||||
ni = &ns->node[i];
|
||||
for (i=0; i < ns.size; i++) {
|
||||
ni = &ns.node[i];
|
||||
|
||||
/* check that the node is alive */
|
||||
if(orte_ras_bproc_raw_node_state(ni->node) != ORTE_NODE_STATE_UP) {
|
||||
@ -118,7 +118,15 @@ static int orte_ras_bproc_raw_allocate(orte_jobid_t jobid, opal_list_t *attribut
|
||||
/* okay, we have access and it is alive - create a new node entry */
|
||||
node = OBJ_NEW(orte_ras_node_t);
|
||||
asprintf(&node->node_name, "%d", ni->node);
|
||||
node->node_state = ni->status;
|
||||
if (strcmp(ni->status, "up") == 0) {
|
||||
node->node_state = ORTE_NODE_STATE_UP;
|
||||
} else if (strcmp(ni->status, "down") == 0) {
|
||||
node->node_state = ORTE_NODE_STATE_DOWN;
|
||||
} else if (strcmp(ni->status, "boot") == 0) {
|
||||
node->node_state = ORTE_NODE_STATE_REBOOT;
|
||||
} else {
|
||||
node->node_state = ORTE_NODE_STATE_UNKNOWN;
|
||||
}
|
||||
/* RHC - until we can find some way of querying bproc for the number of
|
||||
* available slots, just assume two
|
||||
*/
|
||||
|
@ -18,10 +18,14 @@
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/orte_constants.h"
|
||||
|
||||
#include <sys/bproc.h>
|
||||
|
||||
#include "opal/mca/base/base.h"
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
#include "orte/util/proc_info.h"
|
||||
#include "opal/util/output.h"
|
||||
|
||||
#include "ras_bproc_raw.h"
|
||||
|
||||
/*
|
||||
|
@ -1,2 +0,0 @@
|
||||
rhc
|
||||
jsquyres
|
@ -107,10 +107,7 @@ static int orte_ras_lanl_bproc_node_resolve(char* node_name, int* node_num)
|
||||
* - check for additional nodes that have already been allocated
|
||||
*/
|
||||
|
||||
static int orte_ras_lanl_bproc_discover(
|
||||
opal_list_t* nodelist,
|
||||
orte_app_context_t** context,
|
||||
size_t num_context)
|
||||
static int orte_ras_lanl_bproc_discover(opal_list_t* nodelist)
|
||||
{
|
||||
char* nodes;
|
||||
char* ptr;
|
||||
@ -138,6 +135,7 @@ static int orte_ras_lanl_bproc_discover(
|
||||
continue;
|
||||
}
|
||||
|
||||
/* ensure that the node is "up" */
|
||||
if(orte_ras_lanl_bproc_node_state(node_num) != ORTE_NODE_STATE_UP) {
|
||||
opal_list_remove_item(nodelist,item);
|
||||
OBJ_DESTRUCT(item);
|
||||
@ -145,6 +143,7 @@ static int orte_ras_lanl_bproc_discover(
|
||||
continue;
|
||||
}
|
||||
|
||||
/* ensure that we have execution authority on it */
|
||||
if(bproc_access(node_num, BPROC_X_OK) != 0) {
|
||||
opal_list_remove_item(nodelist,item);
|
||||
OBJ_DESTRUCT(item);
|
||||
@ -186,11 +185,14 @@ static int orte_ras_lanl_bproc_discover(
|
||||
continue;
|
||||
}
|
||||
|
||||
/* check that the node is alive */
|
||||
if(ORTE_NODE_STATE_UP != (node_state = orte_ras_lanl_bproc_node_state(node_num))) {
|
||||
opal_output(0, "error: a specified node (%d) is not up.\n", node_num);
|
||||
rc = ORTE_ERROR;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* check that we have execution authority on it */
|
||||
if(bproc_access(node_num, BPROC_X_OK) != 0) {
|
||||
opal_output(0, "error: a specified node (%d) is not accessible.\n", node_num);
|
||||
rc = ORTE_ERROR;
|
||||
@ -239,18 +241,10 @@ static int orte_ras_lanl_bproc_allocate(orte_jobid_t jobid, opal_list_t *attribu
|
||||
opal_list_t nodes;
|
||||
opal_list_item_t* item;
|
||||
int rc;
|
||||
orte_app_context_t **context = NULL;
|
||||
orte_std_cntr_t i, num_context = 0;
|
||||
|
||||
OBJ_CONSTRUCT(&nodes, opal_list_t);
|
||||
|
||||
rc = orte_rmgr.get_app_context(jobid, &context, &num_context);
|
||||
if(ORTE_SUCCESS != rc) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if(ORTE_SUCCESS != (rc = orte_ras_lanl_bproc_discover(&nodes, context, num_context))) {
|
||||
if(ORTE_SUCCESS != (rc = orte_ras_lanl_bproc_discover(&nodes))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
goto cleanup;
|
||||
}
|
||||
@ -265,12 +259,6 @@ cleanup:
|
||||
OBJ_RELEASE(item);
|
||||
}
|
||||
OBJ_DESTRUCT(&nodes);
|
||||
for(i=0; i<num_context; i++) {
|
||||
OBJ_RELEASE(context[i]);
|
||||
}
|
||||
if (NULL != context) {
|
||||
free(context);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,15 @@
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/orte_constants.h"
|
||||
|
||||
#include <sys/bproc.h>
|
||||
|
||||
#include "opal/mca/base/base.h"
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
#include "orte/util/proc_info.h"
|
||||
#include "opal/util/output.h"
|
||||
|
||||
#include "orte/util/proc_info.h"
|
||||
|
||||
#include "ras_lanl_bproc.h"
|
||||
|
||||
/*
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user