*** empty log message ***

svn path=/trunk/boinc/; revision=11387
This commit is contained in:
David Anderson 2006-10-28 18:25:35 +00:00
parent efd0b62aa0
commit d9465a8138
12 changed files with 140 additions and 57 deletions

View File

@ -11688,3 +11688,12 @@ Charlie 28 Oct 2006
mac_installer/
PostInstall.cpp
release_GridRepublic.sh
David 28 Oct 2006
- back end: add function get_output_file_paths()
for getting the paths of multiple output files.
lib/
common_defs.h
sched/
validate_util.C,h

View File

@ -12,10 +12,11 @@ Returns the path of a result's output file
(parses result.xml_doc_out and computes the file's position in the
<a href=hier_dir.php>hierarchical directory structure</a>).
".html_text("
int get_output_file_paths(RESULT const&, vector<string>&);
"),"
<p>
Note: this function doesn't handle multiple output files
(if there are multiple files, it returns the path of the first one).
If your application has multiple output files, see below.
Same, for multiple output files.
<hr>
".html_text("
int try_fopen(char* path, FILE*& f, char* mode);
@ -37,40 +38,6 @@ Given a vector of N correct results, computes a canonical credit as follows:
<li> if N>2, toss out high and low claimed credit,
and return the average of the rest.
</ul>
<hr>
<h3>Multiple output files</h3>
If your application has multiple output files
you'll need to generalize get_output_file_path().
To do this you'll need to know the following:
<p>
The database field 'result.xml_doc_out'
describes a result's output files.
It has the form
".html_text("
<file_info>...</file_info>
[ ... ]
<result>
<name>foobar</name>
<wu_name>blah</wu_name>
<exit_status>blah</exit_status>
<file_ref>...</file_ref>
[ ... ]
</result>
"),"
The components are:
<ul>
<li> The <b>&lt;name></b> element is the result name.
<li> The <b>&lt;wu_name></b> element is the workunit name.
<li> Each <b>&lt;file_ref></b> element is an association to an output file,
described by a corresponding <b>&lt;file_info></b> element.
</ul>
<p>
The XML document describing the sizes and checksums of the output
files is a list of <b>&lt;file_info></b> elements,
with the <b>nbytes</b> and <b>md5_cksum</b> fields present.
The project back end
must parse this field to find the locations and checksums of output files.
";
page_tail();
?>

55
doc/beta.php Normal file
View File

@ -0,0 +1,55 @@
<?php
require_once("docutil.php");
page_head("Beta-test applications");
echo "
It's important to test new applications on a wide range of hosts,
since bugs may appear only with particular OS versions,
memory sizes, display types, usage patterns, and so on.
It's handy to use volunteers to do this testing,
since they provide the needed diversity of hosts.
<p>
One way to implement this is to create a separate test project.
This has two disadvantages:
<ul>
<li> There is overhead in creating and maintaining a separate project.
<li> The credit accrued by testers goes to a different project.
</ul>
BOINC provides a way to do beta testing in the context
of your existing project.
You can let users volunteer to run test applications,
warning them in advance that these applications are more likely to crash.
These users will get a mixture of regular and test results,
and they'll get credit for both.
Here's how to do it:
<ul>
<li> Upgrade to the BOINC server software of Oct 25 2006 or later.
<li> Create a new <a href=app.php>application</a>
using <a href=tool_xadd.php>xadd</a>.
Include &lt;beta&gt;1&lt;/beta&gt; in the &lt;app&gt; element to
designate it as a beta-test application.
<li> Add a validator and assimilator for the test application.
<li> Include the line
<pre>
\$project_has_beta = true;
</pre>
in your html/project/project_specific_prefs.inc file.
This will add a 'Run test applications?' option to your
project-specific preferences.
<li> Publicize this on your web site and wait for
some users to set their preferences to allow test apps.
(Note: this flag is stored in XML in the project_prefs
field of the user table; scan for
&lt;allow_beta_work&gt;1&lt;/allow_beta_work&gt;).
<li> Create application versions for the test application.
<li> Create work (as needed for testing) for the test application.
To prevent test work from dominating regular work,
either use the -allapps feeder option
(and give the test app a small weight)
or make a work generator for the test app that maintains
only a small number of unsent results.
</ul>
";
page_tail();
?>

View File

@ -116,6 +116,7 @@ show_name("David Anderson");
show_name("Noaa Avital");
show_name("Don Bashford");
show_name("Lars Bausch");
show_name("Christian Beer");
show_name("Frederic Bor");
show_name("Brian Boshes");
show_name("Jens Breitbart");

View File

@ -91,6 +91,7 @@ Creating a BOINC project
</ul>
<li> <a href=tool_upgrade.php>Upgrading a project's server software</a>
<li> <a href=multi_host.php>Multiple server hosts</a>
<li> <a href=beta.php>Beta-test applications</a>
</ul>

View File

@ -14,7 +14,7 @@ require_once("docutil.php");
$xml = $_GET["xml"];
$dev = $_GET["dev"];
$dev=1;
if (!$xml) $dev=1;
$pname = $_GET["platform"];
$min_version = $_GET["min_version"];
$max_version = $_GET["max_version"];

View File

