Bc_num_hours set value in min

I’m using bc_num_hours in my form but it looks like it’s requesting time in minutes.

My submit.yml.erb

script:
native:

  • “–job-name”
  • “<%= job_name %>”
  • “-n”
  • “<%= bc_num_slots %>”
  • “–partition”
  • “<%= auto_queues %>”
  • “–time”
  • “<%= bc_num_hours %>”

It’s what I see in job_script_options.json
{
“job_name”: “sys/dashboard/dev/submit-ansys-job”,
“workdir”: “ondemand/data/sys/dashboard/batch_connect/dev/submit-ansys-job/output/1ad36bbd-26cc-4ea8-8426-5614c465964a”,
“output_path”: “/ondemand/data/sys/dashboard/batch_connect/dev/submit-ansys-job/output/1ad36bbd-26cc-4ea8-8426-5614c465964a/output.log”,
“shell_path”: “/bin/bash”,
“queue_name”: “sky”,
“qos”: “lowprio_8job”,
“native”: [
“–job-name”,
“lalala”,
“-n”,
“1”,
“–partition”,
“sky”,
“–time”,
“24”
],
“wall_time”: 86400,
“email_on_started”: true
}

And on the dashboard time requested 24 minutes instead of 24 hours.

Another thing is it possible by using - auto_queues filed let user pick a multiple partitions instead of one?

You should not be setting these in the submit line. That is, you do not need these 4 lines at all.

Fields that start with bc_ or auto_ that we distribute know how to submit themselves. They’re automatic flag generation seems to be overridden by what you’re providing.

So for example bc_num_hours knows what flags to use (i.e., --time on slurm) and knows how to translate itself to the right time unit for your scheduler.

Yes, I see! it worked. Thank you.

Is it possible with with bc_num_slots filed submit to a multiple partitions?

Maybe? We (OSC) don’t really use partitions - or at least we don’t have users specify them (we have slurm filters that will put you in the right partition based on resources requested & the project used).

What would the equivalent sbatch command look like?

For the multiple partitions it would be

–partition=sky,epyc,smp

But I need to give users option to choose a few from the list not just one.

And one more question about bc_num_slots. My understanding it suppose to be CPU. But I think it’s being ignored in my submit from. If I request 48 it should run on 2 nodes because each has 32 CPUs, but it runs only on 1.

I don’t see it in json file:
{
“job_name”: “sys/dashboard/dev/submit-ansys-job”,
“workdir”: “ondemand/data/sys/dashboard/batch_connect/dev/submit-ansys-job/output/5d7ea5b2-6940-4f17-9069-7f736a82b6d2”,
“output_path”: “ondemand/data/sys/dashboard/batch_connect/dev/submit-ansys-job/output/5d7ea5b2-6940-4f17-9069-7f736a82b6d2/output.log”,
“shell_path”: “/bin/bash”,
“queue_name”: “sky”,
“qos”: “lowprio_8job”,
“native”: [
“–job-name”,
“lalala”
],
“wall_time”: 86400,
“email_on_started”: true
}

My submit.yml.erb
script:
native:

  • “–job-name”
  • “<%= job_name %>”

You can check your /var/log/ondemand-nginx/$USER/error.log to see the exact sbatch command you issue.

For whatever reason bc_num_slots uses -N (--nodes) for Slurm. It was before my time, but since it’s called slots they tried (erroneously) to translate that slot concept to Slurm. At that time we were a torque/moab shop and it’s unclear to me why they translated it like that.

You can even see by the label that they knew that it was processors on one system and nodes on another.

I don’t see this information in error.log as well. It feels like it’s completely ignored.

App 23784 output: [2024-02-29 13:40:23 -0800 ] INFO "execve = [{"SLURM_CONF"=>
"/etc/slurm/slurm.conf"}, "/bin/sbatch", "-D", "ondemand/
data/sys/dashboard/batch_connect/dev/submit-ansys-job/output/34c2dd94-a7a9-43fe-89
e6-dac1178e254d", "–mail-type", "BEGIN", "-J", "sys/dashboard/dev/submit-
ansys-job", "-o", "ondemand/data/sys/dashboard/batch_connec
t/dev/submit-ansys-job/output/34c2dd94-a7a9-43fe-89e6-dac1178e254d/output.log",
"-p", "sky", "-t", "24:00:00", "–qos", "lowprio_8job", "–export",
“NONE", "–job-name", "lalala", "–license", "mech_1@slurmdb:1,anshpc@slur
mdb:8", "–parsable", "-M", "viking"]”

I will just use a different field something like num_core in meantime.

Do you have any experience with specifying license during your job submission from ondemand?
Should something like this work?
script:
native:

  • “–job-name”
  • “<%= job_name %>”
    <%-
    license = if solver == “Ansys”
    “mech_1@slurmdb:1,anshpc@slurmdb:8”
    else
    “meba@slurmdb:1,anshpc@slurmdb:8”
    end
    -%>
  • “–license”
  • “<%= license %>”

Yes, as a quick glance I think that’s correct. Here’s what we do for Ansys in our production app.

OK - at a less quick glance - this may need to be pluralized to licenses. I’d have to consult the sbatch documentation on the same given the link I just posted uses licenses plural.

I was able to submit both ways –license and –licenses. So all good. Thank you!