|
Gromacs
2026.0-dev-20251119-5f0a571d
|
#include "gmxpre.h"#include "config.h"#include <array>#include <numeric>#include <type_traits>#include <vector>#include <gtest/gtest.h>#include "gromacs/domdec/atomdistribution.h"#include "gromacs/domdec/domdec_internal.h"#include "gromacs/domdec/gpuhaloexchange.h"#include "gromacs/gpu_utils/capabilities.h"#include "gromacs/gpu_utils/gpueventsynchronizer.h"#include "gromacs/gpu_utils/hostallocator.h"#include "gromacs/hardware/device_information.h"#include "gromacs/mdtypes/inputrec.h"#include "gromacs/utility/message_string_collector.h"#include "gromacs/utility/mpicomm.h"#include "gromacs/utility/mpiinfo.h"#include "gromacs/utility/stringutil.h"#include "testutils/mpitest.h"#include "testutils/test_hardware_environment.h"
Include dependency graph for haloexchange_mpi.cpp:Tests for the halo exchange.
The test sets up the rank topology and performs a coordinate halo exchange (for both CPU and GPU codepaths) for several 1D and 2D pulse configurations. Each pulse involves a few non-contiguous indices. The sending rank, atom number and spatial 3D index are encoded in the x values, to allow correctness checking following the halo exchange.
Classes | |
| struct | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::HaloExchangeTestParameters |
| Parameters over which halo exchange is tested. More... | |
| class | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::HaloExchangeTestData |
| Data used in test body for halo exchange. More... | |
| class | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::HaloExchangeTest |
| Test fixture for halo exchange. More... | |
Functions | |
| float | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::encodedValue (const int sendRank, const int atomNumber, const int spatial3dIndex) |
| Get encoded numerical value for sending rank, atom number and spatial 3D index. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::initHaloData (const int rank, RVec *x, const int numHomeAtoms, const int numAtomsTotal) |
| Initialize halo array. More... | |
| MessageStringCollector | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::gpuHalo (gmx_domdec_t *dd, matrix box, HostVector< RVec > *h_x, int numAtomsTotal) |
| Perform GPU halo exchange, including required setup and data transfers. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define1dRankTopology (const int rank, const int size, gmx_domdec_t *dd) |
| Define 1D rank topology with 4 MPI tasks. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define2dRankTopology (const int rank, const int, gmx_domdec_t *dd) |
| Define 2D rank topology with 4 MPI tasks. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define1dHaloWith1Pulse (const int rank, const int, gmx_domdec_t *dd, std::vector< gmx_domdec_ind_t > *indvec) |
| Define a 1D halo with 1 pulses. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define1dHaloWith2Pulses (const int rank, const int, gmx_domdec_t *dd, std::vector< gmx_domdec_ind_t > *indvec) |
| Define a 1D halo with 2 pulses. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define2dHaloWith1PulseInEachDim (const int rank, const int, gmx_domdec_t *dd, std::vector< gmx_domdec_ind_t > *indvec) |
| Define a 2D halo with 1 pulse in each dimension. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define2dHaloWith2PulsesInDim1 (const int rank, const int, gmx_domdec_t *dd, std::vector< gmx_domdec_ind_t > *indvec) |
| Define a 2D halo with 2 pulses in the first dimension. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::checkResults1dHaloWith1Pulse (const RVec *x, const gmx_domdec_t *dd, const int numHomeAtoms) |
| Check results for above-defined 1D halo with 1 pulse. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::checkResults1dHaloWith2Pulses (const RVec *x, const gmx_domdec_t *dd, const int numHomeAtoms) |
| Check results for above-defined 1D halo with 2 pulses. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::checkResults2dHaloWith1PulseInEachDim (const RVec *x, const gmx_domdec_t *dd, const int numHomeAtoms) |
| Check results for above-defined 2D halo with 1 pulse in each dimension. More... | |
| void | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::checkResults2dHaloWith2PulsesInDim1 (const RVec *x, const gmx_domdec_t *dd, const int numHomeAtoms) |
| Check results for above-defined 2D halo with 2 pulses in the first dimension. More... | |
Variables | |
| static const std::vector < HaloExchangeTestParameters > | gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::c_testSetups |
1.8.5