Skip to content

Commit

Permalink
Re #7405 Save separate-job to output file
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Jul 9, 2013
1 parent ec591ee commit da14997
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def to_xml(self):
xml += self.calculation_method.to_xml()
xml += "</Transmission>\n"
xml += "<SampleData>\n"
xml += " <separate_jobs>%s</separate_jobs>\n" % str(self.separate_jobs)
xml += " <sample_thickness>%g</sample_thickness>\n" % self.sample_thickness
for item in self.data_files:
xml += " <data_file>%s</data_file>\n" % item.strip()
Expand Down Expand Up @@ -296,6 +297,9 @@ def from_xml(self, xml_str):
self.data_files = BaseScriptElement.getStringList(sample_data_dom, "data_file")
self.sample_thickness = BaseScriptElement.getFloatElement(sample_data_dom, "sample_thickness",
default=SampleData.sample_thickness)
self.separate_jobs = BaseScriptElement.getBoolElement(sample_data_dom, "separate_jobs",
default = SampleData.separate_jobs)


def reset(self):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@ def cluster_submit(self, output_dir, user, pwd, resource=None,
else:
job_name = "%s_%s" % (lower_case_instr, job_name.strip())

# Make sure we have unique job names
if len(scripts)>1:
job_name += "_%s" % i
# Submit the job
submit_cmd = "SubmitRemoteJob(ComputeResource='%s', " % resource
submit_cmd += "TaskName='%s'," % job_name
Expand Down

0 comments on commit da14997

Please sign in to comment.