Commit 15e9a873 authored by David Anderson's avatar David Anderson

- client: add a debug flag <dcf_debug> for seeing changes in DCF

- scheduler: add a limit on NVIDIA driver version for CUDA apps
    (default 17500)

svn path=/trunk/boinc/; revision=17277
parent c8ad5b1d
......@@ -1619,8 +1619,21 @@ David 16 Feb 2009
win_build/
libboinc.vcproj
Charlie 13 Feb 2009
Charlie 16 Feb 2009
- client: fix compile break on Mac.
lib/
coproc.cpp
David 16 Feb 2009
- client: add a debug flag <dcf_debug> for seeing changes in DCF
- scheduler: add a limit on NVIDIA driver version for CUDA apps
(default 17500)
client/
work_fetch.cpp
log_flags.cpp,h
cpu_sched.cpp
sched/
sched_send.cpp
sched_plan.cpp,h
......@@ -1254,9 +1254,9 @@ void PROJECT::update_duration_correction_factor(ACTIVE_TASK* atp) {
if (duration_correction_factor > 100) duration_correction_factor = 100;
if (duration_correction_factor < 0.01) duration_correction_factor = 0.01;
if (log_flags.cpu_sched_debug || log_flags.work_fetch_debug) {
if (log_flags.dcf_debug) {
msg_printf(this, MSG_INFO,
"[csd|wfd] DCF: %f->%f, raw_ratio %f, adj_ratio %f",
"[dcf] DCF: %f->%f, raw_ratio %f, adj_ratio %f",
old_dcf, duration_correction_factor, raw_ratio, adj_ratio
);
}
......
......@@ -49,38 +49,13 @@ LOG_FLAGS::LOG_FLAGS() {
}
void LOG_FLAGS::defaults() {
// on by default
// (others are off by default)
memset(this, 0, sizeof(LOG_FLAGS));
// on by default (others are off by default)
//
task = true;
file_xfer = true;
sched_ops = true;
// off by default; intended for developers and testers
//
cpu_sched = false;
cpu_sched_debug = false;
rr_simulation = false;
debt_debug = false;
task_debug = false;
work_fetch_debug = false;
unparsed_xml = false;
state_debug = false;
file_xfer_debug = false;
sched_op_debug = false;
http_debug = false;
proxy_debug = false;
time_debug = false;
http_xfer_debug = false;
benchmark_debug = false;
poll_debug = false;
guirpc_debug = false;
scrsave_debug = false;
app_msg_send = false;
app_msg_receive = false;
mem_usage_debug = false;
network_status_debug = false;
checkpoint_debug = false;
}
// Parse log flag preferences
......@@ -124,6 +99,7 @@ int LOG_FLAGS::parse(XML_PARSER& xp) {
if (xp.parse_bool(tag, "network_status_debug", network_status_debug)) continue;
if (xp.parse_bool(tag, "checkpoint_debug", checkpoint_debug)) continue;
if (xp.parse_bool(tag, "coproc_debug", coproc_debug)) continue;
if (xp.parse_bool(tag, "dcf_debug", dcf_debug)) continue;
msg_printf(NULL, MSG_USER_ERROR, "Unrecognized tag in %s: <%s>\n",
CONFIG_FILE, tag
);
......
......@@ -93,6 +93,8 @@ struct LOG_FLAGS {
bool checkpoint_debug;
/// show coproc reserve/free
bool coproc_debug;
/// show changes to duration correction factors
bool dcf_debug;
LOG_FLAGS();
void defaults();
......
......@@ -748,9 +748,9 @@ void CLIENT_STATE::scale_duration_correction_factors(double factor) {
PROJECT* p = projects[i];
p->duration_correction_factor *= factor;
}
if (log_flags.cpu_sched_debug) {
if (log_flags.dcf_debug) {
msg_printf(NULL, MSG_INFO,
"[cpu_sched_debug] scaling duration correction factors by %f",
"[dcf] scaling all duration correction factors by %f",
factor
);
}
......
......@@ -76,7 +76,7 @@ int app_plan(SCHEDULER_REQUEST& sreq, char* plan_class, HOST_USAGE& hu) {
);
g_wreq->no_gpus_prefs = true;
}
return PLAN_REJECT_PREFS;
return PLAN_REJECT_GPU_PREFS;
}
COPROC_CUDA* cp = (COPROC_CUDA*)sreq.coprocs.lookup("CUDA");
if (!cp) {
......@@ -85,7 +85,7 @@ int app_plan(SCHEDULER_REQUEST& sreq, char* plan_class, HOST_USAGE& hu) {
"[version] Host lacks CUDA coprocessor for plan class cuda\n"
);
}
return PLAN_REJECT_NO_COPROC;
return PLAN_REJECT_CUDA_NO_DEVICE;
}
int v = (cp->prop.major)*100 + cp->prop.minor;
if (v < 100) {
......@@ -94,16 +94,26 @@ int app_plan(SCHEDULER_REQUEST& sreq, char* plan_class, HOST_USAGE& hu) {
"[version] CUDA version %d < 1.0\n", v
);
}
return PLAN_REJECT_COPROC_VERSION;
return PLAN_REJECT_CUDA_VERSION;
}
if (cp->drvVersion && cp->drvVersion < 17500) {
if (config.debug_version_select) {
log_messages.printf(MSG_NORMAL,
"[version] NVIDIA driver version %d < 17500\n",
cp->drvVersion
);
}
return PLAN_REJECT_NVIDIA_DRIVER_VERSION;
}
if (cp->prop.dtotalGlobalMem < 254*1024*1024) {
if (config.debug_version_select) {
log_messages.printf(MSG_NORMAL,
"[version] CUDA mem %d < 254MB\n", cp->prop.dtotalGlobalMem
);
}
return PLAN_REJECT_COPROC_MEM;
return PLAN_REJECT_CUDA_MEM;
}
hu.flops = cp->flops_estimate();
......@@ -117,7 +127,7 @@ int app_plan(SCHEDULER_REQUEST& sreq, char* plan_class, HOST_USAGE& hu) {
hu.flops/1e9
);
}
return PLAN_REJECT_COPROC_SPEED;
return PLAN_REJECT_CUDA_SPEED;
}
#endif
......
......@@ -20,11 +20,12 @@
// reasons for the planning function to reject a host
#define PLAN_REJECT_PREFS 1
#define PLAN_REJECT_NO_COPROC 2
#define PLAN_REJECT_COPROC_VERSION 3
#define PLAN_REJECT_COPROC_MEM 4
#define PLAN_REJECT_COPROC_SPEED 5
#define PLAN_REJECT_UNKNOWN 6
#define PLAN_REJECT_GPU_PREFS 1
#define PLAN_REJECT_CUDA_NO_DEVICE 2
#define PLAN_REJECT_CUDA_VERSION 3
#define PLAN_REJECT_NVIDIA_DRIVER_VERSION 4
#define PLAN_REJECT_CUDA_MEM 5
#define PLAN_REJECT_CUDA_SPEED 6
#define PLAN_REJECT_UNKNOWN 7
extern int app_plan(SCHEDULER_REQUEST&, char* plan_class, HOST_USAGE&);
......@@ -327,15 +327,17 @@ BEST_APP_VERSION* get_app_version(WORKUNIT& wu) {
}
char* p = NULL;
switch (app_plan_reject) {
case PLAN_REJECT_PREFS:
case PLAN_REJECT_GPU_PREFS:
p = "Your preferences are to not use GPU"; break;
case PLAN_REJECT_NO_COPROC:
case PLAN_REJECT_CUDA_NO_DEVICE:
p = "Your computer has no CUDA device"; break;
case PLAN_REJECT_COPROC_VERSION:
case PLAN_REJECT_CUDA_VERSION:
p = "Your CUDA device has the wrong software version"; break;
case PLAN_REJECT_COPROC_MEM:
case PLAN_REJECT_NVIDIA_DRIVER_VERSION:
p = "Your CUDA device has the wrong driver version"; break;
case PLAN_REJECT_CUDA_MEM:
p = "Your CUDA device has insufficient memory"; break;
case PLAN_REJECT_COPROC_SPEED:
case PLAN_REJECT_CUDA_SPEED:
p = "Your CUDA device is too slow"; break;
}
if (p) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment