Bc_desktop submit.yml.erb Native bug i think

We use slurm
Have the bc_desktop on all clusters and on loginnodes using linux_adapter.

For using multiple cores and nodes for deskto we use the script->native option in submit.yml.erb

‘script/native’ = list(
“-N”,
“<%= bc_num_slots.nil? ? 1 : bc_num_slots.to_i %>”,
“-c”,
“<%= num_cores %>”);

Whitch works for all worker nodes on all clusters.

But the login_adapter chokes on the content of the native block.
“no implicit conversion of string into Integer”

Removing the script/native for the login node did the trick.
But sinds linux_adapter does not technicaly submit a job it should just ignore all content of that block.
Than you would have one size fits all (we genrate all configs for all clusters zo all divergences are a pain)

Yea, looking at the code we’re expecting a hash, so you can override the image or bindpath for that job instead of using what’s defined in the cluster config.

script:
  native:
    singularity_image: '/home/jeff/myimage.sing'
    singularity_bindpath: '/tmp'

“One size fits all” sounds nice, it’s just that’s not even possible with actual schedulers, let alone things like this or kubernetes or whatever else may come.

Hi, sorry for the long delay. Looks like your best bet would be to determine the cluster type, then wrap the script.native stuff in an if/else block.

Here’s how you’d check for a torque cluster. For reference, we’re looking for the key in your cluster.d file in v2.job.adapter.

<%- 
  torque_cluster = OodAppkit.clusters[cluster].job_config[:adapter] == 'torque'
-%>
---
<%- if torque_cluster -%>
script:
  native:
    - "-N"
    - "<%= bc_num_slots.nil? ? 1 : bc_num_slots.to_i %>"
    - "-c"
     - "<%= num_cores %>"
<%- end -%>