Changes between Version 6 and Version 7 of AppIntro


Ignore:
Timestamp:
Jan 1, 2010, 1:19:45 PM (15 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AppIntro

    v6 v7  
    1414input files, output files - are stored in the project directory.
    1515
    16 Each job runs in a separate '''slot directory''',
     16Each job runs in its own '''slot directory''',
    1717which contains '''links''' to all the files needed by that job
    18 (these are like UNIX symbolic links; since Windows NTFS doesn't support
     18(these are like UNIX symbolic links;
     19however, since Windows NTFS doesn't support
    1920symbolic links, BOINC implements them as XML files).
    2021The names of the link files are called '''logical names''',
     
    2425
    2526The BOINC client expects each application to create a specially-named "finish file"
    26 when it is done; this lets it reliably detect when the application has finished
     27when it is done; this lets the client reliably detect that the application has finished
    2728(rather than, e.g., being killed).
    2829
     
    3435 * The application tells the client its current CPU time, and when it has checkpointed.
    3536
    36 This communication is implemented using a shared-memory structure.
     37This communication is implemented using shared memory.
    3738There is a separate shared-memory structure for each running application.
    3839
    3940[[Image(client_msgs.png)]]
    4041
    41 === The BOINC runtime library ===
     42If you run an existing, unmodified program under BOINC
     43there will be several problems:
    4244
    43 Suppose you tried to run an existing, unmodified program under BOINC.
    44 There would be two problems:
    45 
    46  * When the program opens and reads its input files, it would get the contents of the XML link files - not what it expects. Similarly, the output would be written to the wrong directory.
    47  * When the program finishes, it wouldn't create a finish file, so the BOINC client would restart it repeatedly.
    48  * The BOINC client wouldn't know the application's CPU time; it would display zero, and volunteers would be confused. In addition, with the default configuration, users wouldn't get any credits if the CPU time is zero.
    49 
    50 The easiest way to solve these problems is to modify your program as follows:
    51  * Add calls to BOINC initialization and finalization routines.
    52  * Precede with fopen() call with a BOINC function that maps logical to physical names.
    53  * Link it with the BOINC runtime library.
     45 * When the program opens and reads its input files,
     46 it will get the contents of the XML link files - not what it expects.
     47 * The application won't suspend, resume and quit properly.
     48 * When the program finishes, it won't create a finish file,
     49 so the BOINC client would restart it repeatedly.
     50 * The BOINC client won't know the application's CPU time;
     51 it would display zero, and volunteers would be confused.
    5452
    5553=== The BOINC wrapper ===
    5654
    57 Suppose you have a program that is difficult or impossible to modify
    58 to use the BOINC runtime library (e.g., source code is not available).
    59 You can run it under BOINC, using the '''BOINC wrapper'''.
    60 The wrapper acts as a main program,
    61 managing communication with the BOINC client,
    62 and running your program as a subprocess.
     55The simplest way to run an existing application under BOINC
     56is to use the [WrapperApp BOINC wrapper].
     57This lets you run any executable (or sequence of executables)
     58with no modification.
    6359
    64 === Language alternatives ===
     60=== Native BOINC applications ===
     61
     62With some minor source code modifications, you can run
     63an application directly without need for the wrapper.
     64The changes are:
     65
     66 * Add calls to BOINC initialization and finalization routines.
     67 * Precede each fopen() call with a BOINC function that maps logical to physical names.
     68 * Link it with the BOINC runtime library.
    6569
    6670The BOINC runtime library is implemented in C++