From 50e2c6cff24cdec489ebb561101b95768e9a707e Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 24 Dec 2003 00:50:51 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2823 --- api/boinc_api.C | 5 +- api/graphics_api.C | 2 +- api/gutil.C | 8 +- api/mfile.C | 3 +- checkin_notes | 27 +++++ client/app.C | 6 +- client/client_types.C | 2 +- client/cs_benchmark.C | 2 +- client/cs_scheduler.C | 4 +- client/cs_statefile.C | 2 +- client/http.C | 2 +- doc/client.php | 74 ++++++++++++- doc/contact.php | 2 + doc/db_dump.php | 238 ++++++++++++++++++++++-------------------- doc/iconsmall.ico | Bin 0 -> 1406 bytes doc/index.html | 8 +- doc/participate.php | 1 + doc/platform.php | 4 +- doc/projects.php | 36 +++++++ doc/result.php | 3 - doc/validate.php | 32 ++++++ doc/work.php | 29 ++++- lib/Makefile.am | 2 +- lib/filesys.C | 20 ++++ lib/filesys.h | 1 + 25 files changed, 368 insertions(+), 145 deletions(-) create mode 100755 doc/iconsmall.ico create mode 100644 doc/projects.php create mode 100644 doc/validate.php diff --git a/api/boinc_api.C b/api/boinc_api.C index f7cd9ad8ee..f834edc557 100644 --- a/api/boinc_api.C +++ b/api/boinc_api.C @@ -46,6 +46,7 @@ #include "parse.h" #include "shmem.h" #include "util.h" +#include "filesys.h" #include "error_numbers.h" #include "app_ipc.h" @@ -89,7 +90,7 @@ int boinc_parse_init_data_file() { // If in standalone mode, use init files if they're there, // but don't demand that they exist // - f = fopen(INIT_DATA_FILE, "r"); + f = boinc_fopen(INIT_DATA_FILE, "r"); if (!f) { if (standalone) { safe_strncpy(aid.app_preferences, "", sizeof(aid.app_preferences)); @@ -456,7 +457,7 @@ int boinc_init(bool standalone_ /* = false */) { // initial_wu_cpu_time = aid.wu_cpu_time; - f = fopen(FD_INIT_FILE, "r"); + f = boinc_fopen(FD_INIT_FILE, "r"); if (f) { parse_fd_init_file(f); fclose(f); diff --git a/api/graphics_api.C b/api/graphics_api.C index 90d866712f..a57162a296 100755 --- a/api/graphics_api.C +++ b/api/graphics_api.C @@ -59,7 +59,7 @@ int boinc_init_graphics() { FILE* f; int retval; - f = fopen(GRAPHICS_DATA_FILE, "r"); + f = boinc_fopen(GRAPHICS_DATA_FILE, "r"); if (!f) { fprintf(stderr, "boinc_init(): can't open graphics data file\n"); fprintf(stderr, "Using default graphics settings.\n"); diff --git a/api/gutil.C b/api/gutil.C index cc3d95a604..942bce86ec 100755 --- a/api/gutil.C +++ b/api/gutil.C @@ -1065,7 +1065,7 @@ int read_ppm_file(char* name, int& w, int& h, unsigned char** arrayp) { unsigned char* array; int i; - f = fopen(name, "rb"); + f = boinc_fopen(name, "rb"); if (!f) return -1; do {fgets(buf, 256, f);} while (buf[0] == '#'); if (buf[0] != 'P') { @@ -1182,7 +1182,7 @@ tImageJPG *LoadJPG(const char *filename) { tImageJPG *pImageData = NULL; FILE *pFile; - if((pFile = fopen(filename, "rb")) == NULL) { + if((pFile = boinc_fopen(filename, "rb")) == NULL) { fprintf(stderr,"Unable to load JPG File!"); return NULL; } @@ -1206,7 +1206,7 @@ tImageJPG *LoadJPG(const char *filename) { } void printdata(char* filename, int x, int y, unsigned char* data) { - FILE* bmpfile = fopen(filename,"w"); + FILE* bmpfile = boinc_fopen(filename,"w"); fprintf(bmpfile,"%i,%i\n",x,y); for(int i=0;i #endif +#include "filesys.h" #include "boinc_api.h" int MFILE::open(const char* path, const char* mode) { buf = 0; len = 0; - f = fopen(path, mode); + f = boinc_fopen(path, mode); if (!f) return -1; return 0; } diff --git a/checkin_notes b/checkin_notes index 6e5385afdc..db39a1fc8a 100755 --- a/checkin_notes +++ b/checkin_notes @@ -8664,3 +8664,30 @@ David 23 Dec 2003 client/ app.C client_state.C + +David 23 Dec 2003 + - added boinc_fopen() function. + This should be used in lieu of fopen(), in both core client and apps, + whenever opening a file for writing. + This is because on Windows a utility program like FileFind + might have the file open at that exact moment, + and your fopen() will fail. + boinc_fopen() deals with this by sleeping for 3 seconds and trying again. + NOTE: in SETI@home there's a much fancier function + that does exponential backoff up to one hour. + Can't do that here, in part because the GUI requires + the core client to be nonblocking. + api/ + boinc_api.C + graphics_api.C + gutil.C + mfile.C + client/ + app.C + client_types.C + cs_benchmark.C + cs_scheduler.C + cs_statefile.C + http.C + doc/ + (various) diff --git a/client/app.C b/client/app.C index 1319004c3c..ae014b6dc5 100644 --- a/client/app.C +++ b/client/app.C @@ -179,7 +179,7 @@ int ACTIVE_TASK::write_app_init_file(APP_INIT_DATA& aid) { aid.wu_cpu_time = starting_cpu_time; sprintf(init_data_path, "%s%s%s", slot_dir, PATH_SEPARATOR, INIT_DATA_FILE); - f = fopen(init_data_path, "w"); + f = boinc_fopen(init_data_path, "w"); if (!f) { msg_printf(wup->project, MSG_ERROR, "Failed to open core-to-app prefs file %s", @@ -238,7 +238,7 @@ int ACTIVE_TASK::start(bool first_time) { if (retval) return retval; sprintf(graphics_data_path, "%s%s%s", slot_dir, PATH_SEPARATOR, GRAPHICS_DATA_FILE); - f = fopen(graphics_data_path, "w"); + f = boinc_fopen(graphics_data_path, "w"); if (!f) { msg_printf(wup->project, MSG_ERROR, "Failed to open core-to-app graphics prefs file %s", @@ -250,7 +250,7 @@ int ACTIVE_TASK::start(bool first_time) { fclose(f); sprintf(fd_init_path, "%s%s%s", slot_dir, PATH_SEPARATOR, FD_INIT_FILE); - f = fopen(fd_init_path, "w"); + f = boinc_fopen(fd_init_path, "w"); if (!f) { msg_printf(wup->project, MSG_ERROR, "Failed to open init file %s", fd_init_path); return ERR_FOPEN; diff --git a/client/client_types.C b/client/client_types.C index 46e8e2c354..c2350fec12 100644 --- a/client/client_types.C +++ b/client/client_types.C @@ -83,7 +83,7 @@ int PROJECT::write_account_file() { int retval; get_account_filename(master_url, path); - f = fopen(TEMP_FILE_NAME, "w"); + f = boinc_fopen(TEMP_FILE_NAME, "w"); if (!f) return ERR_FOPEN; #ifndef _WIN32 chmod(TEMP_FILE_NAME, 0600); diff --git a/client/cs_benchmark.C b/client/cs_benchmark.C index e3961b47a3..d798ac4c87 100644 --- a/client/cs_benchmark.C +++ b/client/cs_benchmark.C @@ -154,7 +154,7 @@ int CLIENT_STATE::cpu_benchmarks() { } host_info.p_calculated = (double)time(0); - finfo = fopen(CPU_BENCHMARKS_FILE_NAME, "w"); + finfo = boinc_fopen(CPU_BENCHMARKS_FILE_NAME, "w"); if(!finfo) return ERR_FOPEN; host_info.write_cpu_benchmarks(finfo); fclose(finfo); diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index 7475f5a0b9..9318e1f5b5 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -213,7 +213,7 @@ void CLIENT_STATE::compute_resource_debts() { // server // int CLIENT_STATE::make_scheduler_request(PROJECT* p, double work_req) { - FILE* f = fopen(SCHED_OP_REQUEST_FILE, "wb"); + FILE* f = boinc_fopen(SCHED_OP_REQUEST_FILE, "wb"); unsigned int i; RESULT* rp; int retval; @@ -447,7 +447,7 @@ int CLIENT_STATE::handle_scheduler_reply( // insert extra elements, write to disk, and parse // if (sr.global_prefs_xml) { - f = fopen(GLOBAL_PREFS_FILE_NAME, "w"); + f = boinc_fopen(GLOBAL_PREFS_FILE_NAME, "w"); if (!f) return ERR_FOPEN; fprintf(f, "\n" diff --git a/client/cs_statefile.C b/client/cs_statefile.C index 0510e6ce6f..f15897df1c 100644 --- a/client/cs_statefile.C +++ b/client/cs_statefile.C @@ -186,7 +186,7 @@ int CLIENT_STATE::parse_venue() { // int CLIENT_STATE::write_state_file() { unsigned int i, j; - FILE* f = fopen(STATE_FILE_TEMP, "w"); + FILE* f = boinc_fopen(STATE_FILE_TEMP, "w"); int retval; ScopeMessages scope_messages(log_messages, ClientMessages::DEBUG_STATE); diff --git a/client/http.C b/client/http.C index aa01af0481..77f65e6c31 100644 --- a/client/http.C +++ b/client/http.C @@ -556,7 +556,7 @@ bool HTTP_OP_SET::poll() { case HTTP_OP_GET: htp->http_op_state = HTTP_STATE_REPLY_BODY; - htp->file = fopen(htp->outfile, "ab"); + htp->file = boinc_fopen(htp->outfile, "ab"); if (!htp->file) { msg_printf(NULL, MSG_ERROR, "HTTP_OP_SET::poll(): can't open output file %s\n", diff --git a/doc/client.php b/doc/client.php index 8b69758e97..f2b019ec51 100644 --- a/doc/client.php +++ b/doc/client.php @@ -1,9 +1,18 @@ +
  • Instructions for the Windows client +
  • Instructions for the command-line client +(Mac OS/X, Linus, Unix) +
  • Additional instructions for Mac OS/X + +

    BOINC for Windows

    +Install BOINC by running the installer program. +

    The BOINC work manager program controls the use of your computer's disk, network, and processor resources. It is normally started at boot time. @@ -118,8 +127,14 @@ if any is available. Otherwise it draws the BOINC logo bouncing around the screen.


    +

    The BOINC command-line client

    +Install the BOINC client by using gunzip to decompress the executable. +Put it in a directory by itself. +Run it manually, from your login script, +or from system startup files. +

    The command line client has several options: "; list_start(); @@ -158,5 +173,62 @@ list_item("-version", "Show client version." ); list_end(); +echo" + +

    Installing BOINC on Mac OS/X

    +

    +The Mac OS X client will unpack correctly with gunzip on Mac OS X +10.2 (jaguar) or 10.3 (panther) as long as you type the command +within Terminal. Stuffit 7.x or newer will work under the Finder +in either OS X or OS 9, but I'd recommend using 'gunzip' or 'gzip -d' +within Terminal instead. + +

    +However, the two main browsers on OS X (IE 5.2.x and Safari 1.x) will +automatically unpack downloads by default, so your work may already +be done. + +

    +If you use IE, the boinc client will download and automatically unpack +leaving two files: +

      +
    1. + boinc_2.12_powerpc-apple-darwin + [this will have the stuffit icon in the finder] + +
    2. + boinc_2.12_powerpc-apple-darwin7.0.0 + [this will not have any icon in the finder] + +
    +

    + #2 is the unpacked program ready-to-run. You can just start Terminal + and run boinc. + +

    +If you use Safari, the boinc client will download and automatically +unpack, leaving a single file: +

      +
    • + boinc_2.12_powerpc-apple-darwin7.0.0 + [this will not have any icon in the finder] +
    + This is the unpacked program, but it's not yet ready-to-run (this is + a bug with how Safari handles gzipped downloads; we'll fix this soon). + +

    + Here's what you have to do to fix the Safari download (apologies if + you already know how to do this): + +

      +
    • Create a folder in your home directory and put the boinc + file in it +
    • Start Terminal +
    • 'cd' to the folder you just created +
    • Type 'chmod +x boinc_2.12_powerpc-apple-darwin7.0.0' + (without the quotes) +
    + Now you can run BOINC. + "; page_tail(); ?> diff --git a/doc/contact.php b/doc/contact.php index 54ca66bc27..2bed3a5510 100644 --- a/doc/contact.php +++ b/doc/contact.php @@ -29,6 +29,8 @@ Janus Kristensen
    Tim Lan
    +Rom Walton +
    Oliver Wang "; page_tail(); diff --git a/doc/db_dump.php b/doc/db_dump.php index 3ee6b94562..bfd1ebab53 100644 --- a/doc/db_dump.php +++ b/doc/db_dump.php @@ -34,9 +34,8 @@ and a list of the project's applications, with counts of results in various states.
    For example: -
     "
    -. htmlspecialchars("
    -
    +
    ",
    +htmlspecialchars("
         1046220857
         127
         1000
    @@ -57,8 +56,8 @@ For example:
             ...
         
     
    -") . "
    -
    +"), +"
    team_total_credit_N.xml
    Team summaries, ordered by decreasing
    total credit<. @@ -100,127 +99,136 @@ The format of the various XML elements is as follows:

    Team summary -

    -<team>
    - <id>5</id>
    - <name>Broadband Reports Team Starfire</name>
    - <total_credit>153402.872429</total_credit>
    - <expavg_credit>503030.483254</expavg_credit>
    - <nusers>14</nusers>
    -</team>
    -
    +
    ",
    +htmlspecialchars("
    +
    + 5
    + Broadband Reports Team Starfire
    + 153402.872429
    + 503030.483254
    + 14
    +
    +"),
    +"

    Team detail -

    -<team>
    - <id>5</id>
    - <name>Broadband Reports Team Starfire</name>
    - <total_credit>153402.872429</total_credit>
    - <expavg_credit>503030.483254</expavg_credit>
    - <nusers>14</nusers>
    - <create_time>0</create_time>
    -<name_html>%3Ca%20href%3D%27http%3A%2F%2Fbroadbandreports%2Ecom%2Fforum%2Fseti%2
    +
    ",
    +htmlspecialchars("
    +
    + 5
    + Broadband Reports Team Starfire
    + 153402.872429
    + 503030.483254
    + 14
    + 0
    +%3Ca%20href%3D%27http%3A%2F%2Fbroadbandreports%2Ecom%2Fforum%2Fseti%2
     7%3E%3Cimg%20src%3D%27http%3A%2F%2Fi%2Edslr%2Enet%2Fpics%2Ffaqs%2Fimage2067%2Ejp
    -g%27%3E</name_html>
    - <country>None</country>
    - <user>
    -  <id>12</id>
    -  <name>John Keck</name>
    -  <total_credit>42698.813543</total_credit>
    -  <expavg_credit>117348.653646</expavg_credit>
    -  <teamid>5</teamid>
    - </user>
    - <user>
    -  <id>14</id>
    -  <name>Liontaur</name>
    -  <total_credit>46389.595430</total_credit>
    -  <expavg_credit>122936.372641</expavg_credit>
    -  <teamid>5</teamid>
    - </user>
    -</team>
    -
    +g%27%3E + None + + 12 + John Keck + 42698.813543 + 117348.653646 + 5 + + + 14 + Liontaur + 46389.595430 + 122936.372641 + 5 + + +"),"

    User summary -

    -<user>
    - <id>12</id>
    - <name>John Keck</name>
    - <total_credit>42698.813543</total_credit>
    - <expavg_credit>117348.653646</expavg_credit>
    - <teamid>5</teamid>
    -</user>
    -
    +
    ",
    +htmlspecialchars("
    +
    + 12
    + John Keck
    + 42698.813543
    + 117348.653646
    + [ 5 ]
    + [  ]
    +
    +"), "

    User detail -

    -<user>
    - <id>3</id>
    - <name>Eric Heien</name>
    - <total_credit>4897.904591</total_credit>
    - <expavg_credit>9820.631754</expavg_credit>
    - <country>United States</country>
    -<create_time>1046220857</ncreate_time>
    - <teamid>14</teamid>
    - <host>
    -    <id>27</id>
    -    <total_credit>0.000000</total_credit>
    -    <expavg_credit>0.000000</expavg_credit>
    -    <p_vendor></p_vendor>
    -    <p_model></p_model>
    -    <os_name>Darwin</os_name>
    -    <os_version>6.2</os_version>
    - </host>
    - <host>
    -    <id>266</id>
    -    <total_credit>0.000000</total_credit>
    -    <expavg_credit>0.000000</expavg_credit>
    -    <p_vendor>GenuineIntel</p_vendor>
    -    <p_model>Intel(R)</p_model>
    -    <os_name>Linux</os_name>
    -    <os_version>2.4.18-18.7.x</os_version>
    - </host>
    -</user>
    -
    +
    ",
    +htmlspecialchars("
    +
    + 3
    + Eric Heien
    + 4897.904591
    + 9820.631754
    + United States
    + 1046220857
    + [ 14 ]
    + [  ]
    + 
    +    27
    +    0.000000
    +    0.000000
    +    
    +    
    +    Darwin
    +    6.2
    + 
    + 
    +    266
    +    0.000000
    +    0.000000
    +    GenuineIntel
    +    Intel(R)
    +    Linux
    +    2.4.18-18.7.x
    + 
    +
    +"),"

    Host summary -

    -<host>
    -  <id>266</id>
    -  <total_credit>0.000000</total_credit>
    -  <expavg_credit>0.000000</expavg_credit>
    -  <p_vendor>GenuineIntel</p_vendor>
    -  <p_model>Intel(R)</p_model>
    -  <os_name>Linux</os_name>
    -  <os_version>2.4.18-18.7.x</os_version>
    -</host>
    -
    +
    ",
    +htmlspecialchars("
    +
    +  266
    +  0.000000
    +  0.000000
    +  GenuineIntel
    +  Intel(R)
    +  Linux
    +  2.4.18-18.7.x
    +
    +"),"

    Host detail -

    -<host>
    -  <id>102</id>
    -  <userid>3</userid>
    -  <total_credit>0.000000</total_credit>
    -  <expavg_credit>0.000000</expavg_credit>
    -  <p_vendor>GenuineIntel</p_vendor>
    -  <p_model>Pentium</p_model>
    -  <os_name>Windows XP</os_name>
    -  <os_version>5.1</os_version>
    -  <create_time>1040170006</create_time>
    -  <timezone>28800</timezone>
    -  <ncpus>2</ncpus>
    -  <p_fpops>45724737.082762</p_fpops>
    -  <p_iops>43233895.373973</p_iops>
    -  <p_membw>4032258.064516</p_membw>
    -  <m_nbytes>670478336.000000</m_nbytes>
    -  <m_cache>1000000.000000</m_cache>
    -  <m_swap>1638260736.000000</m_swap>
    -  <d_total>9088008192.000000</d_total>
    -  <d_free>3788505088.000000</d_free>
    -  <n_bwup>24109.794088</n_bwup>
    -  <n_bwdown>57037.049858</n_bwdown>
    -</host>
    -
    +
    ",
    +htmlspecialchars("
    +
    +  102
    +  3
    +  0.000000
    +  0.000000
    +  GenuineIntel
    +  Pentium
    +  Windows XP
    +  5.1
    +  1040170006
    +  28800
    +  2
    +  45724737.082762
    +  43233895.373973
    +  4032258.064516
    +  670478336.000000
    +  1000000.000000
    +  1638260736.000000
    +  9088008192.000000
    +  3788505088.000000
    +  24109.794088
    +  57037.049858
    +
    +"),"
    "; page_tail(); ?> diff --git a/doc/iconsmall.ico b/doc/iconsmall.ico new file mode 100755 index 0000000000000000000000000000000000000000..d9e0fa147a3a84b11e9693f45ecb5e497b7104e9 GIT binary patch literal 1406 zcmZvcv1=4T6o+4M#UljFUXrTxwt6lcyV8(#?@0= zlpfROq(U$9d@c?D>G~r4q~D(n^jyklG?LM`kz9ZMC|Qvh@L*^#ZSE!o)EkoEO->AyDF-ZptFr()9}Urv9>>D86I`SckhM^l=og<0s( z9GXLOQM1_;MOSo1S9C>>%RIVA_XHl@qcccA59k3sAOv(HHew6O+0i@v9f=%^oR}ng zItPP;!NK5QNJua^7#s`^1_wjJgu%h!U~n)v7!o=R4h9E3!Y@YEr08&ye9kHSbFw~-nI`~qwNj(}g<+Q>l-0vsW7@L*}XSrlLiumm6ihUpc6 zC9p6sDIf$`_|eG2o&;DztVd#rZ$sP#G#Cs9gTY`h7z~E=I>8WNFc=Jm00U`g%!k2X zFc=I5Qq$03Fc=I51HkYPBr_Holaw4vtZ-P$9p|V#kq^@8bYy>jUj~DL93CFZ$;pWv zA0Nxv*_oW5pUdUtrHsd8xw*NK+uK{Y{%P|5-8=rreX1M(192c;=AE0%}DVXxO~6;tB*m~m-uZ*Qfzdx9v$<1UPII>qKJ`t?lY f;vwI<2YmkS(fCHj_V4jmA93%3dDqPU{Yc~wvR=@! literal 0 HcmV?d00001 diff --git a/doc/index.html b/doc/index.html index 96c4999c78..02b3bee01a 100644 --- a/doc/index.html +++ b/doc/index.html @@ -22,7 +22,7 @@ computer resources Overview of BOINC

    -Participating in BOINC projects +Participating
        @@ -41,15 +41,15 @@ Use BOINC to develop resource-intensive applications
        -Help debug and enhance the BOINC software. +Help debug and enhance BOINC software.

    -Non-English pages about BOINC +Web resources
        -Translations of this web page. +BOINC-related sites in other languages

    diff --git a/doc/participate.php b/doc/participate.php index 600053137a..bdec622839 100644 --- a/doc/participate.php +++ b/doc/participate.php @@ -3,6 +3,7 @@ require_once("docutil.php"); page_head("Participating in BOINC projects"); echo "
      +
    • Choosing project(s)
    • System requirements
    • Joining a project
    • Running the BOINC client diff --git a/doc/platform.php b/doc/platform.php index 1157770793..f859ad66c3 100644 --- a/doc/platform.php +++ b/doc/platform.php @@ -86,7 +86,7 @@ that recognizes when it's running on a 3DNow machine, and branches to the appropriate code.

      -

      Web-site statistics breakdown by archicture

      +

      Web-site statistics breakdown by architecture

      BOINC collects architecture details about each completed result to allow detailed statistical breakdowns. @@ -111,7 +111,7 @@ For example, the application might pass a description like <graphics_board>ATI Rage 64MB This makes it possible, for example, to report average or total -performance statistics for 3DNow hosts constrasted +performance statistics for 3DNow hosts contrasted with other Intel-compatible hosts. diff --git a/doc/projects.php b/doc/projects.php new file mode 100644 index 0000000000..470645d022 --- /dev/null +++ b/doc/projects.php @@ -0,0 +1,36 @@ + +Projects are independent, and each maintains its own servers. +The BOINC developers and the University of California +have no control over the creation of BOINC-based projects, +and in general do not endorse them. + +

      +When you participate in a BOINC-based project, +you entrust that project with the health of your +computer and the privacy of its data. +In deciding whether to participate in a BOINC-based project, +you should consider the following questions: + +

        +
      • Do you trust the project to ensure that their applications + are free of bugs that could damage your computer or cause security problems? +
      • Do you trust the project to use proper security practices on their servers? +
      • For what purposes will the project use your computer? + Does the project clearly state a limited range of purposes? +
      • Who owns the results of the computation? + If the results are valuable, will they be freely available to the public + or will they belong to a for-profit business? +
      + +"; +page_tail(); +?> diff --git a/doc/result.php b/doc/result.php index 8262ac42f9..14b3e07bd5 100644 --- a/doc/result.php +++ b/doc/result.php @@ -51,9 +51,6 @@ list_item("output file info", list_item("stderr", "The stderr output of the computation" ); -list_item("host", - "The host that was sent the result." -); list_item("received time", "The time when the result was received." ); diff --git a/doc/validate.php b/doc/validate.php new file mode 100644 index 0000000000..d52a64b26f --- /dev/null +++ b/doc/validate.php @@ -0,0 +1,32 @@ + +The XML document listing the output files has the form:
      +<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: +
        +
      • The <name> element is the result name. +
      • The <wu_name> element is the workunit name. +
      • Each <file_ref> element is an association to an +output file, described by a corresponding <file_info> element. +
      +

      +The XML document describing the sizes and checksums of the output +files is just a list of <file_info> elements, with the +nbytes and md5_cksum fields present. +The project back end +must parse this field to find the locations and checksums of output files. +"; +page_tail(); +?> diff --git a/doc/work.php b/doc/work.php index 6987ca46fd..312ab3ae86 100644 --- a/doc/work.php +++ b/doc/work.php @@ -29,7 +29,28 @@ list_item( ); list_item( "error mask", - "A bit mask of various error conditions (see below)" + "A bit mask of various error conditions: +

        +
      • WU_ERROR_COULDNT_SEND_RESULT: + The BOINC scheduler was unable to send the workunit + to a large number (~100) of hosts, + probably because its resource requirements (disk, memory, CPU) + were too large for the hosts, + or because no application version was available + for the hosts' platforms. +
      • WU_ERROR_TOO_MANY_ERROR_RESULTS: + Too many results with error conditions + (upload/download problem, client crashes) + have been returned for this work unit. +
      • WU_ERROR_TOO_MANY_SUCCESS_RESULTS: + Too many successful results have been returned + without a quorum being reached. + This indicates that the application may + be nondeterministic. +
      • WU_ERROR_TOO_MANY_TOTAL_RESULTS: + Too many total results have been sent for this workunit. +
      + " ); list_end(); @@ -43,7 +64,7 @@ list_item( "An estimate of the average number of floating-point operations required to complete the computation. This used to estimate how long the computation will - take on a give host." + take on a given host." ); list_item( "rsc_fpops_bound", @@ -82,6 +103,10 @@ list_item( a result to a client and receiving a reply. The scheduler won't issue a result if the estimated completion time exceeds this. + If the client doesn't respond within this interval, + the server 'gives up' on the result + and generates a new result, to be assigned to another client. +

      Set this to several times the average execution time of a workunit on a typical PC. If you set it too low, diff --git a/lib/Makefile.am b/lib/Makefile.am index 3e08a16bcb..97257e6abe 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -6,7 +6,7 @@ bin_PROGRAMS = crypt_prog EXTRA_PROGRAMS = md5_test shmem_test msg_test synch_test noinst_LIBRARIES = libboinc.a #libboinc_graphics.a -EXTRA_DIST = result_state.h +EXTRA_DIST = result_state.h parse.h std_fixes.h util.h libboinc_a_SOURCES = \ ../api/boinc_api.C \ diff --git a/lib/filesys.C b/lib/filesys.C index 9405c3032c..874e1909b4 100755 --- a/lib/filesys.C +++ b/lib/filesys.C @@ -18,6 +18,9 @@ // // Revision History: // $Log$ +// Revision 1.32 2003/12/24 00:50:50 davea +// *** empty log message *** +// // Revision 1.31 2003/12/01 23:28:46 korpela // Fix for systems with no statvfs.h and statfs defined in sys/statfs.h // @@ -333,6 +336,23 @@ int dir_size(const char* dirpath, double& size) { return 0; } +// on Windows: if fopen fails, and it's an open for write, +// try again in 3 seconds +// (since the file might be open by FastFind, Diskeeper etc.) +// +FILE* boinc_fopen(const char* path, const char* mode) { + FILE* f; + + f = fopen(path, mode); +#ifdef _WIN32 + if (!f && strchr(mode, 'r')) { + boinc_sleep(3.0); + f = fopen(path, mode); + } +#endif + return f; +} + int boinc_copy(const char* orig, const char* newf) { #ifdef _WIN32 if(CopyFile(orig, newf, FALSE)) diff --git a/lib/filesys.h b/lib/filesys.h index 7c23803cb0..9836246a12 100755 --- a/lib/filesys.h +++ b/lib/filesys.h @@ -44,6 +44,7 @@ extern int file_delete(const char*); extern int file_size(const char*, double&); extern int clean_out_dir(const char*); extern int dir_size(const char* dirpath, double&); +extern FILE* boinc_fopen(const char* path, const char* mode); extern int boinc_copy(const char* orig, const char* newf); extern int boinc_rename(const char* old, const char* newf); extern int boinc_mkdir(const char*);