Add --display-allocation option to orterun that will display the node-by-node information regarding your allocation.
This commit was SVN r18216.
Этот коммит содержится в:
родитель
df35223603
Коммит
16c9100633
@ -40,6 +40,7 @@ typedef struct orte_ras_base_t {
|
||||
int ras_output;
|
||||
opal_list_t ras_opened;
|
||||
bool allocation_read;
|
||||
bool display_alloc;
|
||||
orte_ras_base_module_t *active_module;
|
||||
} orte_ras_base_t;
|
||||
|
||||
|
@ -44,7 +44,7 @@ int orte_ras_base_allocate(orte_job_t *jdata)
|
||||
{
|
||||
int rc;
|
||||
opal_list_t nodes;
|
||||
orte_node_t *node;
|
||||
orte_node_t *node, **alloc;
|
||||
orte_std_cntr_t i;
|
||||
bool override_oversubscribed;
|
||||
orte_app_context_t **apps;
|
||||
@ -281,5 +281,18 @@ int orte_ras_base_allocate(orte_job_t *jdata)
|
||||
return rc;
|
||||
}
|
||||
OBJ_DESTRUCT(&nodes);
|
||||
|
||||
/* shall we display the results? */
|
||||
if (orte_ras_base.display_alloc) {
|
||||
alloc = (orte_node_t**)orte_node_pool->addr;
|
||||
opal_output(0, "*** NODE ALLOCATION FOR JOB %s ***", ORTE_JOBID_PRINT(jdata->jobid));
|
||||
for (i=0; i < orte_node_pool->size; i++) {
|
||||
if (NULL == alloc[i]) {
|
||||
break;
|
||||
}
|
||||
opal_dss.dump(0, alloc[i], ORTE_NODE);
|
||||
}
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -63,10 +63,18 @@ orte_ras_base_t orte_ras_base;
|
||||
*/
|
||||
int orte_ras_base_open(void)
|
||||
{
|
||||
int value;
|
||||
|
||||
/* set default flags */
|
||||
orte_ras_base.active_module = NULL;
|
||||
orte_ras_base.allocation_read = false;
|
||||
|
||||
/* should we display the allocation after determining it? */
|
||||
mca_base_param_reg_int_name("ras", "base_display_alloc",
|
||||
"Whether to display the allocation after it is determined",
|
||||
false, false, (int)false, &value);
|
||||
orte_ras_base.display_alloc = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
/* Debugging / verbose output. Always have stream open, with
|
||||
verbose set by the mca open system... */
|
||||
orte_ras_base.ras_output = opal_output_open(NULL);
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "opal/dss/dss.h"
|
||||
#include "orte/mca/errmgr/errmgr.h"
|
||||
#include "orte/runtime/orte_globals.h"
|
||||
#include "orte/util/name_fns.h"
|
||||
|
||||
#include "orte/mca/rmaps/base/base.h"
|
||||
#include "orte/mca/rmaps/base/rmaps_private.h"
|
||||
@ -82,6 +83,7 @@ int orte_rmaps_base_map_job(orte_job_t *jdata)
|
||||
|
||||
/* if we wanted to display the map, now is the time to do it */
|
||||
if (jdata->map->display_map) {
|
||||
opal_output(0, "*** JOB MAP FOR JOB %s ***", ORTE_JOBID_PRINT(jdata->jobid));
|
||||
opal_dss.dump(0, jdata->map, ORTE_JOB_MAP);
|
||||
}
|
||||
|
||||
|
@ -219,6 +219,10 @@ static opal_cmd_line_init_t cmd_line_init[] = {
|
||||
NULL, OPAL_CMD_LINE_TYPE_BOOL,
|
||||
"Display the process map just before launch"},
|
||||
|
||||
{ "ras", "base", "display_alloc", '\0', "display-allocation", "display-allocation", 0,
|
||||
NULL, OPAL_CMD_LINE_TYPE_BOOL,
|
||||
"Display the allocation being used by this job"},
|
||||
|
||||
/* mpiexec-like arguments */
|
||||
{ NULL, NULL, NULL, '\0', "wdir", "wdir", 1,
|
||||
&orterun_globals.wdir, OPAL_CMD_LINE_TYPE_STRING,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user