buildtest.cli.compilers

Module Contents

Classes

BuildtestCompilers

param settings_file

Specify an alternate settings file to use when finding compilers

Functions

compiler_cmd(args, configuration)

compiler_test(configuration[, compiler_names])

This method implements buildtest config compilers test which tests

compiler_find(configuration[, modulepath, detailed, ...])

This method implements buildtest config compilers find which detects

buildtest.cli.compilers.compiler_cmd(args, configuration)[source]
buildtest.cli.compilers.compiler_test(configuration, compiler_names=None)[source]

This method implements buildtest config compilers test which tests the compilers with the corresponding modules if set. This command iterates over all compilers and perform the module load test and show an output of each compiler.

Parameters
buildtest.cli.compilers.compiler_find(configuration, modulepath=None, detailed=None, update=None)[source]

This method implements buildtest config compilers find which detects new compilers based on module names defined in configuration. If system has Lmod we use Lmodule API to detect the compilers. For environment-modules we search for all modules in current $MODULEPATH.

Parameters
  • configuration (buildtest.config.SiteConfiguration) – An instance of SiteConfiguration class

  • modulepath (List, optional) – An instance of List, a list of directories to search for modules via MODULEPATH to detect compilers

  • detailed (bool, optional) – An instance of bool, flag for printing a detailed report.

  • update (bool, optional) – An instance of bool, flag for updating configuration file with new compilers

class buildtest.cli.compilers.BuildtestCompilers(configuration, settings_file=None, detailed=False, modulepath=None)[source]
Parameters
  • settings_file – Specify an alternate settings file to use when finding compilers

  • settings_file – str, optional

  • compilers (dict) – compiler section from buildtest configuration.

compiler_table
find_compilers()[source]

This method returns compiler modules discovered depending on your module system. If you have Lmod system we use spider utility to detect modules, this is leveraging Lmodule API. If you have environment-modules we parse output of module av -t.

Returns

return a list of compiler modules detected based on module key name.

Return type

dict

_validate_modules(module_dict)[source]

This method will validate modules by running module load test for all discovered modules specified in parameter discovered_modules. This method returns a list of modules that were valid, if all tests pass we return the same list. A module test pass if we get a returncode 0.

_update_compiler_section()[source]

This method will update the compiler section by adding new compilers if found

Returns

Updated compiler section for buildtest configuration

Return type

dict

print_json()[source]

Prints compiler section in JSON, this implements buildtest config compilers --json

print_yaml()[source]

Prints compiler section in YAML, this implements buildtest config compilers --yaml

names()[source]

Return a list of compiler names defined in buildtest configuration

print_compilers()[source]

This method implements buildtest config compilers which prints all compilers from buildtest configuration