Fix orte-ps which George broke in r10718 by extending the orte_session_dir_get_name()
so that it does not return an error when no universe is passed to it. Also put back in the 'Slots In Use' column as it is now working properly per Ralphs recent ras commits. Still not sure what 'Slots Alloc' is meant to represent, so left that as #if 0'd out for the moment. This commit was SVN r10739. The following SVN revision numbers were found above: r10718 --> open-mpi/ompi@47eef2e002
Этот коммит содержится в:
родитель
a08f087447
Коммит
5a812c8211
@ -621,7 +621,11 @@ static int pretty_print_nodes(opal_list_t *nodes) {
|
||||
len_state = (int) strlen("State");
|
||||
len_slots = (int) strlen("Slots");
|
||||
len_slots_i = (int) strlen("Slots In Use");
|
||||
#if 0
|
||||
len_slots_a = (int) strlen("Slots Alloc");
|
||||
#else
|
||||
len_slots_a = -3;
|
||||
#endif
|
||||
len_slots_m = (int) strlen("Slots Max");
|
||||
for(node_item = opal_list_get_first(nodes);
|
||||
node_item != opal_list_get_end(nodes);
|
||||
@ -650,10 +654,8 @@ static int pretty_print_nodes(opal_list_t *nodes) {
|
||||
len_cell + 3 +
|
||||
len_state + 3 +
|
||||
len_slots + 3 +
|
||||
#if 0
|
||||
len_slots_i + 3 +
|
||||
len_slots_a + 3 +
|
||||
#endif
|
||||
len_slots_m + 3);
|
||||
|
||||
/*
|
||||
@ -665,8 +667,8 @@ static int pretty_print_nodes(opal_list_t *nodes) {
|
||||
printf("%*s | ", len_state, "State");
|
||||
printf("%*s | ", len_slots, "Slots");
|
||||
printf("%*s | ", len_slots_m, "Slots Max");
|
||||
#if 0
|
||||
printf("%*s | ", len_slots_i, "Slots In Use");
|
||||
#if 0
|
||||
printf("%*s | ", len_slots_a, "Slots Alloc");
|
||||
#endif
|
||||
printf("\n");
|
||||
@ -693,10 +695,11 @@ static int pretty_print_nodes(opal_list_t *nodes) {
|
||||
printf("%*s | ", len_state, pretty_node_state(node->node_state));
|
||||
printf("%*d | ", len_slots, (uint)node->node_slots);
|
||||
printf("%*d | ", len_slots_m, (uint)node->node_slots_max);
|
||||
#if 0
|
||||
printf("%*d | ", len_slots_i, (uint)node->node_slots_inuse);
|
||||
#if 0
|
||||
printf("%*d | ", len_slots_a, (uint)node->node_slots_alloc);
|
||||
#endif
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
@ -171,17 +171,26 @@ orte_session_dir_get_name(char **fulldirpath,
|
||||
universe = strdup(univ);
|
||||
}
|
||||
else { /* check if it is set elsewhere */
|
||||
if( NULL != orte_universe_info.name)
|
||||
if( NULL != orte_universe_info.name) {
|
||||
universe = strdup(orte_universe_info.name);
|
||||
}
|
||||
else {
|
||||
/* Couldn't find it, so fail */
|
||||
exit_status = ORTE_ERROR;
|
||||
goto cleanup;
|
||||
;/* Couldn't find it, so continue with caution */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check: Can't give a proc without a job
|
||||
* Check: Can't give proc or job without universe
|
||||
*/
|
||||
if( NULL == universe &&
|
||||
(NULL != proc ||
|
||||
NULL != job) ) {
|
||||
exit_status = ORTE_ERROR;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check: Can't give a proc without a job and universe
|
||||
*/
|
||||
if( NULL == job &&
|
||||
NULL != proc) {
|
||||
@ -235,7 +244,7 @@ orte_session_dir_get_name(char **fulldirpath,
|
||||
/* If we were given neither then we can construct it partially into:
|
||||
* openmpi-sessions-USERNAME@HOSTNAME_BATCHID/UNIVERSE
|
||||
*/
|
||||
else {
|
||||
else if(NULL != universe) {
|
||||
if (0 > asprintf(&sessions, "%s%s%s",
|
||||
*frontend,
|
||||
orte_system_info.path_sep, universe )) {
|
||||
@ -243,6 +252,16 @@ orte_session_dir_get_name(char **fulldirpath,
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
/* If we were not given 'universe' then we can construct it into:
|
||||
* openmpi-sessions-USERNAME@HOSTNAME_BATCHID
|
||||
*/
|
||||
else {
|
||||
if (0 > asprintf(&sessions, "%s",
|
||||
*frontend) ) {
|
||||
exit_status = ORTE_ERROR;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If the user specified an invalid prefix, or no prefix at all
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user