*** empty log message ***

svn path=/trunk/boinc/; revision=12313
This commit is contained in:
David Anderson 2007-04-04 21:12:00 +00:00
parent c1024185f7
commit 5677316798
2 changed files with 58 additions and 18 deletions

View File

@ -595,7 +595,10 @@ char* colors[] = {
void CLIENT_STATE::html_start() {
html_out = fopen("sim_out.html", "w");
fprintf(html_out, "<table border=1>\n");
fprintf(html_out, "<h2>Simulator output</h2>"
"<a href=sim_out.txt>message log</a><p>"
"<table border=1>\n"
);
}
void CLIENT_STATE::html_rec() {
@ -607,8 +610,8 @@ void CLIENT_STATE::html_rec() {
SIM_PROJECT* p = (SIM_PROJECT*)atp->result->project;
fprintf(html_out, "<td bgcolor=%s>%s: %.2f</td>",
colors[p->index], atp->result->name, atp->cpu_time_left);
n++;
}
n++;
}
if (n > ncpus) {
fprintf(html_out, "<td>TOO MANY JOBS RUNNING</td>");
@ -629,7 +632,6 @@ void CLIENT_STATE::html_end() {
void CLIENT_STATE::simulate(double duration, double delta) {
bool action;
now = 0;
printf("n: %d\n", active_tasks.active_tasks.size());
html_start();
while (1) {
while (1) {
@ -675,16 +677,26 @@ int main(int argc, char** argv) {
freopen("sim_out.txt", "w", stdout);
for (i=1; i<argc; i++) {
if (!strcmp(argv[i], "--duration")) {
duration = atoi(next_arg(argc, argv, i));
} else if (!strcmp(argv[i], "--delta")) {
delta = atoi(next_arg(argc, argv, i));
for (i=1; i<argc;) {
char* opt = argv[i++];
if (!strcmp(opt, "--duration")) {
duration = atof(next_arg(argc, argv, i));
} else if (!strcmp(opt, "--delta")) {
delta = atof(next_arg(argc, argv, i));
} else {
help(argv[0]);
}
}
if (duration <= 0) {
printf("non-pos duration\n");
exit(1);
}
if (delta <= 0) {
printf("non-pos delta\n");
exit(1);
}
strcpy(projects, "sim_projects.xml");
strcpy(host, "sim_host.xml");
strcpy(prefs, "sim_prefs.xml");

View File

@ -1,40 +1,66 @@
<?php
require_once("docutil.php");
page_head("Simulator input format");
page_head("BOINC client simulator");
echo "
This document describes an input file format for BOINC client simulators.
The input consists of three files.
The BOINC client simulator simulates the
CPU scheduling and work-fetch policies of the BOINC client.
It uses the same source code as the core client for these policies.
The simulator can be built with 'makefile_sim' on Unix
or the 'sim' project on Windows.
<h2>Usage</h2>
<pre>
sim [--duration X] [--delta X]
</pre>
runs the simulator with the given duration and time step.
<h2>Output files</h2>
The simulator creates two output files:
<p>
<b>sim_out.txt</b>:
This is the message log
(same as would be generated by the client).
Its contents are controlled by cc_config.xml.
<b>sim_out.html</b>:
When viewed in a web browser, this shows a 'time line'
showing what's running when.
<h2>Input files</h2>
The input consists of four files.
<h3>sim_projects.xml</h3>
This describes the set of attached projects.
This describes a set of attached projects.
".html_text("
<projects>
<project>
<project_name>proj 1</project_name>
<project_name>P1</project_name>
<resource_share>100</resource_share>
<app>
<latency_bound>100</latency_bound>
<latency_bound>1000</latency_bound>
<fpops_est>1e9</fpops_est>
<fpops>
<mean>100000000</mean>
<var>100000</var>
<mean>1e9</mean>
<stdev>1e5</stdev>
</fpops>
<working_set>100000000</working_set>
</app>
...
<available>
<frac>.7</frac>
<lambda>1000</lambda>
</available>
</project>
...
</projects>
")."
A project has one or more applications.
Each application has a given latency bound and working-set size.
The number of FP ops is a truncated normal distribution
with the given mean and variance.
with the given mean and standard deviation.
<p>
The availability of the projects
@ -48,9 +74,9 @@ achieving the given available fraction.
This describes the host hardware and availability.
".html_text("
<host>
<p_ncpus>x</p_ncpus>
<p_fpops>x</p_fpops>
<m_nbytes>x</m_nbytes>
<p_ncpus>x</p_ncpus>
<available>
<frac>.7</frac>
<lambda>1000</lambda>
@ -66,6 +92,8 @@ and the idle periods (i.e. when there is no user input)
are modeled as above.
<h3>sim_prefs.xml</h3>
Same format as the global_prefs.xml file.
<h3>cc_config.xml</h3>
Same format as the client's cc_config.xml file.
";
page_tail();
?>