- need to provide option for showing the grid engine's JOB_ID in case the grid engine job needs to be killed
- clean up the orted_path and debug message This commit was SVN r11413.
Этот коммит содержится в:
родитель
17d313f6e1
Коммит
65a524dd0d
@ -138,7 +138,7 @@ orte_pls_gridengine_component_init - initialize component, check if we can run o
|
|||||||
orte_pls_base_module_t *orte_pls_gridengine_component_init(int *priority)
|
orte_pls_base_module_t *orte_pls_gridengine_component_init(int *priority)
|
||||||
{
|
{
|
||||||
if (NULL != getenv("SGE_ROOT") && NULL != getenv("ARC") &&
|
if (NULL != getenv("SGE_ROOT") && NULL != getenv("ARC") &&
|
||||||
NULL != getenv("PE_HOSTFILE")){
|
NULL != getenv("PE_HOSTFILE") && NULL != getenv("JOB_ID")) {
|
||||||
opal_output(orte_pls_base.pls_output,
|
opal_output(orte_pls_base.pls_output,
|
||||||
"pls:gridengine: available for selection");
|
"pls:gridengine: available for selection");
|
||||||
*priority = mca_pls_gridengine_component.priority;
|
*priority = mca_pls_gridengine_component.priority;
|
||||||
|
@ -530,10 +530,6 @@ int orte_pls_gridengine_launch(orte_jobid_t jobid)
|
|||||||
} else {
|
} else {
|
||||||
if (NULL != prefix_dir) {
|
if (NULL != prefix_dir) {
|
||||||
orted_path = opal_os_path( false, prefix_dir, bin_base, "orted", NULL );
|
orted_path = opal_os_path( false, prefix_dir, bin_base, "orted", NULL );
|
||||||
if (mca_pls_gridengine_component.debug) {
|
|
||||||
opal_output(0, "pls:gridengine: orted path=%s\n",
|
|
||||||
argv[orted_index]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* If we yet did not fill up the orted_path, do so now */
|
/* If we yet did not fill up the orted_path, do so now */
|
||||||
if (NULL == orted_path) {
|
if (NULL == orted_path) {
|
||||||
@ -543,6 +539,10 @@ int orte_pls_gridengine_launch(orte_jobid_t jobid)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
asprintf(&argv[orted_index], orted_path);
|
||||||
|
if (mca_pls_gridengine_component.debug) {
|
||||||
|
opal_output(0, "pls:gridengine: orted_path=%s", orted_path);
|
||||||
|
}
|
||||||
|
|
||||||
/* If we have a prefix, then modify the PATH and
|
/* If we have a prefix, then modify the PATH and
|
||||||
LD_LIBRARY_PATH environment variables. We're
|
LD_LIBRARY_PATH environment variables. We're
|
||||||
|
@ -40,6 +40,7 @@ struct orte_ras_gridengine_component_t {
|
|||||||
int debug;
|
int debug;
|
||||||
int verbose;
|
int verbose;
|
||||||
int priority;
|
int priority;
|
||||||
|
int show_jobid;
|
||||||
};
|
};
|
||||||
typedef struct orte_ras_gridengine_component_t orte_ras_gridengine_component_t;
|
typedef struct orte_ras_gridengine_component_t orte_ras_gridengine_component_t;
|
||||||
|
|
||||||
|
@ -84,6 +84,10 @@ static int orte_ras_gridengine_open(void)
|
|||||||
mca_base_param_reg_int(c, "verbose",
|
mca_base_param_reg_int(c, "verbose",
|
||||||
"Enable verbose output for the gridengine ras component",
|
"Enable verbose output for the gridengine ras component",
|
||||||
false, false, 0, &value);
|
false, false, 0, &value);
|
||||||
|
mca_base_param_reg_int(c, "show_jobid",
|
||||||
|
"Show the JOB_ID of the Grid Engine job",
|
||||||
|
false, false, 0, &mca_ras_gridengine_component.show_jobid);
|
||||||
|
|
||||||
if (value != 0) {
|
if (value != 0) {
|
||||||
mca_ras_gridengine_component.verbose = opal_output_open(NULL);
|
mca_ras_gridengine_component.verbose = opal_output_open(NULL);
|
||||||
} else {
|
} else {
|
||||||
@ -97,7 +101,7 @@ static orte_ras_base_module_t *orte_ras_gridengine_init(int* priority)
|
|||||||
*priority = mca_ras_gridengine_component.priority;
|
*priority = mca_ras_gridengine_component.priority;
|
||||||
|
|
||||||
if (NULL != getenv("SGE_ROOT") && NULL != getenv("ARC") &&
|
if (NULL != getenv("SGE_ROOT") && NULL != getenv("ARC") &&
|
||||||
NULL != getenv("PE_HOSTFILE")) {
|
NULL != getenv("PE_HOSTFILE") && NULL != getenv("JOB_ID")) {
|
||||||
opal_output(orte_ras_base.ras_output,
|
opal_output(orte_ras_base.ras_output,
|
||||||
"ras:gridengine: available for selection");
|
"ras:gridengine: available for selection");
|
||||||
return &orte_ras_gridengine_module;
|
return &orte_ras_gridengine_module;
|
||||||
|
@ -124,6 +124,7 @@ static int orte_ras_gridengine_discover(opal_list_t* nodelist,
|
|||||||
orte_app_context_t** context, orte_std_cntr_t num_context)
|
orte_app_context_t** context, orte_std_cntr_t num_context)
|
||||||
{
|
{
|
||||||
char *pe_hostfile = getenv("PE_HOSTFILE");
|
char *pe_hostfile = getenv("PE_HOSTFILE");
|
||||||
|
char *job_id = getenv("JOB_ID");
|
||||||
char buf[1024], *tok, *num, *queue, *arch, *ptr;
|
char buf[1024], *tok, *num, *queue, *arch, *ptr;
|
||||||
int rc, gridengine_slot_cnt;
|
int rc, gridengine_slot_cnt;
|
||||||
opal_list_item_t* item;
|
opal_list_item_t* item;
|
||||||
@ -131,6 +132,12 @@ static int orte_ras_gridengine_discover(opal_list_t* nodelist,
|
|||||||
FILE *fp;
|
FILE *fp;
|
||||||
orte_ras_node_t *node;
|
orte_ras_node_t *node;
|
||||||
|
|
||||||
|
/* show the Grid Engine's JOB_ID */
|
||||||
|
if (mca_ras_gridengine_component.show_jobid ||
|
||||||
|
mca_ras_gridengine_component.verbose != 0) {
|
||||||
|
opal_output(0, "ras:gridengine: JOB_ID: %s", job_id);
|
||||||
|
}
|
||||||
|
|
||||||
/* query the nodelist from the registry */
|
/* query the nodelist from the registry */
|
||||||
if(ORTE_SUCCESS != (rc = orte_ras_gridengine_node_query(nodelist))) {
|
if(ORTE_SUCCESS != (rc = orte_ras_gridengine_node_query(nodelist))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user