*** empty log message ***

svn path=/trunk/boinc/; revision=10505
This commit is contained in:
David Anderson 2006-06-23 20:05:12 +00:00
parent 8a78808f8c
commit 0101a1ae63
10 changed files with 60 additions and 22 deletions

View File

@ -6725,3 +6725,21 @@ David 23 June 2006
client/
app-control.C
log_flags.h
David 23 June 2006
- core client:
- fix bug in printing argv on task startup (Unix)
- changed message: "misses deadline" -> "projected to miss deadline"
- parse version in scheduler reply, and show it if log_flags.sched_ops
- cpu_usage_limit must be in (0..1]
client/
app_start.C
cpu_sched.C
cs_apps.C
cs_prefs.C
cs_scheduler.C
scheduler_op.C,h
lib/
prefs.C
util.C

View File

@ -606,9 +606,6 @@ int ACTIVE_TASK::start(bool first_time) {
#endif
char cmdline[8192];
strcpy(cmdline, wup->command_line.c_str());
if (log_flags.task_debug) {
debug_print_argv(argv);
}
sprintf(buf, "../../%s", exec_path );
#ifdef SANDBOX
char switcher_path[100];
@ -617,6 +614,9 @@ int ACTIVE_TASK::start(bool first_time) {
argv[1] = buf;
argv[2] = exec_name;
parse_command_line(cmdline, argv+3);
if (log_flags.task_debug) {
debug_print_argv(argv);
}
retval = execv(switcher_path, argv);
#else
argv[0] = exec_name;

View File

@ -362,12 +362,12 @@ void CLIENT_STATE::print_deadline_misses() {
rp = results[i];
if (rp->rr_sim_misses_deadline && !rp->last_rr_sim_missed_deadline) {
msg_printf(rp->project, MSG_INFO,
"Result %s now misses deadline.", rp->name
"Result %s projected to miss deadline.", rp->name
);
}
else if (!rp->rr_sim_misses_deadline && rp->last_rr_sim_missed_deadline) {
msg_printf(rp->project, MSG_INFO,
"Result %s now meets deadline.", rp->name
"Result %s projected to meet deadline.", rp->name
);
}
}
@ -375,7 +375,7 @@ void CLIENT_STATE::print_deadline_misses() {
p = projects[i];
if (p->rr_sim_deadlines_missed) {
msg_printf(p, MSG_INFO,
"Project has %d deadline misses",
"Project has %d projected deadline misses",
p->rr_sim_deadlines_missed
);
}
@ -457,7 +457,7 @@ void CLIENT_STATE::schedule_cpus() {
ordered_scheduled_results.push_back(rp);
}
request_enforce_schedule("");
request_enforce_schedule("schedule_cpus");
set_client_state_dirty("schedule_cpus");
}

View File

@ -374,25 +374,25 @@ int CLIENT_STATE::choose_version_num(char* app_name, SCHEDULER_REPLY& sr) {
return best;
}
// trigger CPU schedule enforcement.
// Called when a new schedule is computed,
// and when an app checkpoints.
//
void CLIENT_STATE::request_enforce_schedule(const char* where) {
// The CPU scheduler runs when a result is completed,
// when the end of the user-specified scheduling period is reached,
// when new results become runnable,
// or when the user performs a UI interaction (e.g. suspending or resuming a project or result).
//
if (log_flags.cpu_sched_debug && where && strlen(where)) {
if (log_flags.cpu_sched_debug) {
msg_printf(0, MSG_INFO, "Request enforce CPU schedule: %s", where);
}
must_enforce_cpu_schedule = true;
}
// trigger CPU scheduling.
// Called when a result is completed,
// when new results become runnable,
// or when the user performs a UI interaction
// (e.g. suspending or resuming a project or result).
//
void CLIENT_STATE::request_schedule_cpus(const char* where) {
// The CPU scheduler runs when a result is completed,
// when the end of the user-specified scheduling period is reached,
// when new results become runnable,
// or when the user performs a UI interaction (e.g. suspending or resuming a project or result).
//
if (log_flags.cpu_sched_debug && where && strlen(where)) {
if (log_flags.cpu_sched_debug) {
msg_printf(0, MSG_INFO, "Request CPU reschedule: %s", where);
}
must_schedule_cpus = true;

View File

@ -207,6 +207,11 @@ static string reason_string(int reason) {
int CLIENT_STATE::suspend_tasks(int reason) {
if (reason == SUSPEND_REASON_CPU_USAGE_LIMIT) {
if (log_flags.cpu_sched) {
string s_reason;
s_reason = "Suspending computation" + reason_string(reason);
msg_printf(NULL, MSG_INFO, s_reason.c_str());
}
active_tasks.suspend_all(true);
} else {
string s_reason;

View File

@ -758,6 +758,12 @@ int CLIENT_STATE::handle_scheduler_reply(
fclose(f);
if (retval) return retval;
if (log_flags.sched_ops) {
msg_printf(project, MSG_INFO,
"Scheduler version: %d", sr.scheduler_version
);
}
// check that master URL is correct
//
if (strlen(sr.master_url)) {

View File

@ -829,6 +829,8 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) {
continue;
} else if (match_tag(buf, "<request_file_list/>")) {
send_file_list = true;
} else if (parse_int(buf, "<scheduler_version>", scheduler_version)) {
continue;
} else if (strlen(buf)>1){
if (log_flags.unparsed_xml) {
msg_printf(0, MSG_ERROR,

View File

@ -128,6 +128,7 @@ struct SCHEDULER_REPLY {
bool message_ack;
bool project_is_down;
bool send_file_list;
int scheduler_version;
SCHEDULER_REPLY();
~SCHEDULER_REPLY();

View File

@ -114,6 +114,7 @@ int GLOBAL_PREFS::parse_override(
) {
char buf[256], buf2[256];
bool in_venue = false, in_correct_venue=false;
double dtemp;
found_venue = false;
while (in.fgets(buf, 256)) {
@ -210,7 +211,10 @@ int GLOBAL_PREFS::parse_override(
#endif
} else if (parse_int(buf, "<cpu_affinity>", cpu_affinity)) {
continue;
} else if (parse_double(buf, "<cpu_usage_limit>", cpu_usage_limit)) {
} else if (parse_double(buf, "<cpu_usage_limit>", dtemp)) {
if (dtemp > 0 && dtemp <= 1) {
cpu_usage_limit = dtemp;
}
continue;
}
}

View File

@ -823,8 +823,10 @@ int boinc_calling_thread_cpu_time(double &cpu_t) {
struct rusage ru;
// getrusage can return an error, so try a few times if it returns an error.
if (!pthread_mutex_trylock(&getrusage_mutex)) {
int i=0;
while (retval=getrusage(RUSAGE_SELF, &ru) && i<10) i++;
for (int i=0; i<10; i++) {
retval=getrusage(RUSAGE_SELF, &ru);
if (!retval) break;
}
pthread_mutex_unlock(&getrusage_mutex);
}
if (retval) {