Skip to content

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

@aplowman

Description

@aplowman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions