Skip to content

Commit da525c1

Browse files
authored
Merge pull request #3317 from vkarak/feat/config-option-topology-prefix
[feat] Make directory prefix for topology files configurable
2 parents 7d4a7cb + ca557ec commit da525c1

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

docs/config_reference.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,12 +639,19 @@ System Partition Configuration
639639

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

642+
.. note::
643+
644+
The directory prefix for storing topology information is configurable through the :attr:`~config.general.topology_prefix` configuration option.
645+
642646

643647
.. versionadded:: 3.5.0
644648

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

652+
.. versionchanged:: 4.7
653+
Directory prefix for topology files is now configurable.
654+
648655

649656
.. py:attribute:: systems.partitions.devices
650657
@@ -1857,6 +1864,16 @@ General Configuration
18571864

18581865

18591866

1867+
.. py:attribute:: general.topology_prefix
1868+
1869+
:required: No
1870+
:default: ``"${HOME}/.reframe/topology"``
1871+
1872+
Directory prefix for storing the auto-detected processor topology.
1873+
1874+
.. versionadded:: 4.7
1875+
1876+
18601877
.. py:attribute:: general.trap_job_errors
18611878
18621879
:required: No
@@ -1866,7 +1883,6 @@ General Configuration
18661883

18671884
.. versionadded:: 3.2
18681885

1869-
18701886
.. py:attribute:: general.keep_stage_files
18711887
18721888
:required: No

reframe/frontend/autodetect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def _emit_custom_script(job, env, commands):
204204
def detect_topology():
205205
rt = runtime.runtime()
206206
detect_remote_systems = rt.get_option('general/0/remote_detect')
207-
topo_prefix = os.path.join(os.getenv('HOME'), '.reframe/topology')
207+
topo_prefix = osext.expandvars(rt.get_option('general/0/topology_prefix'))
208208
for part in rt.system.partitions:
209209
getlogger().debug(f'detecting topology info for {part.fullname}')
210210
found_procinfo = False

reframe/schemas/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,7 @@
601601
"general/save_log_files": false,
602602
"general/table_format": "pretty",
603603
"general/target_systems": ["*"],
604+
"general/topology_prefix": "${HOME}/.reframe/topology",
604605
"general/timestamp_dirs": "%Y%m%dT%H%M%S%z",
605606
"general/trap_job_errors": false,
606607
"general/unload_modules": [],

0 commit comments

Comments
 (0)