-
Notifications
You must be signed in to change notification settings - Fork 117
[bugfix] Fix handling of single character scheduler backend options passed through -J
#1718
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
Conversation
|
@jenkins-cscs retry dom |
Co-authored-by: Vasileios Karakasis <vkarak@gmail.com>
-J to get the length of the scheduler flag-J to get the length of the scheduler flag
-J to get the length of the scheduler flag-J
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rsarm I tested the PR and I verified what I pointed out in the issue passing -A=foo is wrong. It's not correct under POSIX and -correctly- Slurm rejects it:
[reframer060@reframe ~]$ srun -ptotal -A reframers hostname
reframe-1
[reframer060@reframe ~]$ srun -ptotal -A=reframers hostname
srun: error: Unable to allocate resources: Invalid account or account/partition combination specified
Should we then treat the -J A=foo option specially and pass -Afoo or -A foo?
|
@vkarak oh sorry! I was convinced that I would prefer to do not support translating non-valid options like for opt in options.job_options:
optstr, valstr = re.split(r'=|\s+', opt, maxsplit=1)
if opt.startswith('-') or opt.startswith('#'):
parsed_job_options.append(opt)
elif len(optstr) == 1:
parsed_job_options.append(f'-{optstr} {valstr}')
else:
parsed_job_options.append(f'--{optstr} {valstr}') |
|
What I'm proposing I think it's on the same line with the conversion from |
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
-J-J
closes #1693