Skip to content

Commit

Permalink
Merge pull request #3317 from vkarak/feat/config-option-topology-prefix
Browse files Browse the repository at this point in the history
[feat] Make directory prefix for topology files configurable
  • Loading branch information
vkarak authored Nov 13, 2024
2 parents 7d4a7cb + ca557ec commit da525c1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
18 changes: 17 additions & 1 deletion docs/config_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -639,12 +639,19 @@ System Partition Configuration

In case of errors during auto-detection, ReFrame will simply issue a warning and continue.

.. note::

The directory prefix for storing topology information is configurable through the :attr:`~config.general.topology_prefix` configuration option.


.. versionadded:: 3.5.0

.. versionchanged:: 3.7.0
ReFrame is now able to detect the processor information automatically.

.. versionchanged:: 4.7
Directory prefix for topology files is now configurable.


.. py:attribute:: systems.partitions.devices
Expand Down Expand Up @@ -1857,6 +1864,16 @@ General Configuration



.. py:attribute:: general.topology_prefix
:required: No
:default: ``"${HOME}/.reframe/topology"``

Directory prefix for storing the auto-detected processor topology.

.. versionadded:: 4.7


.. py:attribute:: general.trap_job_errors
:required: No
Expand All @@ -1866,7 +1883,6 @@ General Configuration

.. versionadded:: 3.2


.. py:attribute:: general.keep_stage_files
:required: No
Expand Down
2 changes: 1 addition & 1 deletion reframe/frontend/autodetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _emit_custom_script(job, env, commands):
def detect_topology():
rt = runtime.runtime()
detect_remote_systems = rt.get_option('general/0/remote_detect')
topo_prefix = os.path.join(os.getenv('HOME'), '.reframe/topology')
topo_prefix = osext.expandvars(rt.get_option('general/0/topology_prefix'))
for part in rt.system.partitions:
getlogger().debug(f'detecting topology info for {part.fullname}')
found_procinfo = False
Expand Down
1 change: 1 addition & 0 deletions reframe/schemas/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
"general/save_log_files": false,
"general/table_format": "pretty",
"general/target_systems": ["*"],
"general/topology_prefix": "${HOME}/.reframe/topology",
"general/timestamp_dirs": "%Y%m%dT%H%M%S%z",
"general/trap_job_errors": false,
"general/unload_modules": [],
Expand Down

0 comments on commit da525c1

Please sign in to comment.