mod eb_hooks¶
- module eb_hooks¶
PARALLELISM_LIMITSfrom an EESSIeb_hooks.py, read as Python source.software-layer-scripts keeps its per-package parallelism limits in a module-level dict that
post_ready_hookreads. A key whose value is an(op, argument)tuple is a CPU target’s own limit. A key whose value is a dict is a software name, and that dict’s keys are CPU targets or'*'. A key is a string or a module-level string constant such asCPU_TARGET_A64FX. The ops aredivide_by_factorandset_maximum. The file is parsed, never run. A row this reader cannot model is an error that names its line, because the parallel levels would be wrong without it.The same file is checked for a statement that adds to a name and drops the result:
msg+ "..."on a line of its own builds a longer string and throws it away, wheremsg += "..."appends.Variables
- const LIMITS_NAME: &str¶
The dict
post_ready_hooklooks a build up in.
Functions
- fn parse_hooks(text: &str, file: &str) -> Result<HooksFile>¶
Read
PARALLELISM_LIMITSand the dropped sums fromtext.filenames the file in errors and in each row’s location. The last module-level assignment toPARALLELISM_LIMITSis the onepost_ready_hooksees, and its keys resolve through the string constants bound before it.
Structs and Unions
- struct DroppedSum¶
name + ...as a statement of its own: the sum is computed and lost.- line: usize¶
1-based line of the statement.
- function: Option<String>¶
The innermost
defaround the statement.Noneat module level.
- name: String¶
The name left of
+,msg.
- statement: String¶
The statement’s first source line, trimmed.
Implementations
- impl DroppedSum¶
Functions
- fn message(&self, file: &str) -> String¶
The warning
stack oomprints, withfileas the location.
- struct HooksFile¶
What
stack oomreads from oneeb_hooks.py.- limits: Vec<HookLimit>¶
PARALLELISM_LIMITSrows. A key the dict repeats keeps its last value, as Python does.
- dropped_sums: Vec<DroppedSum>¶
Statements that add to a name and drop the sum.