-
Notifications
You must be signed in to change notification settings - Fork 4
Description
This is unexpected, but not really a bug. This issue should be resolved by adding an explanatory warning.
Example based on this workflow from the UoM installation:
- name: generate_microstructure_seeds
method: random
software: damask
base:
size: [1, 1, 1]
num_grains: 3
sequences:
- name: grid_size
vals: [
[4, 4, 4],
[8, 8, 8],
]
output_map_options:
phase_label: Al
- name: generate_volume_element
method: random_voronoi
software: damask
base:
homog_label: SXHere, a sequence of length two is defined for the grid_size parameter in the first task. This parameter is also used in the second task. It seems that since the value is re-used, the sequence is also re-used in the second task, leading to an unexpected nesting and four elements in the second task.
The workaround to avoid this behaviour is to define the same parameter sequence in the second task as well, and set nest: False in the first task (although doing this could have unwanted consequences elsewhere in the workflow, until the nesting algorithm is re-worked):
- name: generate_microstructure_seeds
method: random
software: damask
base:
size: [1, 1, 1]
num_grains: 3
sequences:
- name: grid_size
vals: [
[4, 4, 4],
[8, 8, 8],
]
nest: false
output_map_options:
phase_label: Al
- name: generate_volume_element
method: random_voronoi
software: damask
base:
homog_label: SX
sequences:
- name: grid_size
vals: [
[4, 4, 4],
[8, 8, 8],
] If, as in this case, the parameter is optional in the first task, an alternative workaround is to define the parameter (and sequence) in only the second task.