Introspection Operation

List Options (buildtest list --help)

buildtest list --help
usage: buildtest [options] [COMMANDS] list [-h] [-s] [-m] [-ec]

optional arguments:
  -h, --help          show this help message and exit
  -s, --software      get unique software from Lmod spider command
  -m, --modules       get full module name and path to module files
  -ec, --easyconfigs  Return a list of easyconfigs from a module tree

buildtest comes with a set of options for listing useful info such as

  • List Unique software

  • List software-modulefile relationship

  • List of easyconfigs

List Software (buildtest list --software)

buildtest can report the software list by running the following buildtest list --software or short option buildtest list -s

buildtest determines the software list based on the module trees specified in BUILDTEST_MODULEPATH and processes each module tree and returns a unique software list

buildtest list --software
RHEL6-apps
cctsoft
clinpharm
deprecated
easybuild
eb
ljmedchemsoft
lmod
medsci
omics
pharmsci
ru
settarg
siterestricted
statistics
use.own.eb


Total Software Packages:  16

Listing Modules (buildtest list --modules)

If you want to view a breakdown of all modules then use buildtest list --modules or short option buildtest list -m

The output will be sorted by software and each entry will correspond to the full path of the modulefile.

buildtest list --modules

    Full Module Name                     |      ModuleFile Path
-----------------------------------------|----------------------------- 
RHEL6-apps                               |	/nfs/grid/software/moduledomains/RHEL6-apps.lua
cctsoft                                  |	/nfs/grid/software/moduledomains/cctsoft
clinpharm                                |	/nfs/grid/software/moduledomains/clinpharm
deprecated                               |	/nfs/grid/software/moduledomains/deprecated
easybuild                                |	/nfs/grid/software/moduledomains/easybuild
eb/2017                                  |	/nfs/grid/software/moduledomains/eb/2017.lua
eb/2018                                  |	/nfs/grid/software/moduledomains/eb/2018.lua
ljmedchemsoft                            |	/nfs/grid/software/moduledomains/ljmedchemsoft
lmod/6.5.1                               |	/usr/share/lmod/lmod/modulefiles/Core/lmod/6.5.1.lua
medsci                                   |	/nfs/grid/software/moduledomains/medsci
omics                                    |	/nfs/grid/software/moduledomains/omics
pharmsci                                 |	/nfs/grid/software/moduledomains/pharmsci
ru                                       |	/nfs/grid/software/moduledomains/ru
settarg/6.5.1                            |	/usr/share/lmod/lmod/modulefiles/Core/settarg/6.5.1.lua
siterestricted                           |	/nfs/grid/software/moduledomains/siterestricted
statistics                               |	/nfs/grid/software/moduledomains/statistics
use.own.eb/append                        |	/nfs/grid/software/moduledomains/use.own.eb/append
use.own.eb/prepend                       |	/nfs/grid/software/moduledomains/use.own.eb/prepend


Total Software Modules: 18
Total LUA Modules: 5
Total non LUA Modules: 13

List easyconfigs from module trees (buildtest list --easyconfigs)

buildtest can return a list of easyconfigs from module trees defined in BUILDTEST_MODULEPATH. You can run buildtest list --easyconfigs or short option buildtest list -ec.

buildtest will report full path to easyconfigs and also report any errors if it can’t find any easyconfig. If you specify a module tree that is not built by easybuild you can expect some warning or error messages which is intended.

buildtest will attempt to search for any file with .eb extension in easybuild directory that is part of install directory of each software for every easybuild app.

buildtest list --easyconfigs
No easyconfigs found!


Unable to find easyconfigs for the following, please investigate this issue! 

Reading File: /nfs/grid/software/moduledomains/RHEL6-apps.lua Unable to find variable root in module file. This module is not generated by easybuild
Reading File: /nfs/grid/software/moduledomains/cctsoft Unable to find variable root in module file. This module is not generated by easybuild
Reading File: /nfs/grid/software/moduledomains/clinpharm Unable to find variable root in module file. This module is not generated by easybuild
Reading File: /nfs/grid/software/moduledomains/deprecated Unable to find variable root in module file. This module is not generated by easybuild
Reading File: /nfs/grid/software/moduledomains/easybuild Unable to find variable root in module file. This module is not generated by easybuild
Reading File: /nfs/grid/software/moduledomains/eb/2017.lua Unable to find variable root in module file. This module is not generated by easybuild
Reading File: /nfs/grid/software/moduledomains/eb/2018.lua Unable to find variable root in module file. This module is not generated by easybuild
Reading File: /nfs/grid/software/moduledomains/ljmedchemsoft Unable to find variable root in module file. This module is not generated by easybuild
Reading File: /usr/share/lmod/lmod/modulefiles/Core/lmod/6.5.1.lua Unable to find variable root in module file. This module is not generated by easybuild

