fixed gmxGenerateVersionInfo.cmake to produce 8 digit date when the day is only 1...
[gromacs/qmmm-gamess-us.git] / include / domdec_network.h
blobd004b96d4c87aa35b4866587f9905b80ba69da3a
1 /* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*-
3 *
4 * This file is part of Gromacs Copyright (c) 1991-2008
5 * David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * To help us fund GROMACS development, we humbly ask that you cite
13 * the research papers on the package. Check out http://www.gromacs.org
15 * And Hey:
16 * Gnomes, ROck Monsters And Chili Sauce
19 #ifdef HAVE_CONFIG_H
20 #include <config.h>
21 #endif
23 #ifndef _domdec_network_h
24 #define _domdec_network_h
26 #include "typedefs.h"
28 #ifdef GMX_LIB_MPI
29 #include <mpi.h>
30 #endif
31 #ifdef GMX_THREADS
32 #include "tmpi.h"
33 #endif
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 enum {
40 dddirForward,dddirBackward
43 /* Move integers in the comm. region one cell along the domain decomposition
44 * in the dimension indexed by ddimind
45 * forward (direction=dddirFoward) or backward (direction=dddirBackward).
47 extern void
48 dd_sendrecv_int(const gmx_domdec_t *dd,
49 int ddimind,int direction,
50 int *buf_s,int n_s,
51 int *buf_r,int n_r);
53 /* Move reals in the comm. region one cell along the domain decomposition
54 * in the dimension indexed by ddimind
55 * forward (direction=dddirFoward) or backward (direction=dddirBackward).
57 extern void
58 dd_sendrecv_real(const gmx_domdec_t *dd,
59 int ddimind,int direction,
60 real *buf_s,int n_s,
61 real *buf_r,int n_r);
63 /* Move revc's in the comm. region one cell along the domain decomposition
64 * in dimension indexed by ddimind
65 * forward (direction=dddirFoward) or backward (direction=dddirBackward).
67 extern void
68 dd_sendrecv_rvec(const gmx_domdec_t *dd,
69 int ddimind,int direction,
70 rvec *buf_s,int n_s,
71 rvec *buf_r,int n_r);
74 /* Move revc's in the comm. region one cell along the domain decomposition
75 * in dimension indexed by ddimind
76 * simultaneously in the forward and backward directions.
78 extern void
79 dd_sendrecv2_rvec(const gmx_domdec_t *dd,
80 int ddimind,
81 rvec *buf_s_fw,int n_s_fw,
82 rvec *buf_r_fw,int n_r_fw,
83 rvec *buf_s_bw,int n_s_bw,
84 rvec *buf_r_bw,int n_r_bw);
87 /* The functions below perform the same operations as the MPI functions
88 * with the same name appendices, but over the domain decomposition
89 * nodes only.
90 * The DD master node is the master for these operations.
93 extern void
94 dd_bcast(gmx_domdec_t *dd,int nbytes,void *data);
96 /* Copies src to dest on the master node and then broadcasts */
97 extern void
98 dd_bcastc(gmx_domdec_t *dd,int nbytes,void *src,void *dest);
100 extern void
101 dd_scatter(gmx_domdec_t *dd,int nbytes,void *src,void *dest);
103 extern void
104 dd_gather(gmx_domdec_t *dd,int nbytes,void *src,void *dest);
106 extern void
107 dd_scatterv(gmx_domdec_t *dd,
108 int *scounts,int *disps,void *sbuf,
109 int rcount,void *rbuf);
111 extern void
112 dd_gatherv(gmx_domdec_t *dd,
113 int scount,void *sbuf,
114 int *rcounts,int *disps,void *rbuf);
116 #ifdef __cplusplus
118 #endif
120 #endif /* _domdec_network_h */