diff --git a/checkin_notes b/checkin_notes index b2524d4ed5..2d69eea37d 100755 --- a/checkin_notes +++ b/checkin_notes @@ -23706,3 +23706,11 @@ David 1 Feb 2005 sched/ server_types.C + +David 1 Feb 2005 + - MFILE's buffer was not being maintained as NULL-terminated. + This caused problems with GUI RPC, where the buffer was + transferred to code that expected it to be NULL-terminated + + lib/ + mfile.C,h diff --git a/doc/backend_logic.php b/doc/backend_logic.php index 4afc7e4d5f..b99ddba5f7 100644 --- a/doc/backend_logic.php +++ b/doc/backend_logic.php @@ -33,7 +33,7 @@ echo "
 // gets run when either
 // - a result becomes done (via timeout or client reply)
-// - the WU error mask is set (e.g. by validater)
+// - the WU error mask is set (e.g. by validator)
 // - assimilation is finished
     for each WU with now > transition_time:
 
diff --git a/doc/backend_programs.php b/doc/backend_programs.php
index f70133e0e6..6898b51c18 100644
--- a/doc/backend_programs.php
+++ b/doc/backend_programs.php
@@ -17,7 +17,7 @@ Sets the verbosity level.
 2 = normal messages,
 3 = detailed debugging info.
 
-

Work generation

+

Work generator

There is one work generator per application. It creates workunits and the corresponding input files. @@ -28,7 +28,7 @@ for registering the workunits in the database. During testing, you can create a single workunit using create_work, then use the daemon program -make_work +make_work to copy this workunit as needed to maintain a given supply of work.

Transitioner

@@ -45,7 +45,7 @@ If present, this instance of the transitioner will handle only workunits for which mod(id, n) = i. This lets you run arbitrarily many instances of the transitioner. -

Validation

+

Validator

There is one validator per application. It compares redundant results and selects a canonical result @@ -53,7 +53,7 @@ representing the correct output, and a canonical credit granted to users and hosts that return the correct output. -

Assimilation

+

Assimilator

There is one assimilator per application. It handles workunits that are 'completed': that is, that have a canonical result or for which @@ -62,9 +62,16 @@ Handling a successfully completed result might involve record results in a database and perhaps generating more work.

File deletion

-This application-independent program -deletes input and output files -when they are no longer needed. +The application-independent program +file_deleter +deletes input and output files when they are no longer needed. + +

Database purging

+The application-independent program +db_purge +removes work-related database entries when they are no longer needed. +This keeps your database at a constant size even +when your project runs for a long time. "; page_tail(); ?> diff --git a/doc/busy_work.php b/doc/busy_work.php index fcfe28b540..5434bda776 100644 --- a/doc/busy_work.php +++ b/doc/busy_work.php @@ -8,11 +8,26 @@ The daemon program
 make_work -wu_name name -cushion N
 
-creates copies of the given work unit +creates copies of the given 'master workunit' as needed to maintain a supply of at least N unsent results. +This is useful for testing purposes. +

+Note: if you run the file_deleter and/or db_purge, +the master workunit or its input files may be deleted +(which will cause make_work to fail). +To avoid this, give the master workunit a name that contains +'nodelete' as a substring. +This causes the file_deleter and db_purge to skip over it.

-This is useful for testing purposes. +It may be convenient to have a script that recreates +the master workunit. +For example: + +

+cp test_workunits/12ja04aa `bin/dir_hier_path 12ja04aa`
+bin/create_work -appname setiathome -wu_name sah_nodelete -wu_template templates/setiathome_wu_0 -result_template templates/setiathome_result_0 12ja04aa
+
"; diff --git a/doc/community.php b/doc/community.php index 8bcacc8777..025c8da7c3 100644 --- a/doc/community.php +++ b/doc/community.php @@ -20,41 +20,37 @@ in various languages. See also GUIs and add-on software for BOINC. -

Mailing lists

+

Email lists

-The follow mailing lists are available. +The follow email lists are available. Click to subscribe or post to a list. -
-
-boinc_projects -
-This list is for people operating BOINC projects. -Use it to ask questions, report bugs, or request enhancements to -the BOINC server software. -Announcements of modifications and upgrades to BOINC will posted here. +"; +list_start(); +list_item( + "boinc_projects", + "For people operating BOINC projects. + Use it to ask questions, report bugs, or request enhancements to + the BOINC server software. + Announcements of modifications and upgrades to BOINC will posted here. +"); +list_item("boinc_dev", + "For people developing, debugging or porting the BOINC software. +"); +list_item( + "boinc_stats", + "For people developing web sites showing statistics for BOINC projects." +); -
-boinc_dev -
-This list is for people developing, debugging or porting the BOINC software. +list_item("boinc_cvs", + "Summaries of BOINC CVS checkins are posted to this list. + No other posts, please." +); -
-boinc_stats -
-This list is for people developing web sites showing statistics -for BOINC projects. - -
-boinc_cvs -
-Summaries of BOINC CVS checkins are posted to this list. - -
-boinc_opt -
-This list is for people porting and optimizing BOINC applications. - -
+list_item("boinc_opt", + "For people porting and optimizing BOINC applications." +); +list_end(); +echo "

Getting source code

At any given point there are two different versions @@ -94,18 +90,26 @@ RSS-based news feeds are available from BOINC and from several BOINC-based projects:

+ +

Graphics

+

+The BOINC logo uses the Planet Benson font from +Larabie Fonts. +Hi-res logos: +PNG, JPEG, +GIFF. + +

