Changes between Version 6 and Version 7 of AppIntro
- Timestamp:
- Jan 1, 2010, 1:19:45 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AppIntro
v6 v7 14 14 input files, output files - are stored in the project directory. 15 15 16 Each job runs in a separate'''slot directory''',16 Each job runs in its own '''slot directory''', 17 17 which 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; 19 however, since Windows NTFS doesn't support 19 20 symbolic links, BOINC implements them as XML files). 20 21 The names of the link files are called '''logical names''', … … 24 25 25 26 The BOINC client expects each application to create a specially-named "finish file" 26 when it is done; this lets it reliably detect whenthe application has finished27 when it is done; this lets the client reliably detect that the application has finished 27 28 (rather than, e.g., being killed). 28 29 … … 34 35 * The application tells the client its current CPU time, and when it has checkpointed. 35 36 36 This communication is implemented using a shared-memory structure.37 This communication is implemented using shared memory. 37 38 There is a separate shared-memory structure for each running application. 38 39 39 40 [[Image(client_msgs.png)]] 40 41 41 === The BOINC runtime library === 42 If you run an existing, unmodified program under BOINC 43 there will be several problems: 42 44 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. 54 52 55 53 === The BOINC wrapper === 56 54 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. 55 The simplest way to run an existing application under BOINC 56 is to use the [WrapperApp BOINC wrapper]. 57 This lets you run any executable (or sequence of executables) 58 with no modification. 63 59 64 === Language alternatives === 60 === Native BOINC applications === 61 62 With some minor source code modifications, you can run 63 an application directly without need for the wrapper. 64 The 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. 65 69 66 70 The BOINC runtime library is implemented in C++