added Verlet scheme and NxN non-bonded functionality
[gromacs.git] / include / thread_mpi / mpi_bindings.h
blob4f464f976da469b86a2c3cd3df842611982afa07
1 /*
2 This source code file is part of thread_mpi.
3 Written by Sander Pronk, Erik Lindahl, and possibly others.
5 Copyright (c) 2009, Sander Pronk, Erik Lindahl.
6 All rights reserved.
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are met:
10 1) Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2) Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15 3) Neither the name of the copyright holders nor the
16 names of its contributors may be used to endorse or promote products
17 derived from this software without specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
20 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
23 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 If you want to redistribute modifications, please consider that
31 scientific software is very special. Version control is crucial -
32 bugs must be traceable. We will be happy to consider code for
33 inclusion in the official distribution, but derived work should not
34 be called official thread_mpi. Details are found in the README & COPYING
35 files.
38 #ifndef TMPI_MPI_BINDINGS_H_
39 #define TMPI_MPI_BINDINGS_H_
41 /** \file
42 \brief MPI bindings for thread_mpi/tmpi.h
44 This file contains only macros and redefinitions to expose the standard
45 MPI API with thread_mpi calls.
47 This is different from the API exposed through thread_mpi/tmpi.h, which
48 uses names like \a tMPI_Send() instead of \a MPI_Send()
50 \sa thread_mpi/tmpi.h for documentation of the available data types and
51 functions
52 \sa http://www.mpi-forum.org/docs/docs.html for MPI documentation.
55 #ifndef DOXYGEN
56 #ifdef __cplusplus
57 extern "C"
59 #endif
64 /* The MPI_Comm structure contains the group of processes to communicate
65 with (defines the scope for global operations such as broadcast) */
66 typedef struct tmpi_comm_ *MPI_Comm;
67 /* The group part of the MPI-Comm structure */
68 typedef struct tmpi_group_ *MPI_Group;
69 /* Request structure for holding data about non-blocking transfers */
70 typedef struct tmpi_req_ *MPI_Request;
71 /* status of receives */
72 typedef struct tmpi_status_ MPI_Status;
73 /* data types */
74 typedef struct tmpi_datatype_ *MPI_Datatype;
75 /* reduce operations */
76 typedef tMPI_Op MPI_Op;
79 #define MPI_CHAR TMPI_CHAR
80 #define MPI_SHORT TMPI_SHORT
81 #define MPI_INT TMPI_INT
82 #define MPI_LONG TMPI_LONG
83 #define MPI_LONG_LONG TMPI_LONG_LONG
84 #define MPI_LONG_LONG_INT TMPI_LONG_LONG_INT
85 #define MPI_SIGNED_CHAR TMPI_SIGNED_CHAR
86 #define MPI_UNSIGNED_CHAR TMPI_UNSIGNED_CHAR
87 #define MPI_UNSIGNED_SHORT TMPI_UNSIGNED_SHORT
88 #define MPI_UNSIGNED TMPI_UNSIGNED
89 #define MPI_UNSIGNED_LONG_LONG TMPI_UNSIGNED_LONG_LONG
90 #define MPI_FLOAT TMPI_FLOAT
91 #define MPI_DOUBLE TMPI_DOUBLE
92 #define MPI_LONG_DOUBLE TMPI_LONG_DOUBLE
93 #define MPI_WCHAR TMPI_WCHAR
94 #define MPI_BYTE TMPI_BYTE
98 #define MPI_SUCCESS TMPI_SUCCESS
99 #define MPI_ERR_MALLOC TMPI_ERR_MALLOC
100 #define MPI_ERR_INIT TMPI_ERR_INIT
101 #define MPI_ERR_FINALIZE TMPI_ERR_FINALIZE
102 #define MPI_ERR_GROUP TMPI_ERR_GROUP
103 #define MPI_ERR_COMM TMPI_ERR_COMM
104 #define MPI_ERR_STATUS TMPI_ERR_STATUS
105 #define MPI_ERR_GROUP_RANK TMPI_ERR_GROUP_RANK
106 #define MPI_ERR_DIMS TMPI_ERR_DIMS
107 #define MPI_ERR_COORDS TMPI_ERR_COORDS
108 #define MPI_ERR_CART_CREATE_NPROCS TMPI_ERR_CART_CREATE_NPROCS
109 #define MPI_ERR_XFER_COUNTERPART TMPI_ERR_XFER_COUNTERPART
110 #define MPI_ERR_XFER_BUFSIZE TMPI_ERR_XFER_BUFSIZE
111 #define MPI_ERR_XFER_BUF_OVERLAP TMPI_ERR_XFER_BUF_OVERLAP
112 #define MPI_ERR_SEND_DEST TMPI_ERR_SEND_DEST
113 #define MPI_ERR_RECV_SRC TMPI_ERR_RECV_SRC
114 #define MPI_ERR_BUF TMPI_ERR_BUF
115 #define MPI_ERR_MULTI_MISMATCH TMPI_ERR_MULTI_MISMATCH
116 #define MPI_ERR_OP_FN TMPI_ERR_OP_FN
117 #define MPI_ERR_ENVELOPES TMPI_ERR_ENVELOPES
118 #define MPI_ERR_REQUESTS TMPI_ERR_REQUESTS
119 #define MPI_ERR_IN_STATUS TMPI_ERR_IN_STATUS
120 #define MPI_FAILURE TMPI_FAILURE
121 #define MPI_ERR_UNKNOWN TMPI_ERR_UNKNOWN
122 #define N_MPI_ERR N_TMPI_ERR
124 #define MPI_MAX_ERROR_STRING TMPI_MAX_ERROR_STRING
125 #define MPI_UNDEFINED TMPI_UNDEFINED
128 #define MPI_Errhandler_fn tMPI_Errhandler_fn
129 #define MPI_Errhandler tMPI_Errhandler
130 #define MPI_ERRORS_ARE_FATAL TMPI_ERRORS_ARE_FATAL
131 #define MPI_ERRORS_RETURN TMPI_ERRORS_RETURN
135 /* miscelaneous defines */
136 #define MPI_ANY_SOURCE TMPI_ANY_SOURCE
137 #define MPI_ANY_TAG TMPI_ANY_TAG
139 /* comm_compare defines */
140 #define MPI_IDENT TMPI_IDENT
141 #define MPI_CONGRUENT TMPI_CONGRUENT
142 #define MPI_SIMILAR TMPI_SIMILAR
143 #define MPI_UNEQUAL TMPI_UNEQUAL
146 /* topology test defines */
147 #define MPI_CART TMPI_CART
148 #define MPI_GRAPH TMPI_GRAPH
151 #define MPI_COMM_WORLD TMPI_COMM_WORLD
152 #define MPI_COMM_NULL TMPI_COMM_NULL
155 #define MPI_GROUP_NULL TMPI_GROUP_NULL
156 #define MPI_GROUP_EMPTY TMPI_GROUP_EMPTY
158 #define MPI_MAX_PROCESSOR_NAME TMPI_MAX_PROCESSOR_NAME
161 /* MPI status */
162 #define MPI_STATUS_IGNORE TMPI_STATUS_IGNORE
163 #define MPI_STATUSES_IGNORE TMPI_STATUSES_IGNORE
165 #define MPI_SOURCE TMPI_SOURCE
166 #define MPI_TAG TMPI_TAG
167 #define MPI_ERROR TMPI_ERROR
169 #define mpi_status_ tmpi_status_
171 #define MPI_REQUEST_NULL TMPI_REQUEST_NULL
173 #define MPI_IN_PLACE TMPI_IN_PLACE
177 #define MPI_MAX TMPI_MAX
178 #define MPI_MIN TMPI_MIN
179 #define MPI_SUM TMPI_SUM
180 #define MPI_PROD TMPI_PROD
181 #define MPI_LAND TMPI_LAND
182 #define MPI_BAND TMPI_BAND
183 #define MPI_LOR TMPI_LOR
184 #define MPI_BOR TMPI_BOR
185 #define MPI_LXOR TMPI_LXOR
186 #define MPI_BXOR TMPI_BXOR
188 /* the functions: */
189 #define MPI_Init tMPI_Init
190 #define MPI_Finalize tMPI_Finalize
191 #define MPI_Abort tMPI_Abort
192 #define MPI_Initialized tMPI_Initialized
193 #define MPI_Finalized tMPI_Finalized
195 #define MPI_Create_errhandler tMPI_Create_errhandler
196 #define MPI_Errhandler_free tMPI_Errhandler_free
197 #define MPI_Comm_set_errhandler tMPI_Comm_set_errhandler
198 #define MPI_Comm_get_errhandler tMPI_Comm_get_errhandler
199 #define MPI_Error_string tMPI_Error_string
201 #define MPI_Get_processor_name tMPI_Get_processor_name
202 #define MPI_Wtime tMPI_Wtime
204 #define MPI_Group_size tMPI_Group_size
205 #define MPI_Group_rank tMPI_Group_rank
206 #define MPI_Group_incl tMPI_Group_incl
207 #define MPI_Comm_group tMPI_Comm_group
208 #define MPI_Group_free tMPI_Group_free
210 #define MPI_Comm_size tMPI_Comm_size
211 #define MPI_Comm_rank tMPI_Comm_rank
212 #define MPI_Comm_compare tMPI_Comm_compare
213 #define MPI_Comm_free tMPI_Comm_free
214 #define MPI_Comm_create tMPI_Comm_create
215 #define MPI_Comm_split tMPI_Comm_split
216 #define MPI_Comm_dup tMPI_Comm_dup
218 #define MPI_Topo_test tMPI_Topo_test
219 #define MPI_Cartdim_get tMPI_Cartdim_get
220 #define MPI_Cart_get tMPI_Cart_get
221 #define MPI_Cart_rank tMPI_Cart_rank
222 #define MPI_Cart_coords tMPI_Cart_coords
223 #define MPI_Cart_map tMPI_Cart_map
224 #define MPI_Cart_create tMPI_Cart_create
225 #define MPI_Cart_sub tMPI_Cart_sub
227 #define MPI_Type_contiguous tMPI_Type_contiguous
228 #define MPI_Type_commit tMPI_Type_commit
230 #define MPI_Send tMPI_Send
231 #define MPI_Recv tMPI_Recv
232 #define MPI_Sendrecv tMPI_Sendrecv
233 #define MPI_Get_count tMPI_Get_count
235 #define MPI_Isend tMPI_Isend
236 #define MPI_Irecv tMPI_Irecv
237 #define MPI_Test tMPI_Test
238 #define MPI_Wait tMPI_Wait
239 #define MPI_Waitall tMPI_Waitall
241 #define MPI_Barrier tMPI_Barrier
243 #define MPI_Bcast tMPI_Bcast
245 #define MPI_Gather tMPI_Gather
246 #define MPI_Gatherv tMPI_Gatherv
247 #define MPI_Scatter tMPI_Scatter
248 #define MPI_Scatterv tMPI_Scatterv
249 #define MPI_Alltoall tMPI_Alltoall
250 #define MPI_Alltoallv tMPI_Alltoallv
253 #define MPI_Reduce tMPI_Reduce
254 #define MPI_Allreduce tMPI_Allreduce
255 #define MPI_Scan tMPI_Scan
257 #ifdef __cplusplus
258 } /* closing extern "C" */
259 #endif
261 #endif
263 #endif /* TMPI_MPI_BINDINGS_H_ */