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

Allow config variables to be used inside config variables #13

Open
ajwt opened this issue Nov 28, 2022 · 1 comment
Open

Allow config variables to be used inside config variables #13

ajwt opened this issue Nov 28, 2022 · 1 comment

Comments

@ajwt
Copy link

ajwt commented Nov 28, 2022

We've a situation where we'd like to customise launch_parallel, and pass an extra argument to it in some cases.

The default is
launch_parallel = 'mpirun -np tc.nprocs'

but for various configs we'd like to have e.g.
launch_parallel='mpirun -np tc.nprocs --my-other-option'
or
launch_parallel='mpirun -np tc.nprocs --my-special-option'

Would it be possible to have a variable like
launch_parallel_template='mpirun -np tc.nprocs'
(which is a thing we might customise depending on the MPI implementation)

and then in the individual configs
launch_parallel='tc.launch_parallel_template --my-other-option'
or
launch_parallel='tc.launch_parallel_template --my-special-option'

@jsspencer
Copy link
Owner

Might be easier to extend

launch_parallel='mpirun -np tc.nprocs tc.args'

(similar to the run_cmd_template)

and then set tc.args in individual configs? It's been years since I looked at this code and threading this through might be quite annoying...

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