Skip to content

Commit

Permalink
Merge branch 'develop' into 802-uncaught-exception-when-creation-of-r…
Browse files Browse the repository at this point in the history
…un_complete-file-times-out
  • Loading branch information
Paul-Ferrell authored Feb 4, 2025
2 parents ddcafc9 + 8dad702 commit 25f6f34
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
7 changes: 6 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.10"

sphinx:
configuration: docs/conf.py

Expand All @@ -9,4 +14,4 @@ submodules:

python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
17 changes: 10 additions & 7 deletions docs/tests/scheduling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,21 +270,21 @@ Chunk Selection
By default, Pavilion will assign each test to the least used chunk for a given set of tests. This
will distribute your tests evenly across the entire system.

You can, however, specify a specific chunk for each test, or even create permutations of a test
such that it will run once on each chunk. The ``sched.chunk_ids`` scheduler variable contains a
list of all available chunks ids for a test, and can be used in combination with the ``chunk``
setting to specify a chunk.

**Note: It is not generically safe to specify chunks other than chunk '0', as chunks with indices
greater than 0 aren't guaranteed to exist.**
It is also possible to choose a specific chunk on which each test will run, or even to create
permutations of a test such that it will run once on each chunk. The ``sched.chunk_ids`` scheduler
variable contains a list of all allocated chunk IDs. A common idiom is to use a permutation over
this list (via ``permute_on``) so that each node's instance of the variable ``chunk`` stores the ID
of the chunk of which it is a member.

.. code-block:: yaml
# This will create an instance of this test for every chunk available, giving
# full coverage of the system.
mytest:
# Creates separate instance of the test for each chunk.
permute_on: chunk_ids
# Each test instance stores the ID of the chunk it belongs to
chunk: '{{chunk_ids}}'
schedule:
# When using chunking, 'all' refers to all nodes in the chunk
Expand All @@ -295,6 +295,9 @@ greater than 0 aren't guaranteed to exist.**
chunking:
size: 500
**Note: It is not generically safe to specify chunks other than chunk '0', as chunks with indices
greater than 0 aren't guaranteed to exist.**

Node Selection
~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion lib/pavilion/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def suite_info(self) -> List[Tuple[str, str, Path]]:

if tests_dir.exists():
tests = [file for file in tests_dir.iterdir() if file.suffix.lower() == ".yaml"]
names = [test.name for test in tests]
names = [test.stem for test in tests]
labels = [label] * len(tests)

suite_infos.extend(zip(labels, names, tests))
Expand Down
2 changes: 1 addition & 1 deletion lib/pavilion/module_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def _load(self, var_man: VariableSetManager, req_name: str, version: str) \
actions.append(ModuleLoad(module_name=mod_name, version=mod_vers))

env_vars = collections.OrderedDict()
vers_var_name = '{}_VERSION'.format(self.name.replace('*', 'any'))
vers_var_name = '{}_VERSION'.format(self.name.replace('*', 'any').replace('-', '_'))
if version:
env_vars[vers_var_name] = version
else:
Expand Down
2 changes: 1 addition & 1 deletion lib/pavilion/test_config/file_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ class TestCatElem(yc.CategoryElem):
class ModuleWrapperCatElem(yc.CategoryElem):
"""Allow glob wildcards in key names."""

_NAME_RE = re.compile(r'^[a-zA-Z*?+][a-zA-Z0-9_*+?-]*$')
_NAME_RE = re.compile(r'^[a-zA-Z*?+][a-zA-Z0-9_*+?-]*(/[a-zA-Z0-9._-]+)?$')
type=OrderedDict


Expand Down
4 changes: 2 additions & 2 deletions test/tests/mod_wrapper_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,14 @@ def check_test(ctest, expected_lines):
'export CPP=BAZ-${gcc_VERSION}',
'module load openmpi-bar/11.10',
'export MPICC=mpicc',
'export openmpi-any_VERSION=11.10'
'export openmpi_any_VERSION=11.10'
])

check_test(tests_by_name['test-no-vers'], [
'module load gcc',
'module swap $old_module gcc',
'export gcc_VERSION="$(module_loaded_version \'gcc\')"',
'''export openmpi-any_VERSION="$(module_loaded_version 'openmpi-.*')"''',
'''export openmpi_any_VERSION="$(module_loaded_version 'openmpi-.*')"''',
'module load openmpi-bar',
])

Expand Down

0 comments on commit 25f6f34

Please sign in to comment.