Gromacs  2024.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions | Variables
gmx::test::anonymous_namespace{mockhardwaretopology.cpp} Namespace Reference

Classes

class  MockHardwareTopologyTest
 Mocking test with data collected from a few systems. More...
 

Typedefs

using ProcessorMap = std::map< int, std::array< int, 3 >>
 Type name for processor map.
 
using HardwareDetectionTestParams = std::tuple< ProcessorMap, std::vector< int >, std::string >
 Test parameter input struct.
 
using SpecialSystemHardwareParams = std::tuple< int, int, std::string >
 Test parameter struct for special systems.
 

Functions

void checkLogicalProcessor (TestReferenceChecker *checker, const HardwareTopology::LogicalProcessor &cpu)
 Check if fields in a LogicalProcessor struct match. More...
 
void checkProcessingUnit (TestReferenceChecker *checker, const HardwareTopology::ProcessingUnit &pu)
 Check if fields in a ProcessingUnit struct match. More...
 
void checkCore (TestReferenceChecker *checker, const HardwareTopology::Core &core)
 Check if fields in a Core struct match. More...
 
void checkPackage (TestReferenceChecker *checker, const HardwareTopology::Package &package)
 Check if fields in a Package struct match. More...
 
void checkMap (TestReferenceChecker *checker, const std::pair< int, int > &mapEntry)
 Check if an entry in the osIdToPuId map matches. More...
 
void checkMachine (TestReferenceChecker *checker, const HardwareTopology::Machine &machine)
 Check if entire machine structure in a hardware topology matches. More...
 
void checkHardwareTopology (TestReferenceChecker *checker, const HardwareTopology &hwTop)
 

Variables

const ProcessorMap logicalProcessorIdMapXeonE52620v4
 Hardware map for XeonE52620v4. More...
 
const ProcessorMap logicalProcessorIdMapXeon4116
 Hardware map for Xeon4116. More...
 
const ProcessorMap logicalProcessorIdMapCore12900K
 Hardware map for Core12900K. More...
 
const std::vector< int > emptyCPUVector = {}
 Empty allowed CPU vector.
 
const std::vector< int > slurm1of4XeonE52620v4 = { 0, 1, 2, 3, 16, 17, 18, 19 }
 Slurm slot 1 of 4 XeonE52620v4.
 
const std::vector< int > slurm2of4XeonE52620v4 = { 4, 5, 6, 7, 20, 21, 22, 23 }
 Slurm slot 2 of 4 XeonE52620v4.
 
const std::vector< int > slurm3of4XeonE52620v4 = { 8, 9, 10, 11, 24, 25, 26, 27 }
 Slurm slot 3 of 4 XeonE52620v4.
 
const std::vector< int > slurm4of4XeonE52620v4 = { 12, 13, 14, 15, 28, 29, 30, 31 }
 Slurm slot 4 of 4 XeonE52620v4.
 
const std::vector< int > slurm1of4Xeon4116 = { 0, 1, 2, 3, 4, 5, 24, 25, 26, 27, 28, 29 }
 Slurm slot 1 of 4 Xeon4116.
 
const std::vector< int > slurm2of4Xeon4116 = { 6, 7, 8, 9, 10, 11, 30, 31, 32, 33, 34, 35 }
 Slurm slot 2 of 4 Xeon4116.
 
const std::vector< int > slurm3of4Xeon4116 = { 12, 13, 14, 15, 16, 17, 36, 37, 38, 39, 40, 41 }
 Slurm slot 3 of 4 Xeon4116.
 
const std::vector< int > slurm4of4Xeon4116 = { 18, 19, 20, 21, 22, 23, 42, 43, 44, 45, 46, 47 }
 Slurm slot 4 of 4 Xeon4116.
 

Function Documentation

void gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkCore ( TestReferenceChecker *  checker,
const HardwareTopology::Core &  core 
)

Check if fields in a Core struct match.

Parameters
checkerInitialized checker
coreInitialized Core structure in hardwaretopology.
Note
This routine is typically called from checkPackage().
void gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkLogicalProcessor ( TestReferenceChecker *  checker,
const HardwareTopology::LogicalProcessor &  cpu 
)

Check if fields in a LogicalProcessor struct match.

Parameters
checkerInitialized checker
cpuInitialized LogicalProcessor structure in hardwaretopology.
Note
This routine is typically called from checkMachine().
void gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkMachine ( TestReferenceChecker *  checker,
const HardwareTopology::Machine &  machine 
)

Check if entire machine structure in a hardware topology matches.

Parameters
checkerInitialized checker
machineInitialized Machine structure from hardware topology
void gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkMap ( TestReferenceChecker *  checker,
const std::pair< int, int > &  mapEntry 
)

Check if an entry in the osIdToPuId map matches.

Parameters
checkerInitialized checker
mapEntryReference to single entry in osId to puId map
Note
This routine is typically called from checkMachine().
void gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkPackage ( TestReferenceChecker *  checker,
const HardwareTopology::Package &  package 
)

Check if fields in a Package struct match.

Parameters
checkerInitialized checker
packageInitialized Package structure in hardwaretopology.
Note
This routine is typically called from checkMachine().
void gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkProcessingUnit ( TestReferenceChecker *  checker,
const HardwareTopology::ProcessingUnit &  pu 
)

