2 * This file is part of the GROMACS molecular simulation package.
4 * This file is part of Gromacs Copyright (c) 1991-2008
5 * David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen.
6 * Copyright (c) 2012,2013, by the GROMACS development team, led by
7 * David van der Spoel, Berk Hess, Erik Lindahl, and including many
8 * others, as listed in the AUTHORS file in the top-level source
9 * directory and at http://www.gromacs.org.
11 * GROMACS is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2.1
14 * of the License, or (at your option) any later version.
16 * GROMACS is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with GROMACS; if not, see
23 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * If you want to redistribute modifications to GROMACS, please
27 * consider that scientific software is very special. Version
28 * control is crucial - bugs must be traceable. We will be happy to
29 * consider code for inclusion in the official distribution, but
30 * derived work must not be called official GROMACS. Details are found
31 * in the README & COPYING files - if they are missing, get the
32 * official version at http://www.gromacs.org.
34 * To help us fund GROMACS development, we humbly ask that you cite
35 * the research papers on the package. Check out http://www.gromacs.org.
38 #ifndef _domdec_network_h
39 #define _domdec_network_h
40 #include "visibility.h"
42 #include "types/commrec.h"
49 dddirForward
, dddirBackward
52 /* Move integers in the comm. region one cell along the domain decomposition
53 * in the dimension indexed by ddimind
54 * forward (direction=dddirFoward) or backward (direction=dddirBackward).
57 dd_sendrecv_int(const gmx_domdec_t
*dd
,
58 int ddimind
, int direction
,
62 /* Move reals in the comm. region one cell along the domain decomposition
63 * in the dimension indexed by ddimind
64 * forward (direction=dddirFoward) or backward (direction=dddirBackward).
67 dd_sendrecv_real(const gmx_domdec_t
*dd
,
68 int ddimind
, int direction
,
70 real
*buf_r
, int n_r
);
72 /* Move revc's in the comm. region one cell along the domain decomposition
73 * in dimension indexed by ddimind
74 * forward (direction=dddirFoward) or backward (direction=dddirBackward).
77 dd_sendrecv_rvec(const gmx_domdec_t
*dd
,
78 int ddimind
, int direction
,
80 rvec
*buf_r
, int n_r
);
83 /* Move revc's in the comm. region one cell along the domain decomposition
84 * in dimension indexed by ddimind
85 * simultaneously in the forward and backward directions.
88 dd_sendrecv2_rvec(const gmx_domdec_t
*dd
,
90 rvec
*buf_s_fw
, int n_s_fw
,
91 rvec
*buf_r_fw
, int n_r_fw
,
92 rvec
*buf_s_bw
, int n_s_bw
,
93 rvec
*buf_r_bw
, int n_r_bw
);
96 /* The functions below perform the same operations as the MPI functions
97 * with the same name appendices, but over the domain decomposition
99 * The DD master node is the master for these operations.
104 dd_bcast(gmx_domdec_t
*dd
, int nbytes
, void *data
);
106 /* Copies src to dest on the master node and then broadcasts */
108 dd_bcastc(gmx_domdec_t
*dd
, int nbytes
, void *src
, void *dest
);
111 dd_scatter(gmx_domdec_t
*dd
, int nbytes
, void *src
, void *dest
);
114 dd_gather(gmx_domdec_t
*dd
, int nbytes
, void *src
, void *dest
);
116 /* If rcount==0, rbuf is allowed to be NULL */
118 dd_scatterv(gmx_domdec_t
*dd
,
119 int *scounts
, int *disps
, void *sbuf
,
120 int rcount
, void *rbuf
);
122 /* If scount==0, sbuf is allowed to be NULL */
124 dd_gatherv(gmx_domdec_t
*dd
,
125 int scount
, void *sbuf
,
126 int *rcounts
, int *disps
, void *rbuf
);
132 #endif /* _domdec_network_h */