pavilion2 icon indicating copy to clipboard operation
pavilion2 copied to clipboard

Module Wrappers via Test Configs

Open Paul-Ferrell opened this issue 2 years ago • 4 comments

Add a new 'module_wrappers' section to the config, to allow for defining module wrappers as simple config sections, particularly in the host configs.


module_wrappers:
  'name[/version]': 
    # If a version is given, loading that module will automatically specify that version.
    modules: 
      - '-foo'
      - 'bar'
    # An MODULENAME_VERSION environment variable will be set and usable automatically as well.
    env: 
      'CC': '$(which CC)'

Paul-Ferrell avatar Oct 24 '22 15:10 Paul-Ferrell

Also, support wildcards (globs) in the module_wrapper definitions, as both the module name and version.

Paul-Ferrell avatar Oct 26 '22 15:10 Paul-Ferrell


module_wrappers:
  openmpi-*:
    modules:
      - PrgEnv-Intel->PrgEnv-gnu
      - gcc->gcc
    env:
      CC: asdf

run:
  modules: ['gcc/11.3.0', 'openmpi-{{compiler}}/5.3']

The * stuff needs dynamic replacement.

Paul-Ferrell avatar Oct 27 '22 19:10 Paul-Ferrell

Apply globs to each module step, and replace there.

Paul-Ferrell avatar Oct 27 '22 19:10 Paul-Ferrell

modules:
  - openmpi-* -> openmpi-*  

Paul-Ferrell avatar Oct 27 '22 19:10 Paul-Ferrell