@ -57,10 +57,10 @@ to accomodate a particular file.
Secondly, your validator and assimilator should call
".html_text("
int get_output_file_path(RESULT const& result, string& path);
or
int get_output_file_paths(RESULT const& result, vector<string>& );
")."
to get the paths of output files in the hierarchy.
If your application has multiple output files,
you'll need to generalize this function.
<p>
A couple of utility programs are available:

View File

@ -4,24 +4,16 @@ page_head("Participating in multiple projects");
echo "
<p>
You can join a second and subsequent projects as follows.
<ol>
<li> Visit the second project's web site and create an account.
You can join a second and subsequent projects as follows:
Run the BOINC client, and select the <b>Attach to Project</b> command.
Enter the project's URL and your email address and password.
You don't have to use the same email address,
but if you do so the accounts will be 'coupled'
in terms of preferences and statistics.
<li> Receive an email containing an account key.
<li> Paste the account key into the project's web site
to complete the account creation.
<li> Run the BOINC client, and select the <b>Attach to Project</b> command.
Enter the project's URL and your account key.
</ol>
<h2>General preferences</h2>
<p>
Each BOINC project has its own database and servers.
Each account has its own copy of your
Each BOINC project has its own copy of your
<a href=prefs.php>general preferences</a>.
When you edit your general preferences on a particular project,
initially it changes only that one account.
@ -36,7 +28,7 @@ and have at least one computer attached to both accounts).
</ol>
This propagation is 'piggybacked' onto the
scheduler requests between your computers and project servers.
regular communication between your computers and project servers.
You can accelerate the propagation by using
the Update command in the BOINC Manager.

View File

@ -351,8 +351,9 @@ list_item("reliable_time<br> reliable_min_avg_credit<br>
<p>
This mechanism is used when the age of a workunit exceeds
<b>reliable_time</b> (typically 2-3X the delay bound).
The results are sent to hosts with at least
<b>reliable_min_avg_credit</b> and at most
The results are sent to hosts for which
expavg_credit/ncpus is at least <b>reliable_min_avg_credit</b>
and whose average turnaround is at most
<b>reliable_max_avg_turnaround</b>.
The delay bound is multiplied by <b>reliable_reduced_delay_bound</b>
(typically 0.5 or so).

View File

@ -92,7 +92,7 @@ enum SUSPEND_REASON {
SUSPEND_REASON_TIME_OF_DAY = 8,
SUSPEND_REASON_BENCHMARKS = 16,
SUSPEND_REASON_DISK_SIZE = 32,
SUSPEND_REASON_CPU_USAGE_LIMIT = 64,
SUSPEND_REASON_CPU_USAGE_LIMIT = 64
};
// States of a result on a client.

View File

@ -38,10 +38,11 @@
using std::vector;
using std::string;
#if 0
// get the name of a result's (first) output file
//
int get_output_file_path(RESULT const& result, string& path_str) {
char buf[256], path[256];
char buf[256], path[1024];
if (!parse_str(result.xml_doc_out, "<name>", buf, sizeof(buf))) {
return ERR_XML_PARSE;
@ -50,7 +51,62 @@ int get_output_file_path(RESULT const& result, string& path_str) {
path_str = path;
return 0;
}
#endif
static int parse_filename(XML_PARSER& xp, string& name) {
char tag[256];
bool is_tag, found=false;
while (!xp.get(tag, sizeof(tag), is_tag)) {
if (!is_tag) continue;
if (!strcmp(tag, "/file")) {
return found?0:ERR_XML_PARSE;
}
if (xp.parse_string(tag, "name", name)) {
found = true;
}
}
return ERR_XML_PARSE;
}
int get_output_file_path(RESULT const& result, string& path_str) {
char tag[256], path[1024];
bool is_tag;
string name;
MIOFILE mf;
mf.init_buf((char*)(result.xml_doc_out));
XML_PARSER xp(&mf);
while (!xp.get(tag, sizeof(tag), is_tag)) {
if (!is_tag) continue;
if (!strcmp(tag, "file")) {
int retval = parse_filename(xp, name);
if (retval) return retval;
dir_hier_path(name.c_str(), config.upload_dir, config.uldl_dir_fanout, path);
path_str = path;
return 0;
}
}
return ERR_XML_PARSE;
}
int get_output_file_paths(RESULT const& result, vector<string>& paths) {
char tag[256], path[1024];
bool is_tag;
MIOFILE mf;
string name;
mf.init_buf((char*)(result.xml_doc_out));
XML_PARSER xp(&mf);
paths.clear();
while (!xp.get(tag, sizeof(tag), is_tag)) {
if (!is_tag) continue;
if (!strcmp(tag, "file")) {
int retval = parse_filename(xp, name);
if (retval) return retval;
dir_hier_path(name.c_str(), config.upload_dir, config.uldl_dir_fanout, path);
paths.push_back(path);
}
}
return 0;
}
#define CREDIT_EPSILON .001

View File

@ -26,6 +26,7 @@
#include "boinc_db.h"
extern int get_output_file_path(RESULT const& result, std::string& path);
extern int get_output_file_paths(RESULT const& result, std::vector<std::string>&);
extern double median_mean_credit(std::vector<RESULT>& results);
#endif