/[escript]/trunk/finley/src/NodeDistribution_formCommBuffer.c
ViewVC logotype

Contents of /trunk/finley/src/NodeDistribution_formCommBuffer.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 751 - (show annotations)
Mon Jun 26 01:46:34 2006 UTC (13 years, 2 months ago) by bcumming
File MIME type: text/plain
File size: 803 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 #include "Distribution.h"
2
3 #ifdef PASO_MPI
4
5 void Finley_NodeDistribution_formCommBuffer( Finley_NodeDistribution *in, Paso_CommBuffer *CommBuffer )
6 {
7 index_t *numForward=NULL, *numBackward=NULL;
8 index_t i;
9
10 numForward = MEMALLOC( in->numNeighbours, index_t );
11 numBackward = MEMALLOC( in->numNeighbours, index_t );
12
13 if( Finley_checkPtr(numForward) || Finley_checkPtr(numBackward) )
14 {
15 MEMFREE( numForward );
16 MEMFREE( numBackward );
17 return;
18 }
19
20 for( i=0; i<in->numNeighbours; i++ )
21 {
22 numForward[i] = in->edges[i]->numForward;
23 numBackward[i] = in->edges[i]->numBackward;
24 }
25
26 Paso_CommBuffer_allocTable( CommBuffer, FINLEY_INIT_ITEMSIZE, numForward, numBackward, in->numNeighbours, in->neighbours );
27
28 MEMFREE( numForward );
29 MEMFREE( numBackward );
30 }
31
32 #endif

  ViewVC Help
Powered by ViewVC 1.1.26