Skip to content

Dependency graph instead of tree #6

@antoine-morvan

Description

@antoine-morvan

Hello,

Currently, it seems to me that the dependencies we can express in the JUBE input can only be a tree. For instance, my input could look like this :

name: testjube
outpath: testjube_bench
comment: Test JUBE

#Configuration
parameterset:
  - name: build_parameters
    parameter: 
    - {name: COMPILER,    _: "gcc:13.2.0,llvm:17.0.6"}
  - name: run_parameters
    parameter: 
    - {name: FREQ,            _: "NOMINAL,TURBO"}

#Operation
step:
  - name: prepare
    do: |
      echo "do the prepare"
  - name: build
    depend: prepare
    use: build_parameters
    do: |
      echo "do the build"
  - name: setup
    depend: build
    use: build_parameters, run_parameters
    do: |
      echo "do the build"
  - name: run
    depend: setup,build
    use: build_parameters, run_parameters
    do: |
      echo "do the build"

For the input above, the dependency of the steps would look like this :

graph TD;
    prepare-->build_gcc:13.2.0;
    build_gcc:13.2.0-->setup_gcc:13.2.0_NOMINAL;
    build_gcc:13.2.0-->setup_gcc:13.2.0_TURBO;
    setup_gcc:13.2.0_TURBO-->run_gcc:13.2.0_TURBO;
    setup_gcc:13.2.0_NOMINAL-->run_gcc:13.2.0_NOMINAL

    prepare-->build_llvm:17.0.6;
    build_llvm:17.0.6-->setup_llvm:17.0.6_NOMINAL;
    build_llvm:17.0.6-->setup_llvm:17.0.6_TURBO;
    setup_llvm:17.0.6_TURBO-->run_llvm:17.0.6_TURBO;
    setup_llvm:17.0.6_NOMINAL-->run_llvm:17.0.6_NOMINAL
Loading

However, my setup step is a bit costly in terms of compute resources, but not meaningful in terms of results (analysis): it simply produces some intermediate input from built binaries. Actually, I want to run it once only, using whatever of the build and run parameter that are specified. The dependencies I would like to express would look like this :

graph TD;
    prepare-->build_gcc:13.2.0;
    build_gcc:13.2.0-->setup_gcc:13.2.0_NOMINAL;
    setup_gcc:13.2.0_NOMINAL-->run_gcc:13.2.0_TURBO;
    setup_gcc:13.2.0_NOMINAL-->run_gcc:13.2.0_NOMINAL

    prepare-->build_llvm:17.0.6;
    build_llvm:17.0.6-->run_llvm:17.0.6_TURBO;
    build_llvm:17.0.6-->run_llvm:17.0.6_NOMINAL;
    setup_gcc:13.2.0_NOMINAL-->run_llvm:17.0.6_TURBO;
    setup_gcc:13.2.0_NOMINAL-->run_llvm:17.0.6_NOMINAL
Loading

Note that the setup is executed once for all the run steps. Because of this, some nodes have 2 parents, thus moving from tree to graph structure. I would like something like this :

  - name: setup
    depend: build
    use: build_parameters[0], run_parameters[0] # use the parameter 0 from possible values
    do: |
      echo "do the build"
  - name: run
    depend: setup,build # since there is only one instance of setup, they all depend on the same setup step; might be necessary to add support for step identification in more complex cases...
    use: build_parameters, run_parameters
    do: |
      echo "do the build"

Is there a way to specify things using JUBE ?

Best.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions