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

Functions

float 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 initHaloData (RVec *x, const int numHomeAtoms, const int numAtomsTotal)
 Initialize halo array. More...
 
void 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 define1dRankTopology (gmx_domdec_t *dd)
 Define 1D rank topology with 4 MPI tasks. More...
 
void define2dRankTopology (gmx_domdec_t *dd)
 Define 2D rank topology with 4 MPI tasks. More...
 
void define1dHaloWith1Pulse (gmx_domdec_t *dd, std::vector< gmx_domdec_ind_t > *indvec)
 Define a 1D halo with 1 pulses. More...
 
void define1dHaloWith2Pulses (gmx_domdec_t *dd, std::vector< gmx_domdec_ind_t > *indvec)
 Define a 1D halo with 2 pulses. More...
 
void define2dHaloWith1PulseInEachDim (gmx_domdec_t *dd, std::vector< gmx_domdec_ind_t > *indvec)
 Define a 2D halo with 1 pulse in each dimension. More...
 
void define2dHaloWith2PulsesInDim1 (gmx_domdec_t *dd, std::vector< gmx_domdec_ind_t > *indvec)
 Define a 2D halo with 2 pulses in the first dimension. More...
 
void checkResults1dHaloWith1Pulse (const RVec *x, const gmx_domdec_t *dd, const int numHomeAtoms)
 Check results for above-defined 1D halo with 1 pulse. More...
 
void checkResults1dHaloWith2Pulses (const RVec *x, const gmx_domdec_t *dd, const int numHomeAtoms)
 Check results for above-defined 1D halo with 2 pulses. More...
 
void 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 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...
 

Function Documentation

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.

Parameters
[in]xAtom coordinate data array
[in]ddDomain decomposition object
[in]numHomeAtomsNumber of home atoms
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.

Parameters
[in]xAtom coordinate data array
[in]ddDomain decomposition object
[in]numHomeAtomsNumber of home atoms
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.

Parameters
[in]xAtom coordinate data array
[in]ddDomain decomposition object
[in]numHomeAtomsNumber of home atoms
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.

Parameters
[in]xAtom coordinate data array
[in]ddDomain decomposition object
[in]numHomeAtomsNumber of home atoms
void gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define1dHaloWith1Pulse ( gmx_domdec_t *  dd,
std::vector< gmx_domdec_ind_t > *  indvec 
)

Define a 1D halo with 1 pulses.

Parameters
[in]ddDomain decomposition object
[in]indvecVector of index vectors
void gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define1dHaloWith2Pulses ( gmx_domdec_t *  dd,
std::vector< gmx_domdec_ind_t > *  indvec 
)

Define a 1D halo with 2 pulses.

Parameters
[in]ddDomain decomposition object
[in]indvecVector of index vectors
void gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define1dRankTopology ( gmx_domdec_t *  dd)

Define 1D rank topology with 4 MPI tasks.

Parameters
[in]ddDomain decomposition object
void gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define2dHaloWith1PulseInEachDim ( gmx_domdec_t *  dd,
std::vector< gmx_domdec_ind_t > *  indvec 
)

Define a 2D halo with 1 pulse in each dimension.

Parameters
[in]ddDomain decomposition object
[in]indvecVector of index vectors
void gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define2dHaloWith2PulsesInDim1 ( gmx_domdec_t *  dd,
std::vector< gmx_domdec_ind_t > *  indvec 
)

Define a 2D halo with 2 pulses in the first dimension.

Parameters
[in]ddDomain decomposition object
[in]indvecVector of index vectors
void gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::define2dRankTopology ( gmx_domdec_t *  dd)

Define 2D rank topology with 4 MPI tasks.


| 2 3 |

| 0 1 |

Parameters
[in]ddDomain decomposition object
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.

Parameters
[in]sendRankMPI rank of sender
[in]atomNumberAtom number
[in]spatial3dIndexSpatial 3D Index
Returns
Encoded value
void 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.

Parameters
[in]ddDomain decomposition object
[in]boxBox matrix
[in]h_xAtom coordinate data array on host
[in]numAtomsTotalTotal number of atoms, including halo
void gmx::test::anonymous_namespace{haloexchange_mpi.cpp}::initHaloData ( RVec *  x,
const int  numHomeAtoms,
const int  numAtomsTotal 
)

Initialize halo array.

Parameters
[in]xAtom coordinate data array
[in]numHomeAtomsNumber of home atoms
[in]numAtomsTotalTotal number of atoms, including halo