Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong when not configure a partition #15

Open
wangzhen2271 opened this issue Feb 21, 2023 · 19 comments · May be fixed by #16
Open

Wrong when not configure a partition #15

wangzhen2271 opened this issue Feb 21, 2023 · 19 comments · May be fixed by #16

Comments

@wangzhen2271
Copy link

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

image

image

@wangzhen2271
Copy link
Author

image

@vsoch
Copy link
Member

vsoch commented Feb 21, 2023

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

@wangzhen2271
Copy link
Author

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
Copy link
Member

vsoch commented Feb 22, 2023

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
Copy link
Author

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
Copy link
Member

vsoch commented Feb 22, 2023

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

@wangzhen2271
Copy link
Author

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
Copy link
Member

vsoch commented Feb 22, 2023

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
Copy link
Author

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 "'
+ partition + '" will be used.';
} else {
var partition = self.partition_name;
}

@vsoch
Copy link
Member

vsoch commented Feb 22, 2023

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
Copy link
Author

wangzhen2271 commented Feb 22, 2023

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
Copy link
Author

I think slurm2json.py generate wrong machines.json

@vsoch
Copy link
Member

vsoch commented Feb 22, 2023

I think so too!

@vsoch vsoch linked a pull request Feb 23, 2023 that will close this issue
@vsoch
Copy link
Member

vsoch commented Feb 23, 2023

okay please see #16

@wangzhen2271
Copy link
Author

ok,thank you!

@wangzhen2271
Copy link
Author

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

@vsoch
Copy link
Member

vsoch commented Feb 23, 2023

You would need to:

  • generate the file for machines.json using the script I edited - note you'll have to use --force if it already exists, or just name something else
  • rename the machines.json under data to something else
  • move your newly generated file into data/machines.json
  • python -m http.server 9999 to open a local server to localhost:9999

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
Copy link
Author

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
Copy link
Member

vsoch commented Feb 23, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants