Gromacs
2025.0-dev-20241014-f673b97
|
#include "gmxpre.h"
#include "config.h"
#include <algorithm>
#include <array>
#include <filesystem>
#include <iterator>
#include <map>
#include <numeric>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include <gtest/gtest-param-test.h>
#include <gtest/gtest.h>
#include "gromacs/hardware/hardwaretopology.h"
#include "testutils/refdata.h"
#include "testutils/testasserts.h"
#include "testutils/testfilemanager.h"
Tests for gmx::HardwareTopology.
Classes | |
class | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::MockHardwareTopologyTest |
Mocking test with data collected from a few systems. More... | |
Typedefs | |
using | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::ProcessorMap = std::map< int, std::array< int, 3 >> |
Type name for processor map. | |
using | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::HardwareDetectionTestParams = std::tuple< ProcessorMap, std::vector< int >, std::string > |
Test parameter input struct. | |
using | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::SpecialSystemHardwareParams = std::tuple< int, int, std::string > |
Test parameter struct for special systems. | |
Functions | |
void | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkLogicalProcessor (TestReferenceChecker *checker, const HardwareTopology::LogicalProcessor &cpu) |
Check if fields in a LogicalProcessor struct match. More... | |
void | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkProcessingUnit (TestReferenceChecker *checker, const HardwareTopology::ProcessingUnit &pu) |
Check if fields in a ProcessingUnit struct match. More... | |
void | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkCore (TestReferenceChecker *checker, const HardwareTopology::Core &core) |
Check if fields in a Core struct match. More... | |
void | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkPackage (TestReferenceChecker *checker, const HardwareTopology::Package &package) |
Check if fields in a Package struct match. More... | |
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. More... | |
void | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkMachine (TestReferenceChecker *checker, const HardwareTopology::Machine &machine) |
Check if entire machine structure in a hardware topology matches. More... | |
void | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::checkHardwareTopology (TestReferenceChecker *checker, const HardwareTopology &hwTop) |
Variables | |
const ProcessorMap | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::logicalProcessorIdMapXeonE52620v4 |
Hardware map for XeonE52620v4. More... | |
const ProcessorMap | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::logicalProcessorIdMapXeon4116 |
Hardware map for Xeon4116. More... | |
const ProcessorMap | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::logicalProcessorIdMapCore12900K |
Hardware map for Core12900K. More... | |
const std::vector< int > | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::emptyCPUVector = {} |
Empty allowed CPU vector. | |
const std::vector< int > | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::slurm1of4XeonE52620v4 = { 0, 1, 2, 3, 16, 17, 18, 19 } |
Slurm slot 1 of 4 XeonE52620v4. | |
const std::vector< int > | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::slurm2of4XeonE52620v4 = { 4, 5, 6, 7, 20, 21, 22, 23 } |
Slurm slot 2 of 4 XeonE52620v4. | |
const std::vector< int > | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::slurm3of4XeonE52620v4 = { 8, 9, 10, 11, 24, 25, 26, 27 } |
Slurm slot 3 of 4 XeonE52620v4. | |
const std::vector< int > | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::slurm4of4XeonE52620v4 = { 12, 13, 14, 15, 28, 29, 30, 31 } |
Slurm slot 4 of 4 XeonE52620v4. | |
const std::vector< int > | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::slurm1of4Xeon4116 = { 0, 1, 2, 3, 4, 5, 24, 25, 26, 27, 28, 29 } |
Slurm slot 1 of 4 Xeon4116. | |
const std::vector< int > | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::slurm2of4Xeon4116 = { 6, 7, 8, 9, 10, 11, 30, 31, 32, 33, 34, 35 } |
Slurm slot 2 of 4 Xeon4116. | |
const std::vector< int > | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::slurm3of4Xeon4116 = { 12, 13, 14, 15, 16, 17, 36, 37, 38, 39, 40, 41 } |
Slurm slot 3 of 4 Xeon4116. | |
const std::vector< int > | gmx::test::anonymous_namespace{mockhardwaretopology.cpp}::slurm4of4Xeon4116 = { 18, 19, 20, 21, 22, 23, 42, 43, 44, 45, 46, 47 } |
Slurm slot 4 of 4 Xeon4116. | |