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

Evaluation of dynamic variables during the initialization phase #9

Open
tbarbette opened this issue Jun 29, 2020 · 1 comment
Open
Labels

Comments

@tbarbette
Copy link
Owner

If one defines something like:

%variables
CPU=[1-8]

%late_variables
THREADS=EXPAND( $(( $CPU + 1 )) )

Then during initialization (creation of files, or %init sections) an error will appear because the evaluation of late_variables has not yet any value for CPU, that will get values defined for each of the runs only.

Solution is to have a dependency graph (ouch) or maybe add a parameter to late_variables to specify that it should not run at initialization phase. Probably easier.

@tbarbette tbarbette added the low label Nov 1, 2021
@tbarbette
Copy link
Owner Author

This is generally a bad practice also. Jinja templates generated according to the first variable would be better.

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

No branches or pull requests

1 participant