From a2fc8edcae886f799794ffcad205cf68fc70a782 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 13 May 2011 22:04:10 +0000 Subject: [PATCH] - 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 --- checkin_notes | 9 +++++++++ doc/get_platforms.inc | 15 +++++++++++++-- sched/sched_limit.h | 12 ++++++------ sched/sched_send.cpp | 5 +++-- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/checkin_notes b/checkin_notes index 602523a182..991c31a9a0 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2969,3 +2969,12 @@ David 13 May 2011 backend_lib.cpp html/project.sample/ 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 diff --git a/doc/get_platforms.inc b/doc/get_platforms.inc index 312ce1658e..6e118c2201 100644 --- a/doc/get_platforms.inc +++ b/doc/get_platforms.inc @@ -43,6 +43,13 @@ function friendly_name($p) { 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) // // format is either @@ -96,7 +103,8 @@ function get_platforms(&$url) { } else { foreach ($p->platform as $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 { $list[] = (string)$r->platform_name; } @@ -120,7 +128,9 @@ function get_platforms2($url) { $p = $v->platform_short[0]; $pc = ""; 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)) { $p = $p.'['.$pc.']'; @@ -187,6 +197,7 @@ function get_platforms_string($url) { //$u = "http://www.worldcommunitygrid.org/"; //$u = "http://setiathome.berkeley.edu/"; +//$u = "http://aqua.dwavesys.com/"; //$x = get_platforms($u); //print_r($x); //echo get_platforms_string("http://setiathome.berkeley.edu/"); diff --git a/sched/sched_limit.h b/sched/sched_limit.h index da202af56c..aec6267337 100644 --- a/sched/sched_limit.h +++ b/sched/sched_limit.h @@ -77,10 +77,10 @@ struct JOB_LIMIT { 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); - cpu.reset(h.p_ncpus); - gpu.reset(c.ndevs()); + cpu.reset(ncpus); + gpu.reset(ngpus); } inline bool exceeded(bool is_gpu) { @@ -118,10 +118,10 @@ struct JOB_LIMITS { // called at start of each request // - inline void reset(HOST& h, COPROCS& c) { - project_limits.reset(h, c); + inline void reset(int ncpus, int ngpus) { + project_limits.reset(ncpus, ngpus); for (unsigned int i=0; imax_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) { 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 ); config.max_jobs_in_progress.print_log();