mirror of https://github.com/BOINC/boinc.git
parent
55d1ad6199
commit
bd245ca055
|
@ -26,6 +26,12 @@
|
|||
// - reporting CPU time
|
||||
// - loss of heartbeat from core client
|
||||
//
|
||||
// Does NOT handle:
|
||||
// - checkpointing
|
||||
// If your app does checkpointing,
|
||||
// and there's some way to figure out when it's done it,
|
||||
// this program could be modified to report to the core client.
|
||||
//
|
||||
// Takes an input file "job.xml" of the form
|
||||
// <job_desc>
|
||||
// <application>NAME</application>
|
||||
|
|
|
@ -4955,7 +4955,7 @@ Rom 22 May 2006
|
|||
lib/
|
||||
diagnostics_win.C
|
||||
|
||||
David 23 May 2006
|
||||
David 22 May 2006
|
||||
- core client: fix logic error involving the
|
||||
"5 minutes of network after GUI RPC" thing.
|
||||
|
||||
|
@ -4973,3 +4973,13 @@ Bruce 23 May 2006
|
|||
sched/
|
||||
transitioner.C
|
||||
|
||||
David 22 May 2006
|
||||
- Client: handle "<next_rpc_delay>" element in scheduler reply.
|
||||
This tells the client to do another scheduler RPC after X seconds.
|
||||
|
||||
apps/
|
||||
wrapper.C
|
||||
client/
|
||||
client_types.C,h
|
||||
cs_scheduler.C
|
||||
scheduler_op.C,h
|
||||
|
|
|
@ -81,6 +81,7 @@ void PROJECT::init() {
|
|||
min_rpc_time = 0;
|
||||
master_url_fetch_pending = false;
|
||||
sched_rpc_pending = false;
|
||||
next_rpc_time = 0;
|
||||
trickle_up_pending = false;
|
||||
tentative = false;
|
||||
anonymous_platform = false;
|
||||
|
@ -162,6 +163,7 @@ int PROJECT::parse_state(MIOFILE& in) {
|
|||
}
|
||||
else if (match_tag(buf, "<master_url_fetch_pending/>")) master_url_fetch_pending = true;
|
||||
else if (match_tag(buf, "<sched_rpc_pending/>")) sched_rpc_pending = true;
|
||||
else if (parse_double(buf, "<next_rpc_time>", next_rpc_time)) continue;
|
||||
else if (match_tag(buf, "<trickle_up_pending/>")) trickle_up_pending = true;
|
||||
else if (match_tag(buf, "<send_file_list/>")) send_file_list = true;
|
||||
else if (match_tag(buf, "<non_cpu_intensive/>")) non_cpu_intensive = true;
|
||||
|
@ -212,6 +214,7 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
|
|||
" <nrpc_failures>%d</nrpc_failures>\n"
|
||||
" <master_fetch_failures>%d</master_fetch_failures>\n"
|
||||
" <min_rpc_time>%f</min_rpc_time>\n"
|
||||
" <next_rpc_time>%f</next_rpc_time>\n"
|
||||
" <short_term_debt>%f</short_term_debt>\n"
|
||||
" <long_term_debt>%f</long_term_debt>\n"
|
||||
" <resource_share>%f</resource_share>\n"
|
||||
|
@ -235,6 +238,7 @@ int PROJECT::write_state(MIOFILE& out, bool gui_rpc) {
|
|||
nrpc_failures,
|
||||
master_fetch_failures,
|
||||
min_rpc_time,
|
||||
next_rpc_time,
|
||||
short_term_debt,
|
||||
long_term_debt,
|
||||
resource_share,
|
||||
|
@ -295,6 +299,7 @@ void PROJECT::copy_state_fields(PROJECT& p) {
|
|||
nrpc_failures = p.nrpc_failures;
|
||||
master_fetch_failures = p.master_fetch_failures;
|
||||
min_rpc_time = p.min_rpc_time;
|
||||
next_rpc_time = p.next_rpc_time;
|
||||
master_url_fetch_pending = p.master_url_fetch_pending;
|
||||
sched_rpc_pending = p.sched_rpc_pending;
|
||||
trickle_up_pending = p.trickle_up_pending;
|
||||
|
|
|
@ -181,29 +181,41 @@ public:
|
|||
std::vector<std::string> scheduler_urls;
|
||||
// where to find scheduling servers
|
||||
char project_name[256]; // descriptive. not unique
|
||||
char symstore[256];
|
||||
char symstore[256]; // URL of symbol server (Windows)
|
||||
char user_name[256];
|
||||
char team_name[256];
|
||||
char email_hash[MD5_LEN];
|
||||
char cross_project_id[MD5_LEN];
|
||||
double user_total_credit; // as reported by server
|
||||
double user_expavg_credit; // as reported by server
|
||||
double user_create_time; // as reported by server
|
||||
int rpc_seqno;
|
||||
double user_total_credit;
|
||||
double user_expavg_credit;
|
||||
double user_create_time;
|
||||
int hostid;
|
||||
double host_total_credit; // as reported by server
|
||||
double host_expavg_credit; // as reported by server
|
||||
double host_create_time; // as reported by server
|
||||
double host_total_credit;
|
||||
double host_expavg_credit;
|
||||
double host_create_time;
|
||||
|
||||
// stuff related to scheduler RPCs and master fetch
|
||||
//
|
||||
int rpc_seqno;
|
||||
int nrpc_failures; // # of consecutive times we've failed to
|
||||
// contact all scheduling servers
|
||||
int master_fetch_failures;
|
||||
double min_rpc_time; // earliest time to contact any server
|
||||
// of this project (or zero)
|
||||
// of this project (or zero)
|
||||
void set_min_rpc_time(double future_time);
|
||||
bool waiting_until_min_rpc_time();
|
||||
// returns true if min_rpc_time > now
|
||||
bool master_url_fetch_pending;
|
||||
// need to fetch and parse the master URL
|
||||
bool sched_rpc_pending; // contact scheduling server for preferences
|
||||
bool sched_rpc_pending;
|
||||
// we need to do a scheduler RPC, for various possible reasons:
|
||||
// user request, propagate host CPID, time-based, etc
|
||||
double next_rpc_time;
|
||||
// if nonzero, specifies a time when another scheduler RPC
|
||||
// should be done (as requested by server)
|
||||
bool trickle_up_pending; // have trickle up to send
|
||||
bool tentative; // master URL and account ID not confirmed
|
||||
|
||||
bool anonymous_platform; // app_versions.xml file found in project dir;
|
||||
// use those apps rather then getting from server
|
||||
bool non_cpu_intensive;
|
||||
|
@ -212,9 +224,9 @@ public:
|
|||
// in the next scheduler reply
|
||||
bool suspended_via_gui;
|
||||
bool dont_request_more_work;
|
||||
// set the project to only return work and not request more
|
||||
// for a clean exit to a project, or if a user wants to
|
||||
// pause doing work for the project
|
||||
// Return work, but don't request more
|
||||
// Used for a clean exit to a project,
|
||||
// or if a user wants to pause doing work for the project
|
||||
bool attached_via_acct_mgr;
|
||||
char code_sign_key[MAX_KEY_LEN];
|
||||
std::vector<FILE_REF> user_files;
|
||||
|
@ -318,14 +330,6 @@ public:
|
|||
int parse_state(MIOFILE&);
|
||||
int write_state(MIOFILE&, bool gui_rpc=false);
|
||||
void attach_failed(int reason);
|
||||
#if 0
|
||||
bool associate_file(FILE_INFO*);
|
||||
#endif
|
||||
|
||||
// set min_rpc_time and have_reported_min_rpc_time
|
||||
void set_min_rpc_time(double future_time);
|
||||
// returns true if min_rpc_time > now; may print a message
|
||||
bool waiting_until_min_rpc_time();
|
||||
|
||||
// statistic of the last x days
|
||||
std::vector<DAILY_STATS> statistics;
|
||||
|
|
|
@ -89,7 +89,6 @@ void PROJECT::set_min_rpc_time(double future_time) {
|
|||
}
|
||||
|
||||
// Return true iff we should not contact the project yet.
|
||||
// Print a message to the user if we haven't recently
|
||||
//
|
||||
bool PROJECT::waiting_until_min_rpc_time() {
|
||||
return (min_rpc_time > gstate.now);
|
||||
|
@ -122,6 +121,10 @@ PROJECT* CLIENT_STATE::next_project_sched_rpc_pending() {
|
|||
for (i=0; i<projects.size(); i++) {
|
||||
p = projects[i];
|
||||
if (p->waiting_until_min_rpc_time()) continue;
|
||||
if (p->next_rpc_time && p->next_rpc_time<now) {
|
||||
p->sched_rpc_pending = true;
|
||||
p->next_rpc_time = 0;
|
||||
}
|
||||
//if (p->suspended_via_gui) continue;
|
||||
// do the RPC even if suspended.
|
||||
// This is critical for acct mgrs, to propagate new host CPIDs
|
||||
|
@ -1092,6 +1095,12 @@ int CLIENT_STATE::handle_scheduler_reply(
|
|||
project->min_rpc_time = 0;
|
||||
}
|
||||
|
||||
if (sr.next_rpc_delay) {
|
||||
project->next_rpc_time = gstate.now + sr.next_rpc_delay;
|
||||
} else {
|
||||
project->next_rpc_time = 0;
|
||||
}
|
||||
|
||||
// The project returns a hostid only if it has created a new host record.
|
||||
// In that case reset RPC seqno
|
||||
//
|
||||
|
|
|
@ -567,6 +567,7 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) {
|
|||
|
||||
hostid = 0;
|
||||
request_delay = 0;
|
||||
next_rpc_delay = 0;
|
||||
global_prefs_xml = 0;
|
||||
project_prefs_xml = 0;
|
||||
strcpy(host_venue, "");
|
||||
|
@ -637,6 +638,7 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) {
|
|||
else if (parse_str(buf, "<host_venue>", host_venue, sizeof(host_venue))) continue;
|
||||
else if (parse_double(buf, "<host_create_time>", project->host_create_time)) continue;
|
||||
else if (parse_double(buf, "<request_delay>", request_delay)) continue;
|
||||
else if (parse_double(buf, "<next_rpc_delay>", next_rpc_delay)) continue;
|
||||
else if (match_tag(buf, "<global_preferences>")) {
|
||||
retval = dup_element_contents(
|
||||
in,
|
||||
|
|
|
@ -103,6 +103,7 @@ struct USER_MESSAGE {
|
|||
struct SCHEDULER_REPLY {
|
||||
int hostid;
|
||||
double request_delay;
|
||||
double next_rpc_delay;
|
||||
std::vector<USER_MESSAGE> messages;
|
||||
char* global_prefs_xml;
|
||||
// not including <global_preferences> tags;
|
||||
|
|
|
@ -139,7 +139,7 @@ echo "
|
|||
";
|
||||
shuffle($projects);
|
||||
foreach ($projects as $p) {
|
||||
echo "<li> <a href=$p[1] onmouseover=\"return escape('<img align=right vspace=4 hspace=4 src=images/$p[5]><b>Home:</b> $p[2]<br><b>Area:</b> $p[3]<br><b>Goal:</b> $p[4]')\">$p[0]</a>
|
||||
echo "<li> <a href=$p[1] onmouseover=\"return escape('<img align=right vspace=4 hspace=4 src=images/$p[5]><b>Home:</b> $p[2]<hr><b>Area:</b> $p[3]<hr><b>Goal:</b> $p[4]')\">$p[0]</a>
|
||||
";
|
||||
}
|
||||
echo "
|
||||
|
|
Loading…
Reference in New Issue