mllg / batchtools

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

how to specify queue on SGE? #185

Closed tikacp closed 6 years ago

tikacp commented 6 years ago

hi,

i just cannot figure out how to specify which queue to use on a SGE. i also cannot find any mentioning of this in the documentation. can somebody please help me out here? if i don't specify a queue i run into:

Error in submitJobs(resources = list(walltime = 3600, memory = 1024)) : 
  Fatal error occurred: 101. Command 'qsub' produced exit code 2. Output: 'Unable to read script file because of error: ERROR! -q option must have queue list argument'

cheers tim

mllg commented 6 years ago

You have two options:

  1. You specify the queue as a resource:

    submitJobs(resources = list(queue = "<queue-name>", walltime = 300, memory = 500)

    Your template file must then include a line like this: https://github.com/mllg/batchtools/blob/master/inst/templates/sge-simple.tmpl#L20

  2. You use the other resources like walltime or memory to determine the queue which fits best. May not be possible on your system. Here is an example for a cluster in Dortmund: https://github.com/mllg/batchtools/blob/master/inst/templates/slurm-lido3.tmpl#L19. This example is for Slurm, but I hope you get the idea.

tikacp commented 6 years ago

that does the trick! i just didn't get the connection between the submitJobs resources arg and the template file -q flag. (btw, i now hardcoded the queue in my template file since this is more convenient in our setup.)

thanks for the quick reply!