/[escript]/trunk/paso/src/CommBuffer.h
ViewVC logotype

Contents of /trunk/paso/src/CommBuffer.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 751 - (show annotations)
Mon Jun 26 01:46:34 2006 UTC (12 years, 10 months ago) by bcumming
File MIME type: text/plain
File size: 2160 byte(s)
Changes relating to the MPI version of escript
The standard OpenMP version of escript is unchanged

- updated data types (Finley_Mesh, Finley_NodeFile, etc) to store meshes
  over multiple MPI processes.
- added CommBuffer code in Paso for communication of Data associated
  with distributed meshes
- updates in Finley and Escript to support distributed data and operations
  on distributed data (such as interpolation).
- construction of RHS in MPI, so that simple explicit schemes (such as
  /docs/examples/wave.py without IO and the Locator) can run in MPI.
- updated mesh generation for first order line, rectangle and brick
  meshes and second order line meshes in MPI.        
- small changes to trunk/SConstruct and trunk/scons/ess_options.py to
  build the MPI version, these changes are turned off by default.

1 #ifndef INC_COMMBUFFER
2 #define INC_COMMBUFFER
3
4 #include "Paso.h"
5
6 #ifdef PASO_MPI
7
8 #define TRACE_COMMBUFFER
9
10 /***********************************
11 * TYPE DEFINITIONS
12 ***********************************/
13
14 /* buffer for communication */
15 typedef struct Paso_CommBuffer
16 {
17 Paso_MPIInfo *MPIInfo;
18 index_t reference_counter;
19
20 void **bufferForward;
21 void **bufferBackward;
22 dim_t *numForward;
23 dim_t *numBackward;
24 size_t maxItemSize;
25 dim_t *requestedRecvLength;
26
27 /* the source/target domains for the buffer */
28 dim_t numDomains;
29 index_t *domains;
30 index_t *indexDomains;
31
32 MPI_Status *statusForward;
33 MPI_Request *requestForward;
34 MPI_Status *statusBackward;
35 MPI_Request *requestBackward;
36
37 int tag; /* tag used for sends a receives for this buffer */
38 } Paso_CommBuffer;
39
40
41
42 /***********************************
43 * PROTOTYPES
44 ***********************************/
45
46 Paso_CommBuffer* Paso_CommBuffer_alloc( Paso_MPIInfo *MPIInfo, int tag );
47 Paso_CommBuffer* Paso_CommBuffer_getReference( Paso_CommBuffer *in );
48 void Paso_CommBuffer_dealloc( Paso_CommBuffer *in );
49 void Paso_CommBuffer_allocTable( Paso_CommBuffer *in, size_t itemSize, index_t *numForward, index_t *numBackward, dim_t numDomains, index_t *domains );
50 bool_t Paso_CommBuffer_recv( Paso_CommBuffer *in, index_t dom, size_t itemSize );
51 bool_t Paso_CommBuffer_recvAny( Paso_CommBuffer *in, index_t *dom, size_t itemSize );
52 bool_t Paso_CommBuffer_send( Paso_CommBuffer *in, index_t dom, size_t itemSize );
53 bool_t Paso_CommBuffer_waitSendPending( Paso_CommBuffer *in );
54 bool_t Paso_CommBuffer_waitSend( Paso_CommBuffer *in, index_t dom );
55 bool_t Paso_CommBuffer_waitRecvPending( Paso_CommBuffer *in );
56 bool_t Paso_CommBuffer_waitRecv( Paso_CommBuffer *in, index_t dom );
57 void* Paso_CommBuffer_getBufferForward( Paso_CommBuffer *in, index_t dom );
58 void Paso_CommBuffer_pack( Paso_CommBuffer *in, index_t dom, index_t *index, void *data, size_t itemSize, dim_t offset );
59 void Paso_CommBuffer_unpack( Paso_CommBuffer *in, index_t dom, index_t *index, void *data, size_t itemSize, dim_t offset );
60 bool_t Paso_CommBuffer_validate( Paso_CommBuffer *in );
61
62 #endif
63
64 #endif

  ViewVC Help
Powered by ViewVC 1.1.26