diff --git a/checkin_notes b/checkin_notes index aec7e265ac..d269202ec7 100755 --- a/checkin_notes +++ b/checkin_notes @@ -12026,3 +12026,11 @@ David 2 Nov 2006 clientgui/ ViewResources.cpp + +David 2 Nov 2006 + - Added a function GLOBAL_PREFS::write_subset() + that writes XML for a selected subset of prefs + (for simple GUI prefs dialog) + + lib/ + prefs.C,h diff --git a/doc/acct_mgrs.php b/doc/acct_mgrs.php index 48707bf582..30dd7c0629 100644 --- a/doc/acct_mgrs.php +++ b/doc/acct_mgrs.php @@ -21,9 +21,9 @@ An account manager is a web site that simplifies participating in BOINC, especially if you are new to BOINC, or if you have several computers, participate in several projects, or like to learn about new projects. -The account manager concept was conceived by -GridRepublic, -and developed jointly by GridRepublic and BOINC. +The account manager concept was conceived and +developed jointly by GridRepublic +and BOINC. The following account managers are available:
  • Core client: diff --git a/doc/homogeneous_redundancy.php b/doc/homogeneous_redundancy.php index 3cccafdf67..f1a4b12772 100644 --- a/doc/homogeneous_redundancy.php +++ b/doc/homogeneous_redundancy.php @@ -21,8 +21,10 @@ The 'fuzzy comparison' approach does not work for such applications.

    Eliminating discrepancies

    One approach is to eliminate numerical discrepancies. -Some notes on how to do this for Fortran programs -are here +Some notes on how to do this for Fortran programs are given in a paper, +Massive Tracking on Heterogeneous Platforms +and in an earlier text document, +both courtesy of Eric McIntosh,

    Homogeneous redundancy

    diff --git a/lib/prefs.C b/lib/prefs.C index b0c29ef6c5..11976a963a 100644 --- a/lib/prefs.C +++ b/lib/prefs.C @@ -309,4 +309,96 @@ int GLOBAL_PREFS::write(MIOFILE& f) { return 0; } +// write a subset of the global preferences, +// as selected by the mask of bools +// +int GLOBAL_PREFS::write_subset(MIOFILE& f, GLOBAL_PREFS_MASK& mask) { + f.printf("\n"); + if (mask.run_on_batteries) { + f.printf(" %d\n", + run_on_batteries?1:0 + ); + } + if (mask.run_if_user_active) { + f.printf(" %d\n", + run_if_user_active?1:0 + ); + } + if (mask.start_hour) { + f.printf(" %d\n", start_hour); + } + if (mask.end_hour) { + f.printf(" %d\n", end_hour); + } + if (mask.net_start_hour) { + f.printf(" %d\n", net_start_hour); + } + if (mask.net_end_hour) { + f.printf(" %d\n", net_end_hour); + } + if (mask.leave_apps_in_memory) { + f.printf(" %d\n", + leave_apps_in_memory?1:0 + ); + } + if (mask.confirm_before_connecting) { + f.printf(" %d\n", + confirm_before_connecting?1:0 + ); + } + if (mask.hangup_if_dialed) { + f.printf(" %d\n", + hangup_if_dialed?1:0 + ); + } + if (mask.dont_verify_images) { + f.printf(" %d\n", + dont_verify_images?1:0 + ); + } + if (mask.work_buf_min_days) { + f.printf(" %f\n", work_buf_min_days); + } + if (mask.max_cpus) { + f.printf(" %d\n", max_cpus); + } + if (mask.cpu_scheduling_period_minutes) { + f.printf(" %f\n", cpu_scheduling_period_minutes); + } + if (mask.disk_interval) { + f.printf(" %f\n", disk_interval); + } + if (mask.disk_max_used_gb) { + f.printf(" %f\n", disk_max_used_gb); + } + if (mask.disk_max_used_pct) { + f.printf(" %f\n", disk_max_used_pct); + } + if (mask.disk_min_free_gb) { + f.printf(" %f\n", disk_min_free_gb); + } + if (mask.vm_max_used_frac) { + f.printf(" %f\n", vm_max_used_frac*100); + } + if (mask.ram_max_used_busy_frac) { + f.printf(" %f\n", ram_max_used_busy_frac*100); + } + if (mask.ram_max_used_idle_frac) { + f.printf(" %f\n", ram_max_used_idle_frac*100); + } + if (mask.idle_time_to_run) { + f.printf(" %f\n", idle_time_to_run); + } + if (mask.max_bytes_sec_up) { + f.printf(" %f\n", max_bytes_sec_up); + } + if (mask.max_bytes_sec_down) { + f.printf(" %f\n", max_bytes_sec_down); + } + if (mask.cpu_usage_limit) { + f.printf(" %f\n", cpu_usage_limit); + } + f.printf("\n"); +} + const char *BOINC_RCSID_3fb442bb02 = "$Id$"; diff --git a/lib/prefs.h b/lib/prefs.h index 135cc3c4a1..27bc8698f9 100644 --- a/lib/prefs.h +++ b/lib/prefs.h @@ -32,6 +32,35 @@ // A scheduler reply message may contain a more recent set of preferences. // +// A struct with one bool per GLOBAL_PREFS field +// +struct GLOBAL_PREFS_MASK { + bool run_on_batteries; + bool run_if_user_active; + bool start_hour; // 0..23; no restriction if start==end + bool end_hour; + bool net_start_hour; // 0..23; no restriction if start==end + bool net_end_hour; + bool leave_apps_in_memory; + bool confirm_before_connecting; + bool hangup_if_dialed; + bool dont_verify_images; + bool work_buf_min_days; + bool max_cpus; + bool cpu_scheduling_period_minutes; + bool disk_interval; + bool disk_max_used_gb; + bool disk_max_used_pct; + bool disk_min_free_gb; + bool vm_max_used_frac; + bool ram_max_used_busy_frac; + bool ram_max_used_idle_frac; + bool idle_time_to_run; + bool max_bytes_sec_up; + bool max_bytes_sec_down; + bool cpu_usage_limit; +}; + // The following structure is a parsed version of the prefs file // struct GLOBAL_PREFS { @@ -71,6 +100,7 @@ struct GLOBAL_PREFS { int parse_override(XML_PARSER&, const char* venue, bool& found_venue); int parse_file(const char* filename, const char* venue, bool& found_venue); int write(MIOFILE&); + int write_subset(MIOFILE&, GLOBAL_PREFS_MASK&); }; #endif