pigx icon indicating copy to clipboard operation
pigx copied to clipboard

Add support for additional arguments to qsub

Open alexg9010 opened this issue 6 years ago • 2 comments

Hi Guys,

As an feature for advanced users I like to add the possibility to pass arguments to qsub other than the default ones.

For this we need to adjust our driver scripts at this lines (example for rnaseq):

    qsub = "qsub -V -l h_stack={cluster.h_stack}  -l h_vmem={cluster.MEM} %s -b y -pe smp {cluster.nthreads} -cwd" % contact_email_string
    if config['execution']['cluster']['args']:
        qsub += " " + config['execution']['cluster']['args']
    command += [
        "--cluster-config={}".format(cluster_config_file),
        "--cluster={}".format(qsub),
        "--latency-wait={}".format(config['execution']['cluster']['missing-file-timeout'])
    ]

The additional arguments are passed in the settings file:

execution:
  submit-to-cluster: yes
  jobs: 6
  nice: 19
  cluster:
    missing-file-timeout: 120
    memory: 8G
    stack: 128M
    queue: all
    contact-email: [email protected]
    args: '-l h_rt=0:0:10'
  rules:
    __default__:
      threads: 1

alexg9010 avatar Mar 13 '18 16:03 alexg9010

do you mean rule-specific arguments? In bsseq, for example, memory is defined for each specific rule (with a default, in case one rule doesn't specify). In cases where they want to add rule clauses to the settings file, they can add, e.g.

execution:
  ...
  rules:
    __default__:
      option: A
    rule_a:
      option: X
    rule_b:
      option: Y

There's a catch written in to ensure that a value is supplied for the __default__ case. Does this satisfy the requirement you intended, @alexg9010 ? I'm not 100% certain I've understood the question here.

Blosberg avatar Mar 13 '18 16:03 Blosberg

This feature AIUI is for adding custom flags to qsub, such as h_rt to limit the runtime in case of scheduled downtime. This is not used for rule-specific settings but is an escape hatch for all those uncommon settings that we didn't think of.

rekado avatar Mar 13 '18 17:03 rekado