+Check out this +BOINC logo +by Jared Hatfield, a high school student. +

Other

A good summary of distributed computing projects, including those based on BOINC, is at www.aspenleaf.com. -

-For inquiries about BOINC, contact Dr. David P. Anderson, -the director of the BOINC project, at davea at ssl.berkeley.edu. -If you have problems with the BOINC software for Windows please email -Rom Walton: rwalton at ssl.berkeley.edu. "; diff --git a/doc/contact.php b/doc/contact.php index 1ad3a86238..2e4f0235b6 100644 --- a/doc/contact.php +++ b/doc/contact.php @@ -1,13 +1,32 @@ Space Sciences Laboratory at the University of California, Berkeley. +Project staff include: +

+
Dr. David P. Anderson +
+Director and architect. Contact him at davea at ssl.berkeley.edu. + +
Rom Walton +
+Developer (mostly Windows). +Contact him at rwalton at ssl.berkeley.edu. + +
Jeff Cobb +
Developer and system administrator +
Matt Lebofsky +
Developer and system administrator +
Court Cannick +
System administrator +

-BOINC developers (many of them volunteers) include: +Other BOINC developers (many of them volunteers) include:

"; $i = 0; @@ -84,12 +103,6 @@ echo "

Many thanks to Komori Hitoshi for proof-reading this web site. -

-The BOINC logo uses the Planet Benson font from -Larabie Fonts. -Hi-res logos: -PNG, JPEG, -GIFF. "; page_tail(); ?> diff --git a/doc/create_project.php b/doc/create_project.php index df66a44e88..f57d9d3a28 100644 --- a/doc/create_project.php +++ b/doc/create_project.php @@ -100,7 +100,7 @@ Getting work done How to generate tasks and handle the results.

It prints the full pathname. Run this in the project's root directory. +For example: +
+cp test_workunits/12ja04aa `bin/dir_hier_path 12ja04aa`
+
+copies an input file from the test_workunits directory +to the download directory hierarchy.

Creating workunit records

Workunits can be created using either a script -(using the create_workprogram) +(using the create_work program) or a program (using the create_work() function). +The input files must already be in the download directory.

The utility program is

@@ -158,8 +165,6 @@ create_work
                                         // relative to project root
     -result_template filename           // result template filename
                                         // relative to project root
-    [ -config_dir path ]                // where 'config.xml' is;
-                                        // default = '.'
     [ -batch n ]
     [ -priority n ]
 
@@ -178,9 +183,7 @@ create_work
     infile_1 ... infile_m           // input files
 
The workunit parameters are documented here. -If the -config_dir option is not used, -the program must be run in the project root directory; -it looks for config.xml there, and uses its contents. +The program must be run in the project root directory.

The C++ library (crypt.C, backend_lib.C,h) provides the functions: diff --git a/lib/mfile.C b/lib/mfile.C index 7542bf490f..a73062c6df 100644 --- a/lib/mfile.C +++ b/lib/mfile.C @@ -61,13 +61,14 @@ int MFILE::vprintf(const char* format, va_list ap) { k = vsprintf(buf2, format, ap); n = (int)strlen(buf2); - buf = (char*)realloc(buf, len+n); + buf = (char*)realloc(buf, len+n+1); if (!buf) { errno = ERR_MALLOC; return -1; } strncpy(buf+len, buf2, n); len += n; + buf[len] = 0; return k; } @@ -82,36 +83,39 @@ int MFILE::printf(const char* format, ...) { } size_t MFILE::write(const void *ptr, size_t size, size_t nitems) { - buf = (char *)realloc( buf, len+(size*nitems) ); + buf = (char *)realloc( buf, len+(size*nitems)+1 ); if (!buf) { errno = ERR_MALLOC; return 0; } memcpy( buf+len, ptr, size*nitems ); len += (int)size*(int)nitems; + buf[len] = 0; return nitems; } int MFILE::_putchar(char c) { - buf = (char*)realloc(buf, len+1); + buf = (char*)realloc(buf, len+1+1); if (!buf) { errno = ERR_MALLOC; return EOF; } buf[len] = c; len++; + buf[len] = 0; return c; } int MFILE::puts(const char* p) { int n = (int)strlen(p); - buf = (char*)realloc(buf, len+n); + buf = (char*)realloc(buf, len+n+1); if (!buf) { errno = ERR_MALLOC; return EOF; } strncpy(buf+len, p, n); len += n; + buf[len] = 0; return n; } diff --git a/lib/mfile.h b/lib/mfile.h index 9febf8f916..517a260c98 100644 --- a/lib/mfile.h +++ b/lib/mfile.h @@ -23,14 +23,17 @@ #include #include -// MFILE supports a primitive form of checkpointing. -// Write all your output (and restart file) to MFILEs. -// The output is buffered in memory. -// Then close or flush all the MFILEs; -// all the buffers will be flushed to disk, almost atomically. +// MFILE provides memory-buffered output with a FILE-type interface. +// BOINC uses this in a couple of places: +// 1) in the GUI RPC system (since in Windows you can't fdopen a socket) +// 2) in the API, to support a primitive form of checkpointing: +// Write all your output (and restart file) to MFILEs. +// The output is buffered in memory. +// Then close or flush all the MFILEs; +// all the buffers will be flushed to disk, almost atomically. class MFILE { - char* buf; + char* buf; // NULL-terminated int len; FILE* f; public: