- client: on startup, generate a notice if any jobs require more RAM

than is allowed by prefs

svn path=/trunk/boinc/; revision=22779
This commit is contained in:
David Anderson 2010-11-30 22:12:14 +00:00
parent f8e2d07cf9
commit 295e8fbdb4
4 changed files with 46 additions and 1 deletions

View File

@ -8510,3 +8510,11 @@ David 30 Nov 2010
sched_types.h
sched_customize.cpp
sched_version.cpp
David 30 Nov 2010
- client: on startup, generate a notice if any jobs require more RAM
than is allowed by prefs
client/
client_state.cpp
cpu_sched.cpp

View File

@ -216,6 +216,25 @@ static void check_no_apps(PROJECT* p) {
}
}
// alert user if any jobs need more RAM than available
//
static void check_too_large_jobs() {
double m = gstate.max_available_ram();
bool found = false;
for (unsigned int i=0; i<gstate.results.size(); i++) {
RESULT* rp = gstate.results[i];
if (rp->wup->rsc_memory_bound > m) {
found = true;
break;
}
}
if (found) {
msg_printf(0, MSG_USER_ALERT,
_("Some tasks need more memory than allowed by your preferences. Please check the preferences.")
);
}
}
// Sometime has failed N times.
// Calculate an exponential backoff between MIN and MAX
//
@ -527,11 +546,18 @@ int CLIENT_STATE::init() {
http_ops->cleanup_temp_files();
// get list of BOINC projects occasionally,
// and initialize notice RSS feeds
//
if (!config.no_info_fetch) {
all_projects_list_check();
notices.init_rss();
}
// warn user if some jobs need more memory than available
//
check_too_large_jobs();
initialized = true;
return 0;
}

View File

@ -786,6 +786,9 @@ void add_coproc_jobs(int rsc_type, PROC_RESOURCES& proc_rsc) {
RESULT* rp;
bool can_run;
#ifdef SIM
if (!cpu_sched_rr_only) {
#endif
// choose coproc jobs from projects with coproc deadline misses
//
while (!proc_rsc.stop_scan_coproc(rsc_type)) {
@ -806,6 +809,9 @@ void add_coproc_jobs(int rsc_type, PROC_RESOURCES& proc_rsc) {
rp->edf_scheduled = true;
gstate.ordered_scheduled_results.push_back(rp);
}
#ifdef SIM
}
#endif
// then coproc jobs in FIFO order
//

View File

@ -119,7 +119,12 @@ if ($_POST['submit']) {
$rr_only = '--cpu_sched_rr_only';
}
$cmd = "./sim --duration $duration --delta $delta $suw --file_prefix $prefix $rr_only $llflag";
$prog = "./sim_debt";
if ($_POST['use_rec']) {
$prog = "./sim_rec";
}
$cmd = "$prog --duration $duration --delta $delta $suw --file_prefix $prefix $rr_only $llflag";
$x = system($cmd);