Check if fields in a ProcessingUnit struct match.

Parameters
checkerInitialized checker
puInitialized processing unit structure in hardwaretopology.
Note
This routine is typically called from checkCore().

Variable Documentation

const ProcessorMap gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::logicalProcessorIdMapCore12900K
Initial value:
= {
{ 0, { 0, 0, 0 } }, { 1, { 0, 0, 1 } }, { 2, { 0, 4, 0 } }, { 3, { 0, 4, 1 } },
{ 4, { 0, 8, 0 } }, { 5, { 0, 8, 1 } }, { 6, { 0, 12, 0 } }, { 7, { 0, 12, 1 } },
{ 8, { 0, 16, 0 } }, { 9, { 0, 16, 1 } }, { 10, { 0, 20, 0 } }, { 11, { 0, 20, 1 } },
{ 12, { 0, 24, 0 } }, { 13, { 0, 24, 1 } }, { 14, { 0, 28, 0 } }, { 15, { 0, 28, 1 } },
{ 16, { 0, 32, 0 } }, { 17, { 0, 33, 0 } }, { 18, { 0, 34, 0 } }, { 19, { 0, 35, 0 } },
{ 20, { 0, 36, 0 } }, { 21, { 0, 37, 0 } }, { 22, { 0, 38, 0 } }, { 23, { 0, 39, 0 } },
}

Hardware map for Core12900K.

const ProcessorMap gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::logicalProcessorIdMapXeon4116
Initial value:
= {
{ 0, { 0, 0, 0 } }, { 1, { 0, 1, 0 } }, { 2, { 0, 2, 0 } }, { 3, { 0, 3, 0 } },
{ 4, { 0, 4, 0 } }, { 5, { 0, 5, 0 } }, { 6, { 0, 8, 0 } }, { 7, { 0, 9, 0 } },
{ 8, { 0, 10, 0 } }, { 9, { 0, 11, 0 } }, { 10, { 0, 12, 0 } }, { 11, { 0, 13, 0 } },
{ 12, { 1, 0, 0 } }, { 13, { 1, 1, 0 } }, { 14, { 1, 2, 0 } }, { 15, { 1, 3, 0 } },
{ 16, { 1, 4, 0 } }, { 17, { 1, 5, 0 } }, { 18, { 1, 8, 0 } }, { 19, { 1, 9, 0 } },
{ 20, { 1, 10, 0 } }, { 21, { 1, 11, 0 } }, { 22, { 1, 12, 0 } }, { 23, { 1, 13, 0 } },
{ 24, { 0, 0, 1 } }, { 25, { 0, 1, 1 } }, { 26, { 0, 2, 1 } }, { 27, { 0, 3, 1 } },
{ 28, { 0, 4, 1 } }, { 29, { 0, 5, 1 } }, { 30, { 0, 8, 1 } }, { 31, { 0, 9, 1 } },
{ 32, { 0, 10, 1 } }, { 33, { 0, 11, 1 } }, { 34, { 0, 12, 1 } }, { 35, { 0, 13, 1 } },
{ 36, { 1, 0, 1 } }, { 37, { 1, 1, 1 } }, { 38, { 1, 2, 1 } }, { 39, { 1, 3, 1 } },
{ 40, { 1, 4, 1 } }, { 41, { 1, 5, 1 } }, { 42, { 1, 8, 1 } }, { 43, { 1, 9, 1 } },
{ 44, { 1, 10, 1 } }, { 45, { 1, 11, 1 } }, { 46, { 1, 12, 1 } }, { 47, { 1, 13, 1 } },
}

Hardware map for Xeon4116.

const ProcessorMap gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::logicalProcessorIdMapXeonE52620v4
Initial value:
= {
{ 0, { 0, 0, 0 } }, { 1, { 0, 1, 0 } }, { 2, { 0, 2, 0 } }, { 3, { 0, 3, 0 } },
{ 4, { 0, 4, 0 } }, { 5, { 0, 5, 0 } }, { 6, { 0, 6, 0 } }, { 7, { 0, 7, 0 } },
{ 8, { 1, 0, 0 } }, { 9, { 1, 1, 0 } }, { 10, { 1, 2, 0 } }, { 11, { 1, 3, 0 } },
{ 12, { 1, 4, 0 } }, { 13, { 1, 5, 0 } }, { 14, { 1, 6, 0 } }, { 15, { 1, 7, 0 } },
{ 16, { 0, 0, 1 } }, { 17, { 0, 1, 1 } }, { 18, { 0, 2, 1 } }, { 19, { 0, 3, 1 } },
{ 20, { 0, 4, 1 } }, { 21, { 0, 5, 1 } }, { 22, { 0, 6, 1 } }, { 23, { 0, 7, 1 } },
{ 24, { 1, 0, 1 } }, { 25, { 1, 1, 1 } }, { 26, { 1, 2, 1 } }, { 27, { 1, 3, 1 } },
{ 28, { 1, 4, 1 } }, { 29, { 1, 5, 1 } }, { 30, { 1, 6, 1 } }, { 31, { 1, 7, 1 } },
}

Hardware map for XeonE52620v4.