Skip to content

Commit e84d8f8

Browse files
author
Vasileios Karakasis
authored
Merge pull request #1773 from ekouts/feat/extend-partition-config
[feat] Add processor and device information to the system partitions and make them accessible from the tests
2 parents b780dd6 + 7453f60 commit e84d8f8

File tree

5 files changed

+511
-7
lines changed

5 files changed

+511
-7
lines changed

docs/config_reference.rst

Lines changed: 160 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,36 @@ System Partition Configuration
326326
A list of job scheduler `resource specification <config_reference.html#custom-job-scheduler-resources>`__ objects.
327327

328328

329+
.. js:attribute:: .systems[].partitions[].processor
330+
331+
:required: No
332+
:default: ``{}``
333+
334+
Processor information for this partition stored in a `processor info object <#processor-info>`__.
335+
336+
.. versionadded:: 3.5.0
337+
338+
339+
.. js:attribute:: .systems[].partitions[].devices
340+
341+
:required: No
342+
:default: ``[]``
343+
344+
A list with `device info objects <#device-info>`__ for this partition.
345+
346+
.. versionadded:: 3.5.0
347+
348+
349+
.. js:attribute:: .systems[].partitions[].extras
350+
351+
:required: No
352+
:default: ``{}``
353+
354+
User defined attributes of the system partition that will be accessible from the ReFrame tests.
355+
By default it is an empty dictionary.
356+
357+
.. versionadded:: 3.5.0
358+
329359

330360
.. _container-platform-configuration:
331361

@@ -1261,14 +1291,14 @@ Module Objects
12611291
A *module object* in ReFrame's configuration represents an environment module.
12621292
It can either be a simple string or a JSON object with the following attributes:
12631293

1264-
.. js:attribute:: .name
1294+
.. attribute:: .name
12651295

12661296
:required: Yes
12671297

12681298
The name of the module.
12691299

12701300

1271-
.. js:attribute:: .collection
1301+
.. attribute:: .collection
12721302

12731303
:required: No
12741304
:default: ``false``
@@ -1291,3 +1321,131 @@ It can either be a simple string or a JSON object with the following attributes:
12911321
.. seealso::
12921322

12931323
Module collections with `Environment Modules <https://modules.readthedocs.io/en/latest/MIGRATING.html#module-collection>`__ and `Lmod <https://lmod.readthedocs.io/en/latest/010_user.html#user-collections>`__.
1324+
1325+
1326+
Processor Info
1327+
--------------
1328+
1329+
.. versionadded:: 3.5.0
1330+
1331+
A *processor info object* in ReFrame's configuration is used to hold information about the processor of a system partition and is made available to the tests through the :attr:`processor <reframe.core.systems.SystemPartition.processor>` attribute of the :attr:`current_partition <reframe.core.pipeline.RegressionTest.current_partition>`.
1332+
1333+
1334+
.. attribute:: .arch
1335+
1336+
:required: No
1337+
:default: ``None``
1338+
1339+
The microarchitecture of the processor.
1340+
1341+
1342+
.. attribute:: .num_cpus
1343+
1344+
:required: No
1345+
:default: ``None``
1346+
1347+
Number of logical CPUs.
1348+
1349+
1350+
.. attribute:: .num_cpus_per_core
1351+
1352+
:required: No
1353+
:default: ``None``
1354+
1355+
Number of logical CPUs per core.
1356+
1357+
1358+
.. attribute:: .num_cpus_per_socket
1359+
1360+
:required: No
1361+
:default: ``None``
1362+
1363+
Number of logical CPUs per socket.
1364+
1365+
1366+
.. attribute:: .num_sockets
1367+
1368+
:required: No
1369+
:default: ``None``
1370+
1371+
Number of sockets.
1372+
1373+
1374+
.. attribute:: .topology
1375+
1376+
:required: No
1377+
:default: ``None``
1378+
1379+
Processor topology.
1380+
An example follows:
1381+
1382+
.. code-block:: python
1383+
1384+
'topology': {
1385+
'numa_nodes': ['0x000000ff'],
1386+
'sockets': ['0x000000ff'],
1387+
'cores': ['0x00000003', '0x0000000c',
1388+
'0x00000030', '0x000000c0'],
1389+
'caches': [
1390+
{
1391+
'type': 'L3',
1392+
'size': 6291456,
1393+
'linesize': 64,
1394+
'associativity': 0,
1395+
'num_cpus': 8,
1396+
'cpusets': ['0x000000ff']
1397+
},
1398+
{
1399+
'type': 'L2',
1400+
'size': 262144,
1401+
'linesize': 64,
1402+
'associativity': 4,
1403+
'num_cpus': 2,
1404+
'cpusets': ['0x00000003', '0x0000000c',
1405+
'0x00000030', '0x000000c0']
1406+
},
1407+
{
1408+
'type': 'L1',
1409+
'size': 32768,
1410+
'linesize': 64,
1411+
'associativity': 0,
1412+
'num_cpus': 2,
1413+
'cpusets': ['0x00000003', '0x0000000c',
1414+
'0x00000030', '0x000000c0']
1415+
}
1416+
]
1417+
}
1418+
1419+
1420+
Device Info
1421+
-----------
1422+
1423+
.. versionadded:: 3.5.0
1424+
1425+
1426+
A *device info object* in ReFrame's configuration is used to hold information about a specific type of devices in a system partition and is made available to the tests through the :attr:`devices <reframe.core.systems.SystemPartition.processor>` attribute of the :attr:`current_partition <reframe.core.pipeline.RegressionTest.current_partition>`.
1427+
1428+
1429+
.. attribute:: .type
1430+
1431+
:required: No
1432+
:default: ``None``
1433+
1434+
The type of the device, for example ``"gpu"``.
1435+
1436+
1437+
.. attribute:: .arch
1438+
:noindex:
1439+
1440+
:required: No
1441+
:default: ``None``
1442+
1443+
The microarchitecture of the device.
1444+
1445+
1446+
.. attribute:: .num_devices
1447+
1448+
:required: No
1449+
:default: ``None``
1450+
1451+
Number of devices of this type inside the system partition.

0 commit comments

Comments
 (0)