Changes between Version 18 and Version 19 of RemoteJobs
- Timestamp:
- Jul 26, 2011, 9:23:19 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RemoteJobs
v18 v19 1 1 [[PageOutline]] 2 = API sfor remote job submission =3 4 This document describes APIsfor remotely submitting jobs to a BOINC server.2 = API for remote job submission = 3 4 This document describes an API for remotely submitting jobs to a BOINC server. 5 5 The APIs support the submission of large '''batches''' of jobs, 6 6 such as parameter sweeps. 7 The API scan be used, for example, to create web interfaces for job submission,7 The API can be used, for example, to create web interfaces for job submission, 8 8 such as might be found in a science portal web site: 9 9 … … 14 14 * All jobs in a batch must use the same application. 15 15 * There can be no dependencies between jobs. 16 17 These restrictions may be removed in the future.18 16 19 17 BOINC provides a PHP library that implements the API. … … 30 28 == PHP interface == 31 29 32 The following functions are provided in the file30 The following functions are provided in the PHP file 33 31 [/trac/browser/trunk/boinc/html/inc/submit.inc submit.inc], 34 32 which is independent of other BOINC code and can be used in the Portal web code. … … 36 34 === boinc_estimate_batch() === 37 35 38 This function returns an estimate of the elapsed time 39 required to complete a given batch. 36 Returns an estimate of the elapsed time required to complete a batch. 40 37 41 38 Arguments: a "request object" whose fields include … … 46 43 47 44 Return value: a 2-element array containing 48 * The e stimate, in seconds45 * The elapsed time estimate, in seconds 49 46 * An error message (null if success) 50 47 … … 61 58 62 59 for ($i=10; $i<20; $i++) { 63 64 65 60 $job->rsc_fpops_est = $i*1e9; 61 $job->command_line = "--t $i"; 62 $req->jobs[] = $job; 66 63 } 67 64 68 65 list($e, $errmsg) = boinc_estimate_batch($req); 69 66 if ($errmsg) { 70 67 echo "Error: $errmsg\n"; 71 68 } else { 72 69 echo "The batch will take about $e seconds to complete\n"; 73 70 } 74 71 }}}