1
1

Fixed a max_slots off by one problem that Brian highlighted.

Also cleaned up the error message when allocating over the number of
slots available.

This commit was SVN r7715.
Этот коммит содержится в:
Josh Hursey 2005-10-12 02:09:56 +00:00
родитель 01fa036645
Коммит 0f08e87a1f
2 изменённых файлов: 7 добавлений и 5 удалений

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

@ -17,7 +17,9 @@
# This is the US/English general help file for Open RTE's orterun.
#
[orte-rmaps-rr:alloc-error]
%d slots were requested, but only %d slots were available.
There are not enough slots available in the system to satisfy the %d slots
that were requested by the application:
%s
Either request fewer slots for your application, or make more slots available
for use.

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

@ -237,12 +237,12 @@ static int map_app_by_node(
/* Remove this node if it has reached its max number of allocatable slots */
if( 0 != node->node_slots_max &&
node->node_slots_inuse >= node->node_slots_max) {
node->node_slots_inuse > node->node_slots_max) {
opal_list_remove_item(nodes, (opal_list_item_t*)node);
if(0 >= opal_list_get_size(nodes) ) {
/* No more nodes to allocate :( */
opal_show_help("help-orte-rmaps-rr.txt", "orte-rmaps-rr:alloc-error",
true, num_alloc, app->num_procs);
true, app->num_procs, app->app);
rc = ORTE_ERR_OUT_OF_RESOURCE;
goto cleanup;
}
@ -339,12 +339,12 @@ static int map_app_by_slot(
/* If this node has reached its max number of slots,
* take it out of the list, and skip it */
else if( 0 != node->node_slots_max &&
node->node_slots_inuse >= node->node_slots_max){
node->node_slots_inuse > node->node_slots_max){
opal_list_remove_item(nodes, (opal_list_item_t*)node);
if( 0 >= opal_list_get_size(nodes) ) {
/* No more nodes to allocate */
opal_show_help("help-orte-rmaps-rr.txt", "orte-rmaps-rr:alloc-error",
true, num_alloc, app->num_procs);
true, app->num_procs, app->app);
rc = ORTE_ERR_OUT_OF_RESOURCE;
goto cleanup;
}