AdjoinableMPI
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
modified.h
Go to the documentation of this file.
1 /*
2 ##########################################################
3 # This file is part of the AdjoinableMPI library #
4 # released under the MIT License. #
5 # The full COPYRIGHT notice can be found in the top #
6 # level directory of the AdjoinableMPI distribution. #
7 ##########################################################
8 */
9 #ifndef _AMPI_MODIFIED_H_
10 #define _AMPI_MODIFIED_H_
11 
18 #include "ampi/userIF/pairedWith.h"
19 #include "ampi/userIF/request.h"
20 #include "ampi/userIF/window.h"
21 
25 extern MPI_Datatype AMPI_ADOUBLE;
26 
33 typedef struct {
34  int size;
35  int preAlloc;
37  /* displacements of first/last active blocks */
39  MPI_Aint* last_active_blocks;
40  /* need to know last active block length to find last active element */
42  MPI_Datatype* derived_types;
43  int* counts;
46  MPI_Datatype** arrays_of_types;
47  MPI_Aint* lbs;
48  MPI_Aint* extents;
49  /* corresponding typemaps packed for sending */
50  MPI_Datatype* packed_types;
53  MPI_Datatype** arrays_of_p_types;
54  MPI_Aint* p_extents;
56 
62 
67 void releaseDTypeData();
89  int count,
90  int array_of_blocklengths[],
91  MPI_Aint array_of_displacements[],
92  MPI_Datatype array_of_types[],
93  MPI_Aint lower_bound,
94  MPI_Aint extent,
95  int array_of_p_blocklengths[],
96  MPI_Aint array_of_p_displacements[],
97  MPI_Datatype array_of_p_types[],
98  MPI_Aint p_extent,
99  MPI_Datatype* newtype,
100  MPI_Datatype* packed_type);
101 int derivedTypeIdx(MPI_Datatype datatype);
107 int isDerivedType(int dt_idx);
108 
115 typedef struct {
116  int size;
117  int preAlloc;
118  MPI_Op* ops;
119  MPI_User_function** functions;
120  int* commutes;
122 
128 
139 void addUOpData(userDefinedOpData* dat,
140  MPI_Op* op,
141  MPI_User_function* function,
142  int commute);
148 int userDefinedOpIdx(MPI_Op op);
154 int isUserDefinedOp(int uop_idx);
158 void releaseUOpData();
159 
167 extern MPI_Datatype AMPI_ADOUBLE;
168 
172 extern MPI_Datatype AMPI_AFLOAT;
173 
174 #ifdef AMPI_FORTRANCOMPATIBLE
175 
179 extern MPI_Datatype AMPI_ADOUBLE_PRECISION;
180 
184 extern MPI_Datatype AMPI_AREAL;
185 
186 #endif
187 
191 int AMPI_Init(int* argc,
192  char*** argv);
193 
197 int AMPI_Finalize(int* argc,
198  char*** argv);
199 
203 int AMPI_Buffer_attach(void *buffer,
204  int size);
205 
209 int AMPI_Buffer_detach(void *buffer,
210  int *size);
211 
223 int AMPI_Send(void* buf,
224  int count,
225  MPI_Datatype datatype,
226  int dest,
227  int tag,
228  AMPI_PairedWith pairedWith,
229  MPI_Comm comm);
230 
243 int AMPI_Recv(void* buf,
244  int count,
245  MPI_Datatype datatype,
246  int src,
247  int tag,
248  AMPI_PairedWith pairedWith,
249  MPI_Comm comm,
250  MPI_Status* status);
251 
264 int AMPI_Isend (void* buf,
265  int count,
266  MPI_Datatype datatype,
267  int dest,
268  int tag,
269  AMPI_PairedWith pairedWith,
270  MPI_Comm comm,
271  AMPI_Request* request);
272 
285 int AMPI_Irecv (void* buf,
286  int count,
287  MPI_Datatype datatype,
288  int src,
289  int tag,
290  AMPI_PairedWith pairedWith,
291  MPI_Comm comm,
292  AMPI_Request* request);
293 
305 int AMPI_Bsend(void *buf,
306  int count,
307  MPI_Datatype datatype,
308  int dest,
309  int tag,
310  AMPI_PairedWith pairedWith,
311  MPI_Comm comm);
312 
324 int AMPI_Rsend(void *buf,
325  int count,
326  MPI_Datatype datatype,
327  int dest,
328  int tag,
329  AMPI_PairedWith pairedWith,
330  MPI_Comm comm);
331 
341 int AMPI_Bcast (void* buf,
342  int count,
343  MPI_Datatype datatype,
344  int root,
345  MPI_Comm comm);
346 
358 int AMPI_Reduce (void* sbuf,
359  void* rbuf,
360  int count,
361  MPI_Datatype datatype,
362  MPI_Op op,
363  int root,
364  MPI_Comm comm);
365 
376 int AMPI_Allreduce (void* sbuf,
377  void* rbuf,
378  int count,
379  MPI_Datatype datatype,
380  MPI_Op op,
381  MPI_Comm comm);
382 
383 
387 int AMPI_Wait(AMPI_Request *request,
388  MPI_Status *status);
389 
397 int AMPI_Waitall (int count,
398  AMPI_Request requests[],
399  MPI_Status statuses[]);
400 
407 int AMPI_Awaitall (int count,
408  AMPI_Request requests[],
409  MPI_Status statuses[]);
410 
416 int AMPI_Barrier(MPI_Comm comm);
417 
430 int AMPI_Gather(void *sendbuf,
431  int sendcnt,
432  MPI_Datatype sendtype,
433  void *recvbuf,
434  int recvcnt,
435  MPI_Datatype recvtype,
436  int root,
437  MPI_Comm comm);
438 
451 int AMPI_Scatter(void *sendbuf,
452  int sendcnt,
453  MPI_Datatype sendtype,
454  void *recvbuf,
455  int recvcnt,
456  MPI_Datatype recvtype,
457  int root,
458  MPI_Comm comm);
459 
471 int AMPI_Allgather(void *sendbuf,
472  int sendcount,
473  MPI_Datatype sendtype,
474  void *recvbuf,
475  int recvcount,
476  MPI_Datatype recvtype,
477  MPI_Comm comm);
478 
492 int AMPI_Gatherv(void *sendbuf,
493  int sendcnt,
494  MPI_Datatype sendtype,
495  void *recvbuf,
496  int *recvcnts,
497  int *displs,
498  MPI_Datatype recvtype,
499  int root,
500  MPI_Comm comm);
501 
515 int AMPI_Scatterv(void *sendbuf,
516  int *sendcnts,
517  int *displs,
518  MPI_Datatype sendtype,
519  void *recvbuf,
520  int recvcnt,
521  MPI_Datatype recvtype,
522  int root, MPI_Comm comm);
523 
536 int AMPI_Allgatherv(void *sendbuf,
537  int sendcnt,
538  MPI_Datatype sendtype,
539  void *recvbuf,
540  int *recvcnts,
541  int *displs,
542  MPI_Datatype recvtype,
543  MPI_Comm comm);
544 
556 int AMPI_Win_create( void *base,
557  MPI_Aint size,
558  int disp_unit,
559  MPI_Info info,
560  MPI_Comm comm,
561  AMPI_Win *win );
562 
570 int AMPI_Win_fence( int assert,
571  AMPI_Win win );
572 
579 int AMPI_Win_free( AMPI_Win *win );
580 
594 int AMPI_Get( void *origin_addr,
595  int origin_count,
596  MPI_Datatype origin_datatype,
597  int target_rank,
598  MPI_Aint target_disp,
599  int target_count,
600  MPI_Datatype target_datatype,
601  AMPI_Win win );
602 
616 int AMPI_Put( void *origin_addr,
617  int origin_count,
618  MPI_Datatype origin_datatype,
619  int target_rank,
620  MPI_Aint target_disp,
621  int target_count,
622  MPI_Datatype target_datatype,
623  AMPI_Win win );
624 
625 #endif