mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2064
This commit is contained in:
parent
2b060dc4b1
commit
4f9dd9b18b
|
@ -374,7 +374,7 @@ void DB_USER::db_print(char* buf){
|
|||
"id=%d, create_time=%d, email_addr='%s', name='%s', "
|
||||
"authenticator='%s', "
|
||||
"country='%s', postal_code='%s', "
|
||||
"total_credit=%e, expavg_credit=%e, expavg_time=%e, "
|
||||
"total_credit=%.15e, expavg_credit=%.15e, expavg_time=%.15e, "
|
||||
"global_prefs='%s', project_prefs='%s', "
|
||||
"teamid=%d, venue='%s', url='%s', send_email=%d, show_hosts=%d",
|
||||
id,
|
||||
|
@ -436,7 +436,7 @@ void DB_TEAM::db_print(char* buf){
|
|||
"id=%d, create_time=%d, userid=%d, name='%s', "
|
||||
"name_lc='%s', url='%s', "
|
||||
"type=%d, name_html='%s', description='%s', nusers=%d, "
|
||||
"country='%s', total_credit=%e, expavg_credit=%e",
|
||||
"country='%s', total_credit=%.15e, expavg_credit=%.15e",
|
||||
id,
|
||||
create_time,
|
||||
userid,
|
||||
|
@ -487,18 +487,18 @@ void DB_HOST::db_print(char* buf){
|
|||
sprintf(buf,
|
||||
"id=%d, create_time=%d, userid=%d, "
|
||||
"rpc_seqno=%d, rpc_time=%d, "
|
||||
"total_credit=%.12e, expavg_credit=%.12e, expavg_time=%e, "
|
||||
"total_credit=%.12e, expavg_credit=%.12e, expavg_time=%.15e, "
|
||||
"timezone=%d, domain_name='%s', serialnum='%s', "
|
||||
"last_ip_addr='%s', nsame_ip_addr=%d, "
|
||||
"on_frac=%e, connected_frac=%e, active_frac=%e, "
|
||||
"on_frac=%.15e, connected_frac=%.15e, active_frac=%.15e, "
|
||||
"p_ncpus=%d, p_vendor='%s', p_model='%s', "
|
||||
"p_fpops=%e, p_iops=%e, p_membw=%e, "
|
||||
"p_fpops=%.15e, p_iops=%.15e, p_membw=%.15e, "
|
||||
"os_name='%s', os_version='%s', "
|
||||
"m_nbytes=%e, m_cache=%e, m_swap=%e, "
|
||||
"d_total=%e, d_free=%e, "
|
||||
"d_boinc_used_total=%e, d_boinc_used_project=%e, d_boinc_max=%e, "
|
||||
"n_bwup=%e, n_bwdown=%e, "
|
||||
"credit_per_cpu_sec=%e, "
|
||||
"m_nbytes=%.15e, m_cache=%.15e, m_swap=%.15e, "
|
||||
"d_total=%.15e, d_free=%.15e, "
|
||||
"d_boinc_used_total=%.15e, d_boinc_used_project=%.15e, d_boinc_max=%.15e, "
|
||||
"n_bwup=%.15e, n_bwdown=%.15e, "
|
||||
"credit_per_cpu_sec=%.15e, "
|
||||
"venue='%s', projects='%s'",
|
||||
id, create_time, userid,
|
||||
rpc_seqno, rpc_time,
|
||||
|
@ -571,9 +571,9 @@ void DB_WORKUNIT::db_print(char* buf){
|
|||
sprintf(buf,
|
||||
"id=%d, create_time=%d, appid=%d, "
|
||||
"name='%s', xml_doc='%s', batch=%d, "
|
||||
"rsc_fpops=%e, rsc_iops=%e, rsc_memory=%e, rsc_disk=%e, "
|
||||
"rsc_fpops=%.15e, rsc_iops=%.15e, rsc_memory=%.15e, rsc_disk=%.15e, "
|
||||
"need_validate=%d, "
|
||||
"canonical_resultid=%d, canonical_credit=%e, "
|
||||
"canonical_resultid=%d, canonical_credit=%.15e, "
|
||||
"timeout_check_time=%d, delay_bound=%d, "
|
||||
"error_mask=%d, file_delete_state=%d, assimilate_state=%d, "
|
||||
"workseq_next=%d, opaque=%d",
|
||||
|
@ -621,10 +621,10 @@ void DB_RESULT::db_print(char* buf){
|
|||
"id=%d, create_time=%d, workunitid=%d, "
|
||||
"server_state=%d, outcome=%d, client_state=%d, "
|
||||
"hostid=%d, report_deadline=%d, sent_time=%d, received_time=%d, "
|
||||
"name='%s', cpu_time=%e, "
|
||||
"name='%s', cpu_time=%.15e, "
|
||||
"xml_doc_in='%s', xml_doc_out='%s', stderr_out='%s', "
|
||||
"batch=%d, file_delete_state=%d, validate_state=%d, "
|
||||
"claimed_credit=%e, granted_credit=%e, opaque=%d, random=%d, "
|
||||
"claimed_credit=%.15e, granted_credit=%.15e, opaque=%d, random=%d, "
|
||||
"client_version_num=%d",
|
||||
id, create_time, workunitid,
|
||||
server_state, outcome, client_state,
|
||||
|
|
|
@ -69,6 +69,10 @@ Help debug and enhance the BOINC software.
|
|||
<center>
|
||||
<h3>Status and news</h3>
|
||||
</center>
|
||||
<b>August 1, 2003</b>
|
||||
<br>
|
||||
We fixed various bugs and added some new interface features. The BOINC core client is at version 1.09.
|
||||
<br><br>
|
||||
<b>July 25, 2003</b>
|
||||
<br>
|
||||
We've added two new web-site features for BOINC projects:
|
||||
|
|
|
@ -6,13 +6,15 @@
|
|||
|
||||
void assimilate_handler(
|
||||
WORKUNIT& wu, vector<RESULT>& results, RESULT& canonical_result
|
||||
)
|
||||
{
|
||||
) {
|
||||
ScopeMessages scope_messages(log_messages, SchedMessages::NORMAL);
|
||||
scope_messages.printf("[%s] Assimilating\n", wu.name);
|
||||
if (wu.canonical_resultid) {
|
||||
scope_messages.printf("[%s] Found canonical result\n", wu.name);
|
||||
log_messages.printf_multiline(SchedMessages::DEBUG, canonical_result.xml_doc_out, "[%s] canonical result", wu.name);
|
||||
log_messages.printf_multiline(
|
||||
SchedMessages::DEBUG, canonical_result.xml_doc_out,
|
||||
"[%s] canonical result", wu.name
|
||||
);
|
||||
} else {
|
||||
scope_messages.printf("[%s] No canonical result\n", wu.name);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,9 @@ bool do_pass(APP& app) {
|
|||
while (!wu.enumerate(buf)) {
|
||||
did_something = true;
|
||||
|
||||
log_messages.printf(SchedMessages::DEBUG, "[%s] assimilating; state=%d\n", wu.name, wu.assimilate_state);
|
||||
log_messages.printf(SchedMessages::DEBUG,
|
||||
"[%s] assimilating; state=%d\n", wu.name, wu.assimilate_state
|
||||
);
|
||||
|
||||
sprintf(buf, "where workunitid=%d", wu.id);
|
||||
while (!result.enumerate(buf)) {
|
||||
|
|
|
@ -95,7 +95,8 @@ bool wu_is_feasible(WORKUNIT& wu, HOST& host) {
|
|||
if (host_remaining_time + wu_wallclock_time > wu.delay_bound) {
|
||||
log_messages.printf(
|
||||
SchedMessages::DEBUG, "[WU#%d %s] needs requires %d seconds on [HOST#%d]; delay_bound is %d\n",
|
||||
wu.id, wu.name, (int)wu_wallclock_time, host.id, wu.delay_bound);
|
||||
wu.id, wu.name, (int)wu_wallclock_time, host.id, wu.delay_bound
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ void write_pid_file(const char* filename) {
|
|||
log_messages.printf(SchedMessages::NORMAL, "Couldn't write pid\n");
|
||||
return;
|
||||
}
|
||||
fprintf(fpid, "%d\n", getpid());
|
||||
fprintf(fpid, "%d\n", (int)getpid());
|
||||
fclose(fpid);
|
||||
}
|
||||
|
||||
|
@ -67,10 +67,15 @@ void check_stop_trigger() {
|
|||
}
|
||||
|
||||
|
||||
// update an exponential average of credit per second.
|
||||
// decay an exponential average of credit per day,
|
||||
// and possibly add an increment for new credit
|
||||
//
|
||||
void update_average(
|
||||
double credit_assigned_time, double credit, double& avg, double& avg_time
|
||||
double credit_assigned_time, // when work was started for new credit
|
||||
// (or zero if no new credit)
|
||||
double credit, // amount of new credit
|
||||
double& avg, // average credit per day (in and out)
|
||||
double& avg_time // when average was last computed
|
||||
) {
|
||||
time_t now = time(0);
|
||||
|
||||
|
@ -79,13 +84,14 @@ void update_average(
|
|||
//
|
||||
if (avg_time) {
|
||||
double deltat = now - avg_time;
|
||||
avg *= exp(-deltat*ALPHA);
|
||||
avg *= exp(-deltat*LOG2/AVG_HALF_LIFE);
|
||||
}
|
||||
if (credit_assigned_time) {
|
||||
double deltat = now - credit_assigned_time;
|
||||
// Add (credit)/(number of days to return result) to credit, which
|
||||
// is the average number of cobblestones per day
|
||||
avg += credit/(deltat/86400);
|
||||
// Add (credit)/(number of days to return result) to credit,
|
||||
// which is the average number of cobblestones per day
|
||||
//
|
||||
avg += credit/(deltat/SECONDS_IN_DAY);
|
||||
}
|
||||
avg_time = now;
|
||||
}
|
||||
|
|
|
@ -25,18 +25,20 @@
|
|||
|
||||
// "average credit" uses an exponential decay so that recent
|
||||
// activity is weighted more heavily.
|
||||
// H is the "half-life" period: the average goes down by 1/2
|
||||
// if idle for this period.
|
||||
// Specifically, the weighting function W(t) is
|
||||
// W(t) = exp(t/(H*log(2))*H*log(2).
|
||||
// The average credit is the sum of X*W(t(X))
|
||||
// over units of credit X that were granted t(X) time ago.
|
||||
// AVG_HALF_LIFE is the "half-life" period:
|
||||
// the average decreases by 1/2 if idle for this period.
|
||||
//
|
||||
// After a period of T, average credit is multiplied by
|
||||
// exp(-T*log(2)/AHL)
|
||||
//
|
||||
// When new credit is granted, the average credit is incremented
|
||||
// by the new credit's average rate,
|
||||
// i.e. the amount divided by the time since it was started
|
||||
|
||||
#define LOG2 M_LN2
|
||||
// log(2)
|
||||
#define SECONDS_IN_DAY (3600*24)
|
||||
#define AVG_HALF_LIFE (SECONDS_IN_DAY*7)
|
||||
#define ALPHA (LOG2/AVG_HALF_LIFE)
|
||||
|
||||
extern void write_pid_file(const char* filename);
|
||||
extern void set_debug_level(int);
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
// Contributor(s):
|
||||
//
|
||||
|
||||
// update_stats: update exponential average credit for users and hosts,
|
||||
// and calculate total users/credit for teams
|
||||
// update_stats
|
||||
// update average credit for users and hosts,
|
||||
// and calculate total users/credit for teams
|
||||
//
|
||||
// usage: update_stats [-update_teams] [-update_users] [-update_hosts] [-asynch]
|
||||
|
||||
|
@ -68,13 +69,14 @@ int get_team_credit(TEAM& team) {
|
|||
DB_USER user;
|
||||
char buf[256];
|
||||
|
||||
// count the number of users on a team
|
||||
// count the number of users on the team
|
||||
//
|
||||
sprintf(buf, "where teamid=%d", team.id);
|
||||
retval = user.count(nusers, buf);
|
||||
if (retval) return retval;
|
||||
|
||||
// get the summed credit values for a team
|
||||
//
|
||||
sprintf(buf, "where teamid=%d", team.id);
|
||||
retval = user.sum(expavg_credit, "expavg_credit", buf);
|
||||
if (retval) return retval;
|
||||
|
@ -108,7 +110,6 @@ int update_teams() {
|
|||
continue;
|
||||
}
|
||||
|
||||
// update the team record
|
||||
retval = team.update();
|
||||
if (retval) return retval;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue