Gromacs  2024.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
#include "gmxpre.h"
#include "domdec_network.h"
#include "config.h"
#include <cstring>
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/utility/gmxmpi.h"
#include "domdec_internal.h"
+ Include dependency graph for domdec_network.cpp:

Description

This file defines functions for (mostly) the domdec module to use MPI functionality.

Author
Berk Hess hess@.nosp@m.kth..nosp@m.se

Macros

#define DDMAINRANK(dd)   ((dd)->mainrank)
 Returns the MPI rank of the domain decomposition main rank.
 

Functions

template<typename T >
static void ddSendrecv (const struct gmx_domdec_t *dd, int ddDimensionIndex, int direction, T *sendBuffer, int numElementsToSend, T *receiveBuffer, int numElementsToReceive)
 Move data of type T in the communication region one cell along the domain decomposition. More...
 
template<typename T >
void ddSendrecv (const gmx_domdec_t *dd, int ddDimensionIndex, int direction, gmx::ArrayRef< T > sendBuffer, gmx::ArrayRef< T > receiveBuffer)
 Move a view of T values in the communication region one cell along the domain decomposition. More...
 
template void ddSendrecv (const gmx_domdec_t *, int, int, gmx::ArrayRef< int >, gmx::ArrayRef< int >)
 Specialization of extern template for int.
 
template void ddSendrecv (const gmx_domdec_t *, int, int, gmx::ArrayRef< real >, gmx::ArrayRef< real >)
 Specialization of extern template for real.
 
template void ddSendrecv (const gmx_domdec_t *, int, int, gmx::ArrayRef< gmx::RVec >, gmx::ArrayRef< gmx::RVec >)
 Specialization of extern template for gmx::RVec.
 
void dd_sendrecv2_rvec (const struct gmx_domdec_t gmx_unused *dd, int gmx_unused ddimind, rvec gmx_unused *buf_s_fw, int gmx_unused n_s_fw, rvec gmx_unused *buf_r_fw, int gmx_unused n_r_fw, rvec gmx_unused *buf_s_bw, int gmx_unused n_s_bw, rvec gmx_unused *buf_r_bw, int gmx_unused n_r_bw)
 
void dd_bcast (const gmx_domdec_t gmx_unused *dd, int gmx_unused nbytes, void gmx_unused *data)
 
void dd_scatter (const gmx_domdec_t gmx_unused *dd, int gmx_unused nbytes, const void gmx_unused *src, void *dest)
 
void dd_gather (const gmx_domdec_t gmx_unused *dd, int gmx_unused nbytes, const void gmx_unused *src, void gmx_unused *dest)
 
template<typename T >
void dd_scatterv (const gmx_domdec_t gmx_unused *dd, gmx::ArrayRef< const int > gmx_unused scounts, gmx::ArrayRef< const int > gmx_unused disps, const T *sbuf, int rcount, T *rbuf)
 
template void dd_scatterv (const gmx_domdec_t *dd, gmx::ArrayRef< const int > scounts, gmx::ArrayRef< const int > disps, const int *sbuf, int rcount, int *rbuf)
 
template void dd_scatterv (const gmx_domdec_t *dd, gmx::ArrayRef< const int > scounts, gmx::ArrayRef< const int > disps, const gmx::RVec *sbuf, int rcount, gmx::RVec *rbuf)
 
template<typename T >
void dd_gatherv (const gmx_domdec_t gmx_unused *dd, int gmx_unused scount, const T gmx_unused *sbuf, gmx::ArrayRef< const int > gmx_unused rcounts, gmx::ArrayRef< const int > gmx_unused disps, T gmx_unused *rbuf)
 
template void dd_gatherv (const gmx_domdec_t *dd, int scount, const int *sbuf, gmx::ArrayRef< const int > rcounts, gmx::ArrayRef< const int > disps, int *rbuf)
 
template void dd_gatherv (const gmx_domdec_t *dd, int scount, const gmx::RVec *sbuf, gmx::ArrayRef< const int > rcounts, gmx::ArrayRef< const int > disps, gmx::RVec *rbuf)
 

Function Documentation

template<typename T >
static void ddSendrecv ( const struct gmx_domdec_t *  dd,
int  ddDimensionIndex,
int  direction,
T *  sendBuffer,
int  numElementsToSend,
T *  receiveBuffer,
int  numElementsToReceive 
)
static

Move data of type T in the communication region one cell along the domain decomposition.

Moves in the dimension indexed by ddDimensionIndex, either forward (direction=dddirFoward) or backward (direction=dddirBackward).

template<typename T >
void ddSendrecv ( const gmx_domdec_t *  dd,
int  ddDimensionIndex,
int  direction,
gmx::ArrayRef< T >  sendBuffer,
gmx::ArrayRef< T >  receiveBuffer 
)

Move a view of T values in the communication region one cell along the domain decomposition.

Moves in the dimension indexed by ddDimensionIndex, either forward (direction=dddirFoward) or backward (direction=dddirBackward).