Update the paffinity call in the ODLS so we retrieve the number of processors on the local node, thus allowing us to correctly set the sched_yield parameter.
This commit was SVN r18946.
Этот коммит содержится в:
родитель
e28f71f6e6
Коммит
6135943382
@ -41,8 +41,9 @@
|
|||||||
#include "opal/util/num_procs.h"
|
#include "opal/util/num_procs.h"
|
||||||
#include "opal/util/sys_limits.h"
|
#include "opal/util/sys_limits.h"
|
||||||
#include "opal/class/opal_pointer_array.h"
|
#include "opal/class/opal_pointer_array.h"
|
||||||
|
|
||||||
#include "opal/dss/dss.h"
|
#include "opal/dss/dss.h"
|
||||||
|
#include "opal/mca/paffinity/base/base.h"
|
||||||
|
|
||||||
#include "orte/mca/errmgr/errmgr.h"
|
#include "orte/mca/errmgr/errmgr.h"
|
||||||
#include "orte/mca/rml/rml.h"
|
#include "orte/mca/rml/rml.h"
|
||||||
#include "orte/mca/rml/base/rml_contact.h"
|
#include "orte/mca/rml/base/rml_contact.h"
|
||||||
@ -638,13 +639,7 @@ static int odls_base_default_setup_fork(orte_app_context_t *context,
|
|||||||
opal_setenv(param, orte_process_info.my_hnp_uri, true, environ_copy);
|
opal_setenv(param, orte_process_info.my_hnp_uri, true, environ_copy);
|
||||||
free(param);
|
free(param);
|
||||||
|
|
||||||
/* setup yield schedule and processor affinity
|
/* setup yield schedule */
|
||||||
* We default here to always setting the affinity processor if we want
|
|
||||||
* it. The processor affinity system then determines
|
|
||||||
* if processor affinity is enabled/requested - if so, it then uses
|
|
||||||
* this value to select the process to which the proc is "assigned".
|
|
||||||
* Otherwise, the paffinity subsystem just ignores this value anyway
|
|
||||||
*/
|
|
||||||
if (oversubscribed) {
|
if (oversubscribed) {
|
||||||
param = mca_base_param_environ_variable("mpi", NULL, "yield_when_idle");
|
param = mca_base_param_environ_variable("mpi", NULL, "yield_when_idle");
|
||||||
opal_setenv(param, "1", false, environ_copy);
|
opal_setenv(param, "1", false, environ_copy);
|
||||||
@ -756,7 +751,7 @@ int orte_odls_base_default_launch_local(orte_jobid_t job,
|
|||||||
orte_app_context_t *app, **apps;
|
orte_app_context_t *app, **apps;
|
||||||
orte_std_cntr_t num_apps;
|
orte_std_cntr_t num_apps;
|
||||||
orte_odls_child_t *child=NULL;
|
orte_odls_child_t *child=NULL;
|
||||||
int i, num_processors;
|
int i, num_processors, max_processor_id;
|
||||||
bool oversubscribed;
|
bool oversubscribed;
|
||||||
int rc=ORTE_SUCCESS, ret;
|
int rc=ORTE_SUCCESS, ret;
|
||||||
bool launch_failed=true;
|
bool launch_failed=true;
|
||||||
@ -811,15 +806,22 @@ int orte_odls_base_default_launch_local(orte_jobid_t job,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opal_list_get_size(&orte_odls_globals.children) > (size_t)num_processors) {
|
if (ORTE_SUCCESS != opal_paffinity_base_get_processor_info(&num_processors, &max_processor_id)) {
|
||||||
/* if the #procs > #processors, declare us oversubscribed. This
|
/* if we cannot find the number of local processors, we have no choice
|
||||||
* covers the case where the user didn't tell us anything about the
|
* but to default to conservative settings
|
||||||
* number of available slots, so we defaulted to a value of 1
|
|
||||||
*/
|
*/
|
||||||
oversubscribed = true;
|
oversubscribed = true;
|
||||||
} else {
|
} else {
|
||||||
/* otherwise, declare us to not be oversubscribed so we can be aggressive */
|
if (opal_list_get_size(&orte_odls_globals.children) > (size_t)num_processors) {
|
||||||
oversubscribed = false;
|
/* if the #procs > #processors, declare us oversubscribed. This
|
||||||
|
* covers the case where the user didn't tell us anything about the
|
||||||
|
* number of available slots, so we defaulted to a value of 1
|
||||||
|
*/
|
||||||
|
oversubscribed = true;
|
||||||
|
} else {
|
||||||
|
/* otherwise, declare us to not be oversubscribed so we can be aggressive */
|
||||||
|
oversubscribed = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OPAL_OUTPUT_VERBOSE((5, orte_odls_globals.output,
|
OPAL_OUTPUT_VERBOSE((5, orte_odls_globals.output,
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user