Batch Connect Script Options
The script section of the submit.yml.erb file defines
the arguments you're passing to the scheduler when you submit the
script.
Warning
These options are documented here for completeness. Some may not be available to override in batch connect applications.
For example, workdir is set by the OnDemand system in batch
connect applications, and cannot be overridden.
Tip
If you're using the ood_core gem (where all these are defined and used)
you should refer to ood_core gem Ruby docs.
script:
  content: nil
  args: nil
  submit_as_hold: nil
  rerunnable: nil
  job_environment: nil
  workdir: nil
  email: nil
  email_on_started: nil
  email_on_terminated: nil
  job_name: nil
  shell_path: nil
  error_path: nil
  input_path: nil
  output_path: nil
  reservation_id: nil
  queue_name: nil
  priority: nil
  start_time: nil
  wall_time: nil
  accounting_id: nil
  native: nil
  copy_environment: nil
Note the use of ERB templates throughout these examples.
- content (String, nil)
- The content of the script being submitted. - Default
- Not set initially, but specified by OnDemand system automatically. - content: "" 
- Example
- None given because users cannot specify this in batch connect applications. 
 
- args (Array<String>, nil)
- Extra arguments to pass to the schedulers' submit command. - Default
- Empty, no extra arguments. - args: nil 
- Example
- Pass arguments - --fooand- --barinto the submit command.- args: - "--foo" - "--bar" 
 
- submit_as_hold (Boolean, nil)
- Hold the job after submitting. - Default
- Empty, do not hold the job. - submit_as_hold: nil 
- Example
- Always hold the job. - submit_as_hold: true 
 
- rerunnable (Boolean, nil)
- Indicate whether the job is re-runnable. - Default
- Empty, it is not re-runnable. - rerunnable: nil 
- Example
- The job is re-runnable. - rerunnable: true 
 
- job_environment (Hash<String, String>, nil)
- Extra environment variables to pass into the schedulers' submit command. - Default
- Empty, no extra environment variables. - job_environment: nil 
- Example
- Set the - SINGULARTITY_BIND_PATHenvironment variable to- /etc,/tmp,/homeand- MY_APP_IMAGEto- /opt/app.img.- job_environment: SINGULARTITY_BIND_PATH: "/etc,/tmp/home" MY_APP_IMG: "/opt/app.img" 
 
- workdir (String, nil)
- The working directory of the job. - Default
- Not set initially, but specified by OnDemand system automatically. - workdir: nil 
- Example
- None given because users cannot specify this in batch connect applications. 
 
- email (Array<String>, nil)
- Addresses to send emails to when the job starts or stops. - Default
- Empty, uses the schedulers' default. - email: nil 
- Example
- Use a specific email address. - email: - "<%= ENV['USER'] %>@the-real-domain-I-want.edu" 
 
- email_on_started (Boolean, nil)
- Have the scheduler send an email when the job has started. - Default
- Not set, uses the schedulers' default. - email_on_started: nil 
- Example
- None given because users should use :ref:`bc_email_on_started` instead of supplying it here. 
 
- email_on_terminated (Boolean, nil)
- Have the scheduler send an email when the job has finished. - Default
- Not set, uses the schedulers' default. - email_on_terminated: nil 
- Example
- Given the form checkbox option - email_on_terminated, set this attribute.- email_on_terminated: "<%= email_on_terminated %>" 
 
- job_name (String, nil)
- The name of the job. - Default
- Not set initially, but specified by OnDemand system automatically. - job_name: nil 
- Example
- None given because users cannot specify this in batch connect applications. 
 
- shell_path (String, nil)
- The login shell path of the script. - Default
- Not set initially, but specified by OnDemand system automatically. - shell_path: nil 
- Example
- None given because users cannot specify this in batch connect applications. 
 
- error_path (String, nil)
- The path for the standard error of the job. - Default
- Not set initially, but specified by OnDemand system automatically. - error_path: nil 
- Example
- None given because users cannot specify this in batch connect applications. 
 
- input_path (String, nil)
- Use this file for standard input for the job's script. Batch connect applications do not expect to read anything from standard in. - Default
- Not set. - input_path: nil 
- Example
- None given because this is likely to break batch connect applications. 
 
- output_path (String, nil)
- The path for the standard output of the job. - Default
- Not set initially, but specified by OnDemand system automatically. - output_path: nil 
- Example
- None given because users cannot specify this in batch connect applications. 
 
- reservation_id (String, nil)
- The reservation id the job will submit to. - Default
- Not specified. - reservation_id: nil 
- Example
- Submit jobs to the - next.may.2020reservation.- reservation_id: "next.may.2020" 
 
- queue_name (String, nil)
- The queue the job will submit to. - Tip - Users can use bc_queue for a text field and auto_queues for a select widget. Both of these form fields know how to submit to schedulers, removing the need to use this field in this file. - Default
- Not specified. - queue_name: nil 
- Example
- Submit jobs to the - debugqueue.- queue_name: "debug" 
 
- priority (String, nil)
- The priority the job has. - Default
- Not specified. - priority: nil 
- Example
- Submit jobs with - TOPpriority.- priority: "TOP" 
 
- start_time (String, nil)
- The start time of the job. - Default
- Not set, which schedulers generally interpret as now or as soon as possible. - start_time: nil 
- Example
- Start at midnight. - start_time: "00:00:00" 
 
- wall_time (Integer, nil)
- The wall time of the job in seconds. - Tip - Users can use bc_num_hours for a number field that knows how to submit to schedulers, removing the need to use this field in this file. - Default
- Not specified. - wall_time: nil 
- Example
- Always limit this job to one hour. - wall_time: 3600 
 
- accounting_id (String, nil)
- The accounting id the job should be charged to. - Tip - Users can use bc_account for a text field and auto_accounts or auto_accounts for a select widget. - All of these form fields know how to submit to schedulers, removing the need to use this field in this file. - Default
- Not specified, uses the schedulers' default. - priority: nil 
- Example
- All jobs to use the - rstudio-class-accountaccounting id.- accounting_id: 'rstudio-class-account' 
 
- native (Object, nil)
- Native arguments to pass to the schedulers' submit command. - Warning - All schedulers use Array<String> for native attributes except for Torque. Torque schedulers use Hash<String, String>. - Default
- not specified - native: nil 
- Example
- Submit the job with SLURM requests for one node, - num_cores(a form variable) cores and- memory(another form variable) amount of memory.- native: - "-N" - "1" - "-n" - "<%= num_cores %>" - "--mem" - "<%= memory %>" 
 
- copy_environment (Boolean, nil)
- Have the scheduler to copy the environment. SLURM uses - --export=ALL(OnDemand's default is NONE). PBS/Torque and LSF set the- -Vflag.- Default
- not specified - native: nil 
- Example
- Copy the environment - copy_environment: true