Interactive desktop native options not being updated

Hello,

I am trying to configure an interactive desktop submission script. We run PBS Pro, and we use the '-W group_list=' variable for tying accounting information to research groups. I am trying to pass the form value bc_account to this variable using native options. Here is what my submit.yml.erb file looks like:

---
script:
  native:
    - "-l"
    - "select=1:ncpus=<%= bc_num_slots.blank? ? 1 : bc_num_slots.to_i %>:mem=<%= bc_num_slots.blank? ? 2 : bc_num_slots.to_i * 2 %>GB"
    - "-W"
    - "group_list=<%= bc_account %>"

The problem is, OOD is continuing to use a prior version of submit.yml.erb, and is not passing the updated select statement (addition of mem= directive) or the group_list variable. This is evident by the contents of job_script_options.json in the staged root directory for the job:

{
  "job_name": "sys/dashboard/sys/bc_desktop/thunder",
  "workdir": "/home/ndusek/ondemand/data/sys/dashboard/batch_connect/sys/bc_desktop/thunder/output/a7580e86-0683-4e53-92a4-663945b9cf13",
  "output_path": "/home/ndusek/ondemand/data/sys/dashboard/batch_connect/sys/bc_desktop/thunder/output/a7580e86-0683-4e53-92a4-663945b9cf13/output.log",
  "shell_path": "/bin/bash",
  "accounting_id": "x-ccast-prj-ndusek",
  "wall_time": 3600,
  "native": [
    "-l",
    "select=1:ncpus=2"
  ],
  "queue_name": "sys-devel",
  "email_on_started": false
}

I have restarted my web server multiple times, but still, OOD will not use the updated submit.yml.erb. Is there something I’m missing?

Thanks,
Nick

Hey, so I think you fell into a trap similar to this below. I think the solution is to not use bc_num_slots and instead create something like pbs_cores. The problem is is that bc_num_slots is overriding what you’re adding there in native.

Hi Jeff,

Thanks for the quick reply. I can try creating a new form value for pbs_cores (and probably pbs_mem too), but that still doesn’t explain why OOD isn’t picking up the mem= portion of my select statement, or why it’s ignoring my group_list= variable. Unless you’re saying it’s short circuiting after the first evaluation of bc_num_slots in the select statement?

By way of illustration, when I select 2 cores in the web form, the ncpus reflects that selection, as I would expect it to:

"native": [
    "-l",
    "select=1:ncpus=2"
  ],

For reference, my previous version of submit.yml.erb looked like this:

---
script:
  native:
    - "-l"
    - "select=1:ncpus=<%= bc_num_slots.blank? ? 1 : bc_num_slots.to_i %>"

Which maps to the behavior I’m seeing currently.

Nick

Hi Again,

Nevermind, this was my fault. I had the path to the submit script referenced incorrectly, so it wasn’t actually using the correct script. Very sorry for the confusion.

Nick

Are you saying you didn’t hit that bug? That you can use bc_num_slots with other script.native attributes?

Yes. Here is my functioning submit.yml.erb:

---
script:
  native:
    - "-l"
    - "select=1:ncpus=<%= bc_num_slots.blank? ? 1 : bc_num_slots.to_i %>:mem=<%= bc_num_slots.blank? ? 2 : bc_num_slots.to_i * 2 %>GB"
    - "-W"
    - "group_list=<%= bc_account %>"

And here is what ends up in the native section in job_script_options.json:

"native": [
    "-l",
    "select=1:ncpus=2:mem=4GB",
    "-W",
    "group_list=x-ccast-prj"
  ],

I can also confirm that the job was submitted with those arguments.

Happy to provide more information if needed.

Nick

Thanks! It was just the wrong file then? Alright, all’s well that ends well I guess.

Yes, mea culpa.

Nick

1 Like