mllg / batchtools

Tools for computation on batch systems
https://mllg.github.io/batchtools/
GNU Lesser General Public License v3.0
172 stars 51 forks source link

Question: How are template files interpretted? #291

Open lpiep opened 1 year ago

lpiep commented 1 year ago

I've looked around in the docs and haven't been able to figure out how this works.

I'm working with the SGE template which appears to have three "levels" of code/text to be parsed by brew:

## text like this: comments
#$ -text like this: arguments to qsub
bare text like this: shell commands

When and where do the #$ lines get passed on to qsub (if that is indeed what happens)? Thanks for any help wrapping my mind around this!

HenrikBengtsson commented 1 year ago

batchtools reads your template as plain text, runs it through brew to generate the final job script, which is then sent to the scheduler. Nowhere along the way does batchtools parse the template - from its point of view it's just plain text that can contain anything. Parsing and interpretation of the final script is done by the scheduler.