Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c5c11ce
Move from PYTHONPATH in the modulefile to using sys.path modification…
hagertnl Apr 30, 2026
ea83cf4
Implement Jinja2+YAML template functionality. Basic checks passing
hagertnl Apr 30, 2026
144df39
Re-organizing scheduler and rgt_test classes, moving sole class from …
hagertnl Apr 30, 2026
32cfb93
Updating __init__.py for new directory names
hagertnl Apr 30, 2026
1e53cfd
Removing IBM POWER9 type, since it can easily be covered by linux_x86…
hagertnl Apr 30, 2026
2d5f3ae
Removing unnecessarily-spec'd replacements
hagertnl Apr 30, 2026
f9b3f20
Removing RunTimeEnvironment options and new_environment functionality…
hagertnl Apr 30, 2026
1dca02d
Fixing issue 168, logging build_end when CTRL+C'd. Still need to impr…
hagertnl Apr 30, 2026
ae0bd27
Fix template extension detection
hagertnl May 1, 2026
d20b921
Fully implement a fix for issue #168, CTRL+C behavior
hagertnl May 4, 2026
e4802ad
Merged devel into nick-issue219-yaml-jinja2
hagertnl May 5, 2026
c8f00b8
Switch all user-facing script path additions to use modern pathlib
hagertnl May 5, 2026
4ddd390
Make several conversions from os.path to pathlib
hagertnl May 5, 2026
9fdf15c
Small typo/bug/merge fixes
hagertnl May 5, 2026
aee3597
Replacing low-hanging os.path.exists fruit with the equivalent Path
hagertnl May 5, 2026
0f17a4d
More os.path.exists to Path conversions
hagertnl May 5, 2026
80c9e79
Small pathlib-related fixes
hagertnl May 5, 2026
a776c1f
Implemented variables and replacements blocks (with string formatting…
hagertnl May 8, 2026
f18d0be
Updating user guide
hagertnl May 11, 2026
f0161f8
Re-building docs with latest content, added sphinx-design dependency …
hagertnl May 11, 2026
1b389b1
Fixed typo in update_databases.py, made report_cmd optional
hagertnl May 11, 2026
62bc5f0
A few more 'import sys' bug fixes
hagertnl May 11, 2026
2611a25
Removed lone reference to OLCF_HARNESS_DIR envvar, replaced with a Pa…
hagertnl May 12, 2026
99a2780
Merge branch 'nick-issue219-yaml-jinja2' of github.com:hagertnl/olcf-…
hagertnl May 12, 2026
af2e6ff
Add a much better default value in status_file if PATH_TO_RGT_PACKAGE…
hagertnl May 12, 2026
641b8f5
Merge remote-tracking branch 'olcf/devel' into nick-issue219-yaml-jinja2
hagertnl May 15, 2026
5b68bd3
Merged upstream app/test filters into YAML branch
hagertnl May 15, 2026
c583350
Updating docs to cover app-filter and test-filter
hagertnl May 21, 2026
f6028d2
Re-build docs
hagertnl May 21, 2026
7b860ff
Hot-fix for un-handled Jinja2 import error in linux_utilities.py
hagertnl May 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import unittest
import os
import shutil
from pathlib import Path

def get_path_to_sample_directory():
""" Returns the fully qualified path to the directory 'Sample_Directory_For_Repository_Testing'
Expand All @@ -26,13 +27,13 @@ def get_path_to_application_directory(tag):
return path_to_dir

def create_application_directory(my_unit_test):
if os.path.exists(my_unit_test.pathToApplications) :
if Path(my_unit_test.pathToApplications).exists():
shutil.rmtree(my_unit_test.pathToApplications)
os.makedirs(my_unit_test.pathToApplications)
return

def creating_root_dir_repo(path_to_repo):
if os.path.exists(path_to_repo) :
if Path(path_to_repo).exists() :
shutil.rmtree(path_to_repo)
os.makedirs(path_to_repo)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import unittest
import os
import shutil
from pathlib import Path

# NCCS Tesst Harness packages
from libraries.repositories import RepositoryFactory
Expand Down Expand Up @@ -104,7 +105,7 @@ def get_path_to_test_repository():
return path_head

def creating_root_dir_repo(path_to_repo):
if os.path.exists(path_to_repo) :
if Path(path_to_repo).exists() :
shutil.rmtree(path_to_repo)
os.makedirs(path_to_repo)
return
Expand Down
3 changes: 2 additions & 1 deletion doc-sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
'sphinx.ext.doctest',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.napoleon'
'sphinx.ext.napoleon',
'sphinx_design'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion doc-sphinx/source/user_guide/adding_new_machine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If **RGT_SCHEDULER_TYPE** is set by the user, then the *machine.ini* file will n
[MachineDetails]
# Required variables :
machine_name = frontier
# options: linux_x86_64 or ibm_power9
# options: linux_x86_64 (power9 was recently removed, use linux_x86_64 instead)
machine_type = linux_x86_64
# options: slurm, pbs, lsf
scheduler_type = slurm
Expand Down
524 changes: 335 additions & 189 deletions doc-sphinx/source/user_guide/adding_new_test.rst

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc-sphinx/source/user_guide/envvars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ For example, ``machine_name = <obtain_from_environment>`` will fetch the value f
RGT_SUBMIT_ARGS Provide additional flags to use when submitting to the scheduler
RGT_SUBMIT_QUEUE The highest-precedence specification of which scheduler queue/partition to submit to.
RGT_SUBMIT_ACCT The highest-precedence specification of which project ID to submit to.
RGT_LSF_SUBMIT_AS_STDIN Controls whether the harness runs ``bsub script.lsf`` or ``bsub < script.lsf``. When set to 0, calls ``bsub script.lsf``.

RGT_TYPE_OF_REPOSITORY Type of repository to access/clone the code. Must be 'git' currently.
RGT_GIT_REPS_BRANCH Branch name to clone a Git repo from. Optional, default behavior is to clone default branch.
Expand Down
2 changes: 2 additions & 0 deletions doc-sphinx/source/user_guide/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Extensions
Optional extensions have been developed for use with the OLCF Test Harness (OTH).
Extensions are enabled through environment variables and metadata files placed in the Run_Archive directory of a test launch.

.. _influxdb_event_logging:

Database Event Logging
======================

Expand Down
99 changes: 53 additions & 46 deletions doc-sphinx/source/user_guide/launching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ Setup the environment:
.. code-block:: bash

export OLCF_HARNESS_DIR=/sw/acceptance/olcf-test-harness
module use $OLCF_HARNESS_DIR/modulefiles
module load olcf_harness
export PATH=$OLCF_HARNESS_DIR/harness/bin:$OLCF_HARNESS_DIR/harness/utilities:$PATH
# Or, use the module (not needed anymore, but does the PATH modification)
#module use $OLCF_HARNESS_DIR/modulefiles
#module load olcf_harness

# Machine name examples: andes, frontier, odo
# Check ${OLCF_HARNESS_DIR}/configs/*.ini to see all available machines
export OLCF_HARNESS_MACHINE=<machine_name>
Expand All @@ -50,8 +53,11 @@ Setup the environment:

cd olcf-test-harness
export OLCF_HARNESS_DIR=${PWD}
module use $OLCF_HARNESS_DIR/modulefiles
module load olcf_harness
export PATH=$PWD/harness/bin:$PWD/harness/utilities:$PATH
# Or, use the legacy environment module to do the PATH modification
#module use $OLCF_HARNESS_DIR/modulefiles
#module load olcf_harness

export OLCF_HARNESS_MACHINE=<machine_name>

.. note::
Expand All @@ -69,19 +75,20 @@ Launching the OTH
Basic Usage
^^^^^^^^^^^

Create a directory where you will place input files. No computation will be done here:
Create a directory where you will place input files, which will instruct the OTH on which tests to launch:

.. code-block:: bash

mkdir summit_testshot
cd summit_testshot

Prepare an input file of tests (e.g., *rgt.input.summit*).
In the file, set ``Path_to_tests`` to the location where you would like application source and run files to be kept
(note that the directory provided must be an existing directory on a file system visible to the current machine).
Alternatively, set the *RGT_PATH_TO_TESTS* environment variable.
Next, provide one or more tests to run in the format ``Test = <app-name> <test-name>``.
Prepare an input file of tests in this directory (e.g., *rgt.input.summit*).
Provide one or more tests to run in the format ``Test = <app-name> <test-name>``.
In this example for Summit, the application **hello_mpi** is used and we specify two tests: **c_n001** and **c_n002**.
Optionally, set ``Path_to_tests`` in this file to the location where you would like application source and run files to be kept
(note that the directory provided must be an existing directory).
Alternatively, you may set the *RGT_PATH_TO_TESTS* environment variable.
Either the *RGT_PATH_TO_TESTS* environment variable or ``Path_to_tests`` in the input file must be provided.

.. note::

Expand All @@ -92,10 +99,6 @@ In this example for Summit, the application **hello_mpi** is used and we specify

.. code-block:: bash

################################################################################
# Set the path to the top level of the application directory. #
################################################################################

# Path_to_tests can also replaced by setting the RGT_PATH_TO_TESTS environment variable
Path_to_tests = /some/path/to/my/applications

Expand All @@ -122,7 +125,7 @@ Set a scratch area for this specific instance of the harness (a default is set f
export RGT_PATH_TO_TESTS=/some/path/to/my/applications


The latest version of the harness supports command line tasks as well as input file tasks.
The harness supports command line tasks as well as input file tasks.
If no tasks are provided in the input file, it will use the command line mode.
To launch via the command line, use a command like the following:

Expand All @@ -140,15 +143,13 @@ To launch tasks in the input file instead of the command-line, add lines like th
harness_task check_out_tests
harness_task start_tests
harness_task stop_tests
harness_task display_status


When using the checkout mode, the application source repository will be cloned to the *<Path_to_tests>/<app-name>* directory for all the tests,
but no tests will be run.
If the repository already exists, no action will be taken.
Updating the repo via ``git pull`` or ``git fetch`` should be done outside of the test harness.

After using the start mode, results of the most recent test run can be found in *<Path_to_tests>/<app-name>/<test-name>/Run_Archive/<testid>*.
After using the start mode, results can be found in *<Path_to_tests>/<app-name>/<test-name>/Run_Archive/<testid>*.
Results of the most recent test run can be found in the *<Path_to_tests>/<app-name>/<test-name>/Run_Archive/latest* symbolic link.

.. note::
Expand All @@ -169,33 +170,37 @@ The primary OTH driver script, ``runtests.py``, supports the following command-l

.. code-block::

-h,--help show help message and exit
-i,--inputfile INPUTFILE Input file name (default: rgt.input)
-c,--configfile CONFIGFILE Configuration file name (default: ${OLCF_HARNESS_MACHINE}.ini)
-l,--loglevel LOGLEVEL Logging level (default: NOTSET)
Options: [NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL]
-o,--output {screen,logfile} Destination for harness stdout/stderr messages (default: 'screen')
Options: [screen,logfile]
'screen' - print messages to console (default)
'logfile' - print messages to log file
-m,--mode MODE [MODE ...] Specify the mode(s) to run the harness with (default: 'use_input_file')
Options: [use_input_file,checkout,start,stop,status]
'use_input_file' - use tasks defined in the input file
'checkout' - checkout application tests listed in input file
'start' - start application tests listed in input file
'stop' - stop application tests listed in input file
'status' - check status of application tests listed in input file

--fireworks Use FireWorks to run harness tasks (beta)
-sb, --separate-build-stdio Separate output from build into build_out.stderr.txt and build_out.stdout.txt
--shuffle Shuffle the order of tests before launching
--reuse-first-build Reuse the first build in a chain of resubmitting tests for all subsequent submissions, per-test.
--reuse-build-from-id Re-use the build from the specified test ID.
-i INPUTFILE, --inputfile INPUTFILE
Input file name (default: rgt.input)
--shuffle
Shuffle the order of tests before launching.
-c CONFIGFILE, --configfile CONFIGFILE
Configuration file name (default: master.ini)
-l {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}, --loglevel {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}
Output logging level (default: WARNING)
-o {screen,logfile}, --output {screen,logfile}
Destination for harness stdout/stderr messages:
'screen' - print messages to console (default)
'logfile' - print messages to log file
-m {task} [{task} ...], --mode {task} [{task} ...]
Harness task:
'checkout' - checkout application tests listed in input file
'start' - start application tests listed in input file
'stop' - stop application tests listed in input file
'status' - check status of application tests listed in input file
--fireworks
Use FireWorks to run harness tasks
-sb, --separate-build-stdio
Separate output from build into build_out.stderr.txt and build_out.stdout.txt
--reuse-first-build
If running a test that can resubmit, re-use the first instance of the build for all tests in that chain.
--reuse-build-from-id REUSE_BUILD_FROM_ID
Re-use the build from the specified test ID.
--app-filter APP_FILTER
A comma-separated list of regular expressions or strings used to select specific applications from the provided input file.
--test-filter TEST_FILTER
A comma-separated list of regular expressions or strings used to select specific tests from the provided input file.

.. note::

The ``--loglevel`` flag currently does not apply to all output from the OTH.
This issue is tracked by `Issue 130 <https://github.com/olcf/olcf-test-harness/issues/130>`_.

.. _runtime_configurable_parameters:

Expand All @@ -208,9 +213,9 @@ For example, *git_reps_branch* is a parameter in *$OLCF_HARNESS_MACHINE.ini* tha
The *RGT_GIT_REPS_BRANCH* environment variable can be used to override this value at launch time.
The general precedence of configuration options from lowest to highest is:

1. *$OLCF_HARNESS_MACHINE.ini*
1. *$OLCF_HARNESS_MACHINE.ini* (lowest priority)
2. User-set environment variables (ie, *RGT_GIT_REPS_BRANCH*, *RGT_PROJECT_ID*)
3. *<Path_to_tests>/<app-name>/<test-name>/Scripts/rgt_test_input.ini*
3. *<Path_to_tests>/<app-name>/<test-name>/Scripts/rgt_test_input.ini* (highest priority)

The specific parameters are defined in :ref:`section_new_test` and :ref:`section_new_machine`.

Expand Down Expand Up @@ -239,6 +244,8 @@ There are 4 directories referenced in this section:
- **$RESULTS_DIR** - the directory used to launch the job and store relevant output, equal to **<Path_to_tests>/<app>/<test>/Run_Archive/<test-id>**
- **$STATUS_DIR** - the directory used to store harness status files, equal to **<Path_to_tests>/<app>/<test>/Status/<test-id>**

**$RESULTS_DIR** should be considered the best starting point, as it contains symbolic links to the other 3 directories.

Build, Submit, and Check Output
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
8 changes: 4 additions & 4 deletions doc-sphinx/source/user_guide/utilities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For example, many of these scripts handle keeping the remote database up-to-date
These scripts are documented below.

rgt_archive_utility.py
========
======================

The ``rgt_archive_utility.py`` script allows you to "archive" a test.
What "archive" actually means is it allows you to select when to keep or discard a test's build and work directories, and will copy the test into a single location on the file system, without needing sym-links between the Run_Archive and scratch areas.
Expand Down Expand Up @@ -94,7 +94,7 @@ The ``--help`` message for the ``rgt_archive_utility.py`` script is provided bel


update_databases.py
========
===================

The ``update_databases.py`` script retrieves all incomplete tests from the remote database (ie, an InfluxDB instance), and tries to determine if that test has completed, but did not log its completion message.
This script has support for the Slurm job scheduler, and will look for the job ID of the given test, to see if it completed.
Expand Down Expand Up @@ -154,7 +154,7 @@ This script was written with Cron usage in mind, so the following list of ``--lo


add_comment_to_databases.py
========
===========================

The ``add_comment_to_databases.py`` script adds a comment to a specific test instance in the remote database (ie, an InfluxDB instance).
The ``--help`` message for the ``add_comment_to_databases.py`` script is provided below.
Expand Down Expand Up @@ -182,7 +182,7 @@ This script requires the same environment variables as the core harness requires
Defaults to most recent event.

report_to_databases.py
========
======================

The ``report_to_databases.py`` script enables you to further utilize a remote database to store custom, non-harness metrics.
The ``--help`` message for the ``report_to_databases.py`` script is provided below.
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/user_guide/adding_new_machine.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If **RGT_SCHEDULER_TYPE** is set by the user, then the *machine.ini* file will n
[MachineDetails]
# Required variables :
machine_name = frontier
# options: linux_x86_64 or ibm_power9
# options: linux_x86_64 (power9 was recently removed, use linux_x86_64 instead)
machine_type = linux_x86_64
# options: slurm, pbs, lsf
scheduler_type = slurm
Expand Down
Loading