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
|
||||
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
|
||||
|
|
|
@ -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/");
|
||||
|
|
|
@ -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; 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;
|
||||
}
|
||||
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue