lanl / Pavilion

HPC testing harness
BSD 3-Clause "New" or "Revised" License
16 stars 12 forks source link

2.0 - Test Config - Variables #53

Closed pflarr closed 5 years ago

pflarr commented 6 years ago

A few features of pavilion will be consolidated into a new 'variables' and 'permutations' sections of the test section. An example config is occasionally worth literally dozens of words:

test:
  variables:
    # Variables provide a convenient place to put things that will likely be overridden 
    # in child tests.
    # (See below, and the 'Test Inheritance' ticket).
    sub-test: 'alltoall'

    # You can give multiple values for a variable. These can be referenced individually, 
    # or be inserted iteratively (see # )
    lustre:
      - scratch1
      - scratch2
      - scratch3

    # Variables can be grouped into sub-variables. This is especially useful for 
    # multi-valued variables that have multiple attributes. 
    filesystems:
      - {type: nfs, path: '/usr/projects/hpctest/'}
      - {type: tmp, path: '/tmp/'}

  # Variables in the permutations, or 'per' section should generally have multiple 
  # values. That's because a virtual test is created and run for each combination 
  # of the values in this section. In this example, we want four runs, one for each 
  # combination of compiler and mpi.
  permutations: 
    # For example, if we want to run a test 
    mpi: 
      - openmpi
      - mvapich2

    # Sometimes you don't want all permutations, you want some values to be linked. 
    # For that, use sub-variables.  For below, the only combinations will be:
    #   compiler.name -> gcc, compiler.mpicc -> mpicc
    #   compiler.name -> intel, compiler.mpicc -> mpiicc
    compiler:
      - {name: 'gcc', mpicc: 'mpicc'}
      - {name: 'intel', mpicc: 'mpiicc'}

Variable usage is covered in the String Formatting ticket, # .

Some Notes

pflarr commented 5 years ago

Implemented and tested.