researchapps / job-maker

a static web application for generating job submissions scripts for a SLURM cluster
https://researchapps.github.io/job-maker/
MIT License
20 stars 6 forks source link

Wrong when not configure a partition #15

Open wangzhen2271 opened 1 year ago

wangzhen2271 commented 1 year ago

if I not config a partition, the progarm run wrong!

image

image

wangzhen2271 commented 1 year ago

image

vsoch commented 1 year ago

Does your cluster not have any? Not even a default or normal one?

wangzhen2271 commented 1 year ago

yes,I just use the default config. It has one partition named debug. Notice the slurm.conf which generate by the configure tool has that partition

image

image

vsoch commented 1 year ago

I'm not clear how you are generating a file that doesn't have debug but your config does? Can you give me the exact commands to reproduce what you are doing? We need to figure out what is going wrong so the partitions show up. The partition information is how every node is defined in terms of its resources (memory, etc.) so if a cluster doesn't have partitions technically all the nodes would be under a faux partition called "normal."

Also feel free to find the bug on your own and submit a PR to fix.

wangzhen2271 commented 1 year ago

Using the slurm config tool. https://slurm.schedmd.com/configurator.html And this value is its default value. I have not modified it. And then it will generate a slurm.config. I use that file.

vsoch commented 1 year ago

ah gotcha. So maybe just try adding partitions, and test with the tool when you have a complete config filled out?

wangzhen2271 commented 1 year ago

I think it better can work for that case. Because the slurm work well with that slurm.conf. I think some body no need to configure a partition.

vsoch commented 1 year ago

okay, then would you like to take a shot at debugging the issue? Look at script.js - I can tell you what is happening. It assumes partitions are there and defaults to using index 0. So you would want to figure out how else you'd want to accomplish this.

wangzhen2271 commented 1 year ago

ok. I am not web programer, I am not familar with js. I know which the error happens, it at line 142 in script.js

but I don't know how to fix it.

if (self.partition_name == null) { var partition = choice.defaults.partitions[0] nav.warning = 'You did not specify a partition, so the default "'

vsoch commented 1 year ago

okay so we can talk through this then - given that there are no partitions, what should be the default behavior to look up machines? Currently the machine attributes are known through the partitions, so I suspect we'd need to get that somewhere else?

wangzhen2271 commented 1 year ago

how can I configure the slurm.conf to let the web run correctly? In fact there is a partition named "debug" and node is "All" nodes. Need I add another partition? image

wangzhen2271 commented 1 year ago

I think slurm2json.py generate wrong machines.json

vsoch commented 1 year ago

I think so too!

vsoch commented 1 year ago

okay please see https://github.com/researchapps/job-maker/pull/16

wangzhen2271 commented 1 year ago

ok,thank you!

wangzhen2271 commented 1 year ago

Is it have been fixed? It still running wrong using brach origin/allow/empty-paritions. image

vsoch commented 1 year ago

You would need to:

You should not hit this error you are showing me because there should be a partition there. I've added the machines.json that I generated to the PR so you can check against the one you make.

wangzhen2271 commented 1 year ago

OK. Yes, it can run. It can generate script correctly, but it still report a error as follow, I don't know if it is some problem. And another thing perplexed me is, the partition actualy named "debug", why it changed to "normal"? image image

vsoch commented 1 year ago

We need to parse this line: https://github.com/researchapps/job-maker/pull/16/files#diff-f795e9bdafd6d171ce2ad965cc735764621d0760d8605889156cadd885b87e0dR147 (last one in the files for the PR that says PartitionName)