Skip to content

Commit

Permalink
Remote job submission: in PHP binding, allow specification of job names
Browse files Browse the repository at this point in the history
The name defaults to appname_PID_unixtime.
nanoHUB wanted to specify their own name to simplify associating
output files with HUB jobs.
  • Loading branch information
davidpanderson committed Sep 19, 2017
1 parent 921dcd1 commit c6d3ae5
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions html/inc/submit.inc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ function req_to_xml($req, $op) {
foreach ($req->jobs as $job) {
$x .= " <job>
";
if (!empty($job->name)) {
$x .= " <name>$job->name</name>
";
}
if (!empty($job->rsc_fpops_est)) {
$x .= " <rsc_fpops_est>$job->rsc_fpops_est</rsc_fpops_est>
";
Expand Down Expand Up @@ -340,24 +344,23 @@ if (0) {
$req->project = "http://isaac.ssl.berkeley.edu/test/";
$req->authenticator = trim(file_get_contents("test_auth"));
$req->app_name = "uppercase";
$req->batch_name = "batch_name9";
$req->batch_name = "batch_name_11";
$req->app_version_num = 710;
$req->jobs = array();

$job = new StdClass;
$job->input_files = array();

$f = new StdClass;
$f->mode = "remote";
$f->url = "http://isaac.ssl.berkeley.edu/validate_logic.txt";
$f->md5 = "eec5a142cea5202c9ab2e4575a8aaaa7";
$f->nbytes = 4250;
$job->input_files[] = $f;

if (0) {
$f = new StdClass;
$f->mode = "local";
$f->source = "foobar";
//$job->input_files[] = $f;
}

$it = "
<input_template>
Expand Down Expand Up @@ -396,6 +399,10 @@ if (0) {
</output_template>
";
for ($i=0; $i<2; $i++) {
$job = new StdClass;
$job->input_files = array();
$job->input_files[] = $f;
$job->name = $req->batch_name."_$i";
//$job->rsc_fpops_est = $i*1e9;
$job->command_line = "--t $i";
$job->wu_template = $it;
Expand Down

0 comments on commit c6d3ae5

Please sign in to comment.