1
1
Give a more intelligible error message when someone passes -nolocal and the only available node is the local node.

This commit was SVN r12325.

The following Trac tickets were found above:
  Ticket 487 --> https://svn.open-mpi.org/trac/ompi/ticket/487
Этот коммит содержится в:
Tim Prins 2006-10-26 21:46:18 +00:00
родитель c752502dee
Коммит 894b220fbb
2 изменённых файлов: 28 добавлений и 0 удалений

Просмотреть файл

@ -42,3 +42,14 @@ that match the requested mapping:
OR the requested resources in that mapping have already been consumed. Verify that you have mapped the allocated resources properly using the OR the requested resources in that mapping have already been consumed. Verify that you have mapped the allocated resources properly using the
--host specification. --host specification.
[orte-rmaps-base:nolocal-no-available-resources]
There are no available nodes allocated to this job. This could be because
no nodes were found or all the available nodes were already used.
Note that since the -nolocal option was given no processes can be
launched on the local node.
[orte-rmaps-base:no-available-resources]
There are no nodes allocated to this job.
[orte-rmaps-base:all-available-resources-used]
All nodes which are allocated for this job are already filled.

Просмотреть файл

@ -101,6 +101,7 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_jobid_t
opal_list_item_t *item, *next; opal_list_item_t *item, *next;
orte_ras_node_t *node; orte_ras_node_t *node;
int rc; int rc;
size_t nodelist_size;
orte_std_cntr_t num_slots=0; orte_std_cntr_t num_slots=0;
/** set default answer */ /** set default answer */
@ -112,6 +113,8 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_jobid_t
return rc; return rc;
} }
nodelist_size = opal_list_get_size(allocated_nodes);
/* If the "no local" option was set, then remove the local node /* If the "no local" option was set, then remove the local node
from the list */ from the list */
if (nolocal) { if (nolocal) {
@ -148,6 +151,20 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_jobid_t
/* Sanity check to make sure we have resources available */ /* Sanity check to make sure we have resources available */
if (0 == opal_list_get_size(allocated_nodes)) { if (0 == opal_list_get_size(allocated_nodes)) {
/* so there are 3 reasons we could be erroring here:
* 1. There were no nodes allocated to this job
* 2. The local node was the only one available and nolocal was passed
* 3. All the nodes were full */
if(0 == nodelist_size) {
opal_show_help("help-orte-rmaps-base.txt",
"orte-rmaps-base:no-available-resources", true);
} else if(nolocal) {
opal_show_help("help-orte-rmaps-base.txt",
"orte-rmaps-base:nolocal-no-available-resources", true);
} else {
opal_show_help("help-orte-rmaps-base.txt",
"orte-rmaps-base:all-available-resources-used", true);
}
ORTE_ERROR_LOG(ORTE_ERR_TEMP_OUT_OF_RESOURCE); ORTE_ERROR_LOG(ORTE_ERR_TEMP_OUT_OF_RESOURCE);
return ORTE_ERR_TEMP_OUT_OF_RESOURCE; return ORTE_ERR_TEMP_OUT_OF_RESOURCE;
} }