mirror of https://github.com/BOINC/boinc.git
- scheduler: per-processor limits should be based on
"effective" # of processors (taking prefs into account) rather than the physical number svn path=/trunk/boinc/; revision=23547
This commit is contained in:
parent
51c652640f
commit
a2fc8edcae
|
@ -2969,3 +2969,12 @@ David 13 May 2011
|
||||||
backend_lib.cpp
|
backend_lib.cpp
|
||||||
html/project.sample/
|
html/project.sample/
|
||||||
project.inc
|
project.inc
|
||||||
|
|
||||||
|
David 13 May 2011
|
||||||
|
- scheduler: per-processor limits should be based on
|
||||||
|
"effective" # of processors (taking prefs into account)
|
||||||
|
rather than the physical number
|
||||||
|
|
||||||
|
sched/
|
||||||
|
sched_send.cpp
|
||||||
|
sched_limit.h
|
||||||
|
|
|
@ -43,6 +43,13 @@ function friendly_name($p) {
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function canonical_plan_class($pc) {
|
||||||
|
if (strstr($pc, "mt")) return "mt";
|
||||||
|
if (strstr($pc, "cuda")) return "cuda";
|
||||||
|
if (strstr($pc, "ati")) return "ati";
|
||||||
|
return $pc;
|
||||||
|
}
|
||||||
|
|
||||||
// get platforms from get_project_config.php (preferred method)
|
// get platforms from get_project_config.php (preferred method)
|
||||||
//
|
//
|
||||||
// format is either
|
// format is either
|
||||||
|
@ -96,7 +103,8 @@ function get_platforms(&$url) {
|
||||||
} else {
|
} else {
|
||||||
foreach ($p->platform as $r) {
|
foreach ($p->platform as $r) {
|
||||||
if (array_key_exists('plan_class', $r)) {
|
if (array_key_exists('plan_class', $r)) {
|
||||||
$list[] = (string)$r->platform_name.'['.(string)$r->plan_class.']';
|
$pc = canonical_plan_class((string)$r->plan_class);
|
||||||
|
$list[] = (string)$r->platform_name."['$pc']";
|
||||||
} else {
|
} else {
|
||||||
$list[] = (string)$r->platform_name;
|
$list[] = (string)$r->platform_name;
|
||||||
}
|
}
|
||||||
|
@ -120,7 +128,9 @@ function get_platforms2($url) {
|
||||||
$p = $v->platform_short[0];
|
$p = $v->platform_short[0];
|
||||||
$pc = "";
|
$pc = "";
|
||||||
if (array_key_exists('plan_class', $v)) {
|
if (array_key_exists('plan_class', $v)) {
|
||||||
$pc = $v->plan_class[0];
|
$pc = (string)$v->plan_class;
|
||||||
|
$pc = canonical_plan_class($pc);
|
||||||
|
echo "pc: $pc\n";
|
||||||
}
|
}
|
||||||
if (strlen($pc)) {
|
if (strlen($pc)) {
|
||||||
$p = $p.'['.$pc.']';
|
$p = $p.'['.$pc.']';
|
||||||
|
@ -187,6 +197,7 @@ function get_platforms_string($url) {
|
||||||
|
|
||||||
//$u = "http://www.worldcommunitygrid.org/";
|
//$u = "http://www.worldcommunitygrid.org/";
|
||||||
//$u = "http://setiathome.berkeley.edu/";
|
//$u = "http://setiathome.berkeley.edu/";
|
||||||
|
//$u = "http://aqua.dwavesys.com/";
|
||||||
//$x = get_platforms($u);
|
//$x = get_platforms($u);
|
||||||
//print_r($x);
|
//print_r($x);
|
||||||
//echo get_platforms_string("http://setiathome.berkeley.edu/");
|
//echo get_platforms_string("http://setiathome.berkeley.edu/");
|
||||||
|
|
|
@ -77,10 +77,10 @@ struct JOB_LIMIT {
|
||||||
|
|
||||||
int parse(XML_PARSER&, const char* end_tag);
|
int parse(XML_PARSER&, const char* end_tag);
|
||||||
|
|
||||||
inline void reset(HOST& h, COPROCS& c) {
|
inline void reset(int ncpus, int ngpus) {
|
||||||
total.reset(1);
|
total.reset(1);
|
||||||
cpu.reset(h.p_ncpus);
|
cpu.reset(ncpus);
|
||||||
gpu.reset(c.ndevs());
|
gpu.reset(ngpus);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool exceeded(bool is_gpu) {
|
inline bool exceeded(bool is_gpu) {
|
||||||
|
@ -118,10 +118,10 @@ struct JOB_LIMITS {
|
||||||
|
|
||||||
// called at start of each request
|
// called at start of each request
|
||||||
//
|
//
|
||||||
inline void reset(HOST& h, COPROCS& c) {
|
inline void reset(int ncpus, int ngpus) {
|
||||||
project_limits.reset(h, c);
|
project_limits.reset(ncpus, ngpus);
|
||||||
for (unsigned int i=0; i<app_limits.size(); i++) {
|
for (unsigned int i=0; i<app_limits.size(); i++) {
|
||||||
app_limits[i].reset(h, c);
|
app_limits[i].reset(ncpus, ngpus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,11 +118,12 @@ void WORK_REQ::get_job_limits() {
|
||||||
g_wreq->max_jobs_per_rpc = 999999;
|
g_wreq->max_jobs_per_rpc = 999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
config.max_jobs_in_progress.reset(g_reply->host, g_request->coprocs);
|
config.max_jobs_in_progress.reset(effective_ncpus, effective_ngpus);
|
||||||
|
|
||||||
if (config.debug_quota) {
|
if (config.debug_quota) {
|
||||||
log_messages.printf(MSG_NORMAL,
|
log_messages.printf(MSG_NORMAL,
|
||||||
"[quota] max jobs per RPC: %d\n",
|
"[quota] effective ncpus %d ngpus %d; max jobs per RPC: %d\n",
|
||||||
|
effective_ncpus, effective_ngpus,
|
||||||
g_wreq->max_jobs_per_rpc
|
g_wreq->max_jobs_per_rpc
|
||||||
);
|
);
|
||||||
config.max_jobs_in_progress.print_log();
|
config.max_jobs_in_progress.print_log();
|
||||||
|
|
Loading…
Reference in New Issue