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

changes to sge_resource_param in config file don't make it through to backend.conf #177

Closed
welchwilmerck opened this issue Jul 19, 2022 · 2 comments

Comments

@welchwilmerck
Copy link

welchwilmerck commented Jul 19, 2022

Release 2.2.0
After caper init sge, I add a custom parameter to sge_resource_param. Upon caper run, the generated backend.conf has the hard-coded default sge_resource_param, not the custom one.

I've isolated the problem to the init of the CaperRunner object in cli.py

caper/caper/cli.py

Lines 238 to 248 in c10d05b

slurm_partition=getattr(args, 'slurm_partition', None),
slurm_account=getattr(args, 'slurm_account', None),
slurm_resource_param=getattr(args, 'slurm_resource_param', None),
slurm_extra_param=getattr(args, 'slurm_extra_param', None),
sge_pe=getattr(args, 'sge_pe', None),
sge_queue=getattr(args, 'sge_queue', None),
sge_extra_param=getattr(args, 'sge_extra_param', None),
pbs_queue=getattr(args, 'pbs_queue', None),
pbs_extra_param=getattr(args, 'pbs_extra_param', None),
lsf_queue=getattr(args, 'lsf_queue', None),
lsf_extra_param=getattr(args, 'lsf_extra_param', None),
and to each of the manager merge_dict in caper_backend_conf.py.

The new resource_param feature was added only for slurm, but none of the other managers. If I caper init slurm and add a custom parameter to slurm_resource_param, it does override the default in the init of CaperRunner and I see the change in backend.conf

$ grep -n resource_param= cli.py
240:        slurm_resource_param=getattr(args, 'slurm_resource_param', None),

$

Have to add the manager resource_param to each of the manager merge_dict in caper_backend_conf.py like is done for slurm.

$ grep -nE '(merge_dict\(|_param=.*param)' caper_backend_conf.py
194:        merge_dict(
204:        merge_dict(
224:        merge_dict(
234:        merge_dict(
243:                slurm_extra_param=slurm_extra_param,
244:                slurm_resource_param=slurm_resource_param,
248:        merge_dict(
257:                sge_extra_param=sge_extra_param,
261:        merge_dict(
269:                pbs_extra_param=pbs_extra_param,
273:        merge_dict(
281:                lsf_extra_param=lsf_extra_param,
298:            merge_dict(
313:            merge_dict(
@leepc12
Copy link
Contributor

leepc12 commented Jul 19, 2022

Thanks for reporting. Fixed in the above PR. I will make a new release soon.

This was referenced Jul 20, 2022
@leepc12
Copy link
Contributor

leepc12 commented Jul 26, 2022

Fixed in v2.2.2. Please re-open if the problem persists.

@leepc12 leepc12 closed this as completed Jul 26, 2022
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

No branches or pull requests

2 participants