Show More
@@ -869,19 +869,21 b' class BatchSystemLauncher(BaseLauncher):' | |||||
869 | # third (last) priority is default_template |
|
869 | # third (last) priority is default_template | |
870 | self.batch_template = self.default_template |
|
870 | self.batch_template = self.default_template | |
871 |
|
871 | |||
872 | regex = re.compile(self.job_array_regexp) |
|
872 | # add jobarray or queue lines to user-specified template | |
873 | # print regex.search(self.batch_template) |
|
873 | # note that this is *only* when user did not specify a template. | |
874 | if not regex.search(self.batch_template): |
|
874 | regex = re.compile(self.job_array_regexp) | |
875 | self.log.info("adding job array settings to batch script") |
|
875 | # print regex.search(self.batch_template) | |
876 |
|
|
876 | if not regex.search(self.batch_template): | |
877 | self.batch_template = u'\n'.join([firstline, self.job_array_template, rest]) |
|
877 | self.log.info("adding job array settings to batch script") | |
|
878 | firstline, rest = self.batch_template.split('\n',1) | |||
|
879 | self.batch_template = u'\n'.join([firstline, self.job_array_template, rest]) | |||
878 |
|
880 | |||
879 | regex = re.compile(self.queue_regexp) |
|
881 | regex = re.compile(self.queue_regexp) | |
880 | # print regex.search(self.batch_template) |
|
882 | # print regex.search(self.batch_template) | |
881 | if self.queue and not regex.search(self.batch_template): |
|
883 | if self.queue and not regex.search(self.batch_template): | |
882 | self.log.info("adding PBS queue settings to batch script") |
|
884 | self.log.info("adding PBS queue settings to batch script") | |
883 | firstline, rest = self.batch_template.split('\n',1) |
|
885 | firstline, rest = self.batch_template.split('\n',1) | |
884 | self.batch_template = u'\n'.join([firstline, self.queue_template, rest]) |
|
886 | self.batch_template = u'\n'.join([firstline, self.queue_template, rest]) | |
885 |
|
887 | |||
886 | script_as_string = self.formatter.format(self.batch_template, **self.context) |
|
888 | script_as_string = self.formatter.format(self.batch_template, **self.context) | |
887 | self.log.info('Writing instantiated batch script: %s' % self.batch_file) |
|
889 | self.log.info('Writing instantiated batch script: %s' % self.batch_file) |
General Comments 0
You need to be logged in to leave comments.
Login now