If an easyconfig is not found you may get the following message

Error

Could not find easyconfig in /clust/app/easybuild/2018/IvyBridge/redhat/7.3/software/NWChem/6.8.revision47-intel-2018a-2017-12-14-Python-2.7.14/easybuild

Find Subcommands

Find Operations (buildtest find --help)

buildtest find --help
usage: buildtest [options] [COMMANDS] find [-h] [-fc FINDCONFIG] [-ft FINDTEST]

optional arguments:
  -h, --help            show this help message and exit
  -fc FINDCONFIG, --findconfig FINDCONFIG
                        Find buildtest YAML config files. To find all yaml files use -fc all
  -ft FINDTEST, --findtest FINDTEST
                        Find generated test scripts. To find all testscripts use -ft all

Find YAML configs (buildtest find -fc)

To find all yaml configuration use the option buildtest find --find-configs all or short option buildtest find -fc all

This will give you an output of all .yml files in $BUILDTEST_CONFIGS_REPO that is used to configure on your test scripts.

buildtest find -fc all
/home/siddis14/buildtest-framework/toolkit/buildtest/suite/compilers/helloworld/hello_slurm.yml
/home/siddis14/buildtest-framework/toolkit/buildtest/suite/compilers/helloworld/hello_lsf.yml
/home/siddis14/buildtest-framework/toolkit/buildtest/suite/compilers/helloworld/hello_gnu.yml
/home/siddis14/buildtest-framework/toolkit/buildtest/suite/compilers/helloworld/hello_args.c.yml
/home/siddis14/buildtest-framework/toolkit/buildtest/suite/compilers/helloworld/hello_intel_fortran.yml
/home/siddis14/buildtest-framework/toolkit/buildtest/suite/mpi/examples/mpi_ping.c.slurm.yml
/home/siddis14/buildtest-framework/toolkit/buildtest/suite/mpi/examples/hello.c.yml
/home/siddis14/buildtest-framework/toolkit/buildtest/suite/mpi/examples/mpi_ping.c.lsf.yml
/home/siddis14/buildtest-framework/toolkit/buildtest/suite/mpi/matrixmux/mm_mpi.f.yml

Find test scripts (buildtest find -ft)

To find all test scripts generated by buildtest you can run buildtest find --find-test all or short option buildtest find -ft all

This will report the full path to all tests currently generated by buildtest.

buildtest find -ft all
/tmp/siddis14/buildtest/tests/suite/compilers/helloworld/hello_slurm.yml.slurm
/tmp/siddis14/buildtest/tests/suite/compilers/helloworld/hello_lsf.yml.lsf
/tmp/siddis14/buildtest/tests/suite/compilers/helloworld/hello_gnu.yml.sh
/tmp/siddis14/buildtest/tests/suite/compilers/helloworld/hello_args.c.yml.sh
/tmp/siddis14/buildtest/tests/suite/compilers/helloworld/hello_intel_fortran.yml.sh
/tmp/siddis14/buildtest/tests/suite/compilers/helloworld/hello_gnu.yml.csh
/tmp/siddis14/buildtest/tests/suite/compilers/helloworld/hello_gnu.yml.bash
/tmp/siddis14/buildtest/tests/suite/compilers/helloworld/hello_intel_fortran.yml_0xbb23d23609a7a848b9ebe7ef002a9323.sh
/tmp/siddis14/buildtest/tests/suite/compilers/helloworld/hello_intel_fortran.yml_0x710d2b7cfdfb9a935b735f48330554ed.sh

Show Options (buildtest show --help)

buildtest show --help
usage: buildtest [options] [COMMANDS] show [-h] [-c] [-k {singlesource}]

optional arguments:
  -h, --help            show this help message and exit
  -c, --config          show buildtest environment configuration
  -k {singlesource}, --keys {singlesource}
                        show yaml keys

Show Configuration (buildtest show --config)

buildtest can display it’s configuration by running buildtest show --config. The configuration can be changed by the following:

  1. Command Line

  2. Environment Variable (BUILDTEST_)

  3. Configuration File (settings.yml)

buildtest will read configuration from settings.yml. User may override any configuration values by environment variables that start with BUILDTEST_. The command line will override environment variables and configuration variables runtime.

Shown below is a sample configuration from buildtest by running buildtest show --config.

buildtest show -c
	 buildtest configuration summary
	 (C): Configuration File,  (E): Environment Variable
BUILDTEST_BINARY                                   (C) = False
BUILDTEST_CLEAN_BUILD                              (C) = False
BUILDTEST_CONFIGS_REPO                             (C) = /home/siddis14/buildtest-framework/toolkit
BUILDTEST_LOGDIR                                   (C) = /tmp/siddis14/buildtest/logs
BUILDTEST_MODULEPATH                               (C) = /nfs/grid/software/moduledomains:/etc/modulefiles:/usr/share/modulefiles:/usr/share/lmod/lmod/modulefiles/Core
BUILDTEST_PARENT_MODULE_SEARCH                     (C) = first
BUILDTEST_RUN_DIR                                  (C) = /tmp/siddis14/buildtest/run
BUILDTEST_SHELL                                    (C) = sh
BUILDTEST_SPIDER_VIEW                              (C) = current
BUILDTEST_SUCCESS_THRESHOLD                        (C) = 1.0
BUILDTEST_TESTDIR                                  (C) = /tmp/siddis14/buildtest/tests

buildtest show --config will show the updated configuration if you set any BUILDTEST_* environment variables.

For instance, if you want to override buildtest log using BUILDTEST_LOGDIR environment variable then buildtest show --config will report the overridden value denoted with (E) to indicate configuration was set by environment variable.

See example below

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
        $ BUILDTEST_LOGDIR=$HOME buildtest show -c
             buildtest configuration summary
             (C): Configuration File,  (E): Environment Variable
    BUILDTEST_BINARY                                   (C) = False
    BUILDTEST_CLEAN_BUILD                              (C) = False
    BUILDTEST_CONFIGS_REPO                             (C) = /home/siddis14/buildtest-framework/toolkit
    BUILDTEST_EASYBUILD                                (C) = False
    BUILDTEST_LOGDIR                                   (E) = /home/siddis14
    BUILDTEST_MODULEPATH                              (C) = /clust/app/easybuild/2018/commons/modules/all:/clust/app/easybuild/2018/Broadwell/redhat/7.3/modules/all:/nfs/grid/software/moduledomains:/etc/modulefiles:/usr/share/modulefiles:/usr/share/lmod/lmod/modulefiles/Core
    BUILDTEST_OHPC                                     (C) = False
    BUILDTEST_PREPEND_MODULES                          (C) = []
    BUILDTEST_RUN_DIR                                  (C) = /tmp/buildtest
    BUILDTEST_SHELL                                    (C) = sh
    BUILDTEST_SUCCESS_THRESHOLD                        (C) = 1.0
    BUILDTEST_TESTDIR                                  (C) = /home/siddis14/buildtest

Note

if you plan to customize your buildtest configuration with configuration file and environment variable, always check your shell environment first to avoid having values overridden accidentally

Show Keys

buildtest can show YAML keys based on testblock. Currently, there is one testblock defined singlesource.

To show yaml keys you can run buildtest show -k singlesource to view all the YAML keys that pertain to testblock: singlesource found in YAML files

buildtest show -k singlesource
                                      General Keys
Keys                 | Description                   
----------------------------------------------------------------------------------------------------
args                 | Input arguments to be passed to the executable
compiler             | Specify a compiler that will be used for compiling the source program
flags                | Specify the build flags for compiling the source program
input                | Specify input file for the executable. This file must be in "src" directory
ldflags              | Flags that will be passed to linkder (ld)
lsf                  | Specify LSF configuration     
slurm                | Specify SLURM configuration   
source               | Specify the name of the source file that is in the "src" directory relative to yaml configuration
vars                 | Specify a list of environment variables that will be declared in the test script

                                          LSF Keys

Keys                 | LSF Equivalents                | Description                   
----------------------------------------------------------------------------------------------------
M                    | #BSUB -M                       | Memory Limit                  
R                    | #BSUB -R                       | Runs the job on a host that meets the specified resource requirements
T                    | #BSUB -T                       | Sets the limit of the number of concurrent threads to thread_limit for the whole job
W                    | #BSUB -W                       | Sets the runtime limit of the job.
n                    | #BSUB -n                       | Submits a parallel job and specifies the number of processors required to run the job

                                        SLURM Keys

Keys                 | Slurm Equivalents              | Description                   
----------------------------------------------------------------------------------------------------
constraint           | #SBATCH --constraint           | specify a list of constraints 
cpus-per-task        | #SBATCH --cpus-per-task        | number of cpus required per task.
mem                  | #SBATCH --mem                  | minimum amount of real memory.
mem-per-cpu          | #SBATCH --mem-per-cpu          | maximum amount of real memory per allocated
nodes                | #SBATCH --nodes                | number of nodes on which to run (N = min[-max])
ntasks               | #SBATCH --ntasks               | number of tasks to run.       
ntasks-per-node      | #SBATCH --ntasks-per-node      | number of tasks to invoke on each node
time                 | #SBATCH --time                 | time limit