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

A sequenced parameter that is shared between two tasks is "doubly sequenced" #100

Open
aplowman opened this issue Apr 25, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@aplowman
Copy link
Contributor

aplowman commented Apr 25, 2021

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: SX

Here, 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.

@aplowman aplowman added the documentation Improvements or additions to documentation label Apr 25, 2021
@aplowman aplowman added this to the May 2021 milestone Apr 25, 2021
@aplowman aplowman modified the milestones: May 2021, June 2021 Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant