- scheduler: don't show resource share in msgs in cases where

it's not used.
- db_purge: add "no_archive" option

svn path=/trunk/boinc/; revision=13430
This commit is contained in:
David Anderson 2007-08-21 20:07:50 +00:00
parent 5450420dae
commit c99833a7c9
10 changed files with 86 additions and 64 deletions

View File

@ -8039,3 +8039,13 @@ Charlie 20 Aug 2007
mac_installer/
uninstall.cpp
Uninstaller.rsrc (new)
David 21 Aug 2007
- scheduler: don't show resource share in msgs in cases where
it's not used.
- db_purge: add "no_archive" option
sched/
db_purge.C
handle_request.C
sched_send.C

View File

@ -1,6 +1,11 @@
<?
$project_news = array(
array("August 17, 2007",
"World Community Grid has announced that it is
<a href=http://www.worldcommunitygrid.org/forums/wcg/viewthread?thread=15715 >migrating fully to BOINC</a>.
Welcome to all WCG participants!"
),
array("July 25, 2007",
"BOINC finally has a new logo!
Many thanks Michal Krakowiak, the graphic designer who created it.

View File

@ -46,17 +46,17 @@ list_item("<a href=http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_loc>boin
of the BOINC GUI or web interfaces.
");
list_item(
"<a href=http://www.lists.ssl.berkeley.edu/mailman/listinfo/boinc_stats>boinc_stats</a>",
"<a href=http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_stats>boinc_stats</a>",
"For people developing web sites showing statistics for BOINC projects."
);
list_item("<a href=http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_cvs>boinc_cvs</a>",
"Summaries of BOINC CVS checkins are posted to this list.
No other posts, please."
);
list_item("<a href=http://www.lists.ssl.berkeley.edu/mailman/listinfo/boinc_opt>boinc_opt</a>",
list_item("<a href=http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_opt>boinc_opt</a>",
"For people porting and optimizing BOINC applications."
);
list_item("<a href=http://www.lists.ssl.berkeley.edu/mailman/listinfo/boinc_helpers>boinc_helpers</a>",
list_item("<a href=http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_helpers>boinc_helpers</a>",
"For BOINC <a href=help.php>Help Volunteers</a>,
to discuss policies and user problems."
);

View File

@ -11,6 +11,11 @@ The current logo and associated icons was designed by Michal Krakowiak.
Its arms represent the convergence of separated things
(such as computers) into a unified whole.
The colors are based on U.C. Berkeley's blue-and-gold colors.
<ul>
<li> <a href=logo/boinc_600.jpg>600x305 version (JPEG)</a>
<li> <a href=logo/www_logo_trans.png>Transparent-background version (PNG)</a>
<li> <a href=logo/www_logo_trans.gif>Transparent-background version (GIFF)</a>
</ul>
<h2>The old BOINC logo and icons</h2>
<ul>

BIN
doc/logo/www_logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
doc/logo/www_logo_trans.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
doc/logo/www_logo_trans.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -88,40 +88,32 @@ using namespace std;
#define DB_QUERY_LIMIT 1000
SCHED_CONFIG config;
FILE *wu_stream=NULL;
FILE *re_stream=NULL;
FILE *wu_index_stream=NULL;
FILE *re_index_stream=NULL;
int time_int=0;
int min_age_days=0;
// These is used if limiting the total number of workunits to eliminate
int purged_workunits= 0;
// If nonzero, maximum number of workunits to purge.
// Since all results associated with a purged workunit are also purged,
// this also limits the number of purged results.
//
int max_number_workunits_to_purge=0;
// set on command line if compression of archives is desired
#define COMPRESSION_NONE 0
#define COMPRESSION_GZIP 1
#define COMPRESSION_ZIP 2
// subscripts MUST be in agreement with defines above
SCHED_CONFIG config;
FILE *wu_stream=NULL;
FILE *re_stream=NULL;
FILE *wu_index_stream=NULL;
FILE *re_index_stream=NULL;
int time_int=0;
int min_age_days=0;
bool no_archive = false;
int purged_workunits= 0;
// used if limiting the total number of workunits to eliminate
int max_number_workunits_to_purge=0;
// If nonzero, maximum number of workunits to purge.
// Since all results associated with a purged workunit are also purged,
// this also limits the number of purged results.
const char *suffix[3]={"", ".gz", ".zip"};
// default is no compression
// subscripts MUST be in agreement with defines above
int compression_type=COMPRESSION_NONE;
// set on command line if archive files should be closed and re-opened
// after getting some max no of WU in the file
int max_wu_per_file=0;
// keep track of how many WU archived in file so far
// set on command line if archive files should be closed and re-opened
// after getting some max no of WU in the file
int wu_stored_in_file=0;
// keep track of how many WU archived in file so far
bool time_to_quit() {
if (max_number_workunits_to_purge) {
@ -429,12 +421,14 @@ int purge_and_archive_results(DB_WORKUNIT& wu, int& number_results) {
sprintf(buf, "where workunitid=%d", wu.id);
while (!result.enumerate(buf)) {
retval= archive_result(result);
if (retval) return retval;
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
"Archived result [%d] to a file\n", result.id
);
if (!no_archive) {
retval= archive_result(result);
if (retval) return retval;
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
"Archived result [%d] to a file\n", result.id
);
}
retval= result.delete_from_db();
if (retval) return retval;
log_messages.printf(
@ -489,25 +483,29 @@ bool do_pass() {
did_something = true;
// if archives have not already been opened, then open them.
if (!wu_stream) {
//
if (!no_archive && !wu_stream) {
open_all_archives();
}
retval = purge_and_archive_results(wu, n);
do_pass_purged_results += n;
retval= archive_wu(wu);
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
"Failed to write to XML file workunit:%d\n", wu.id
if (!no_archive) {
retval= archive_wu(wu);
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
"Failed to write to XML file workunit:%d\n", wu.id
);
exit(5);
}
log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG,
"Archived workunit [%d] to a file\n", wu.id
);
exit(5);
}
log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG,
"Archived workunit [%d] to a file\n", wu.id
);
//purge workunit from DB
// purge workunit from DB
//
retval= wu.delete_from_db();
if (retval) {
log_messages.printf(SCHED_MSG_LOG::MSG_CRITICAL,
@ -523,14 +521,16 @@ bool do_pass() {
do_pass_purged_workunits++;
wu_stored_in_file++;
// flush the various output files.
fflush(NULL);
if (!no_archive) {
fflush(NULL);
// if file has got max # of workunits, close and compress it.
// This sets file pointers to NULL
if (max_wu_per_file && wu_stored_in_file>=max_wu_per_file) {
close_all_archives();
wu_stored_in_file=0;
// if file has got max # of workunits, close and compress it.
// This sets file pointers to NULL
//
if (max_wu_per_file && wu_stored_in_file>=max_wu_per_file) {
close_all_archives();
wu_stored_in_file=0;
}
}
if (time_to_quit()) {
@ -542,18 +542,19 @@ bool do_pass() {
if (do_pass_purged_workunits) {
log_messages.printf(SCHED_MSG_LOG::MSG_NORMAL,
"Archived %d workunits and %d results\n",
do_pass_purged_workunits,do_pass_purged_results
do_pass_purged_workunits, do_pass_purged_results
);
}
if (did_something && wu_stored_in_file>0) {
log_messages.printf(SCHED_MSG_LOG::MSG_DEBUG,
"Currently open archive files contain %d workunits\n",
wu_stored_in_file);
wu_stored_in_file
);
}
if (do_pass_purged_workunits > DB_QUERY_LIMIT/2) {
return true;
return true;
} else {
return false;
}
@ -580,6 +581,8 @@ int main(int argc, char** argv) {
compression_type=COMPRESSION_GZIP;
} else if (!strcmp(argv[i], "-max_wu_per_file")) {
max_wu_per_file = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-no_archive")) {
no_archive = true;
} else if (!strcmp(argv[i], "-sleep")) {
sleep_sec = atoi(argv[++i]);
if (sleep_sec < 1 || sleep_sec > 86400) {

View File

@ -1451,11 +1451,10 @@ void handle_request(
if (sreq.parse(fin) == 0){
log_messages.printf(
SCHED_MSG_LOG::MSG_NORMAL,
"Handling request: IP %s, auth %s, host %d, platform %s, version %d.%d.%d, RSF %f\n",
"Handling request: IP %s, auth %s, host %d, platform %s, version %d.%d.%d\n",
get_remote_addr(), sreq.authenticator, sreq.hostid, sreq.platform.name,
sreq.core_client_major_version, sreq.core_client_minor_version,
sreq.core_client_release,
sreq.resource_share_fraction
sreq.core_client_release
);
process_request(sreq, sreply, ss, code_sign_key);
} else {

View File

@ -244,8 +244,8 @@ static double estimate_wallclock_duration(
}
log_messages.printf(
SCHED_MSG_LOG::MSG_DEBUG,
"est cpu dur %f; running_frac %f; rsf %f; est %f\n",
ecd, running_frac, request.resource_share_fraction, ewd
"est cpu dur %f; running_frac %f; est %f\n",
ecd, running_frac, ewd
);
return ewd;
}
@ -1038,14 +1038,14 @@ void send_work(
if (reply.wreq.core_client_version>419) {
sprintf(helpful,
"(won't finish in time) "
"Computer on %.1f%% of time, BOINC on %.1f%% of that, this project gets %.1f%% of that",
100.0*reply.host.on_frac, 100.0*reply.host.active_frac, 100.0*sreq.resource_share_fraction
"Computer on %.1f%% of time, BOINC on %.1f%% of that",
100.0*reply.host.on_frac, 100.0*reply.host.active_frac
);
} else {
sprintf(helpful,
"(won't finish in time) "
"Computer available %.1f%% of time, this project gets %.1f%% of that",
100.0*reply.host.on_frac, 100.0*sreq.resource_share_fraction
"Computer available %.1f%% of time",
100.0*reply.host.on_frac
);
}
USER_MESSAGE um(helpful, "high");