diff --git a/html/user/submit.php b/html/user/submit.php
index ae9018cfeb..db195648c6 100644
--- a/html/user/submit.php
+++ b/html/user/submit.php
@@ -407,7 +407,7 @@ function handle_query_batch($user) {
page_head("Batch $batch_id");
start_table();
row2("name", $batch->name);
- row2("application", $app->name);
+ row2("application", $app?$app->name:'---');
row2("state", batch_state_string($batch->state));
//row2("# jobs", $batch->njobs);
//row2("# error jobs", $batch->nerror_jobs);
diff --git a/sched/script_assimilator.cpp b/sched/script_assimilator.cpp
index 6e42184806..25b2a71095 100644
--- a/sched/script_assimilator.cpp
+++ b/sched/script_assimilator.cpp
@@ -53,6 +53,8 @@
#include "validator.h"
#include "sched_config.h"
+#include "assimilate_handler.h"
+
using std::vector;
using std::string;
@@ -118,10 +120,11 @@ int assimilate_handler(
}
}
} else {
- sprintf(cmd, "../bin/%s --error %d %lu",
- script[0].c_str(), wu.error_mask, wu.id
+ sprintf(cmd, "../bin/%s --error %d %s %lu %d",
+ script[0].c_str(), wu.error_mask, wu.name, wu.id, wu.batch
);
}
+ log_messages.printf(MSG_DEBUG, "invoking script: %s\n", cmd);
retval = system(cmd);
if (retval) return retval;
return 0;
diff --git a/tools/demo_submit_batch b/tools/demo_submit_batch
old mode 100644
new mode 100755
index adc0f0a4b0..fde4f27a0b
--- a/tools/demo_submit_batch
+++ b/tools/demo_submit_batch
@@ -65,7 +65,7 @@ def main(argv):
# mark the batch as in progress
- cmd = ['bin/create_work', '--enable', str(batch_id)]
+ cmd = ['bin/create_batch', '--enable', str(batch_id)]
ret = subprocess.run(cmd, capture_output=True)
if ret.returncode:
raise Exception('enable batch failed (%d): %s'%(ret.returncode, ret.stdout))
diff --git a/tools/sample_assimilate.py b/tools/sample_assimilate.py
index f0a01fe118..9e8c420f11 100755
--- a/tools/sample_assimilate.py
+++ b/tools/sample_assimilate.py
@@ -16,15 +16,22 @@ import sys, os
if sys.argv[1] == '--error':
error_code = sys.argv[2]
wu_name = sys.argv[3]
- batch_id = sys.argv[4]
- outdir = 'sample_results/%s'%(batch_id)
- os.system('mkdir -p %s'%(outdir))
- with f as open('%s/errors'%(outdir), 'a'):
+ wu_id = sys.argv[3]
+ batch_id = sys.argv[5]
+ outdir = '../sample_results/%s'%(batch_id)
+ cmd = 'mkdir -p %s'%(outdir)
+ if os.system(cmd):
+ raise Exception('%s failed'%(cmd))
+ with open('%s/errors'%(outdir), 'a') as f:
f.write('%s %s\n'%(wu_name, error_code))
else:
batch_id = sys.argv[1]
outfile_path = sys.argv[2]
fname = os.path.basename(outfile_path)
- outdir = 'sample_results/%s'%(batch_id)
- os.system('mkdir -p %s'%(outdir))
- os.system('mv %s %s/%s'%(outfile_path, outdir, fname))
+ outdir = '../sample_results/%s'%(batch_id)
+ cmd = 'mkdir -p %s'%(outdir)
+ if os.system(cmd):
+ raise Exception('%s failed'%(cmd))
+ cmd = 'mv %s %s/%s'%(outfile_path, outdir, fname)
+ if os.system(cmd):
+ raise Exception('%s failed'%(cmd))