/[escript]/trunk-mpi-branch/finley/src/ElementDistribution_allocTable.c
ViewVC logotype

Contents of /trunk-mpi-branch/finley/src/ElementDistribution_allocTable.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1140 - (show annotations)
Tue May 15 03:23:17 2007 UTC (11 years, 11 months ago) by ksteube
File MIME type: text/plain
File size: 710 byte(s)
MPI branch trunk-mpi-branch has been merged with trunk through revision
1125, so changes in trunk since 1125 are not reflected in
trunk-mpi-branch.

Originally we parallelized revision 989, but after this merge it's
as if we'd parallelized revision 1125.

run_simplesolve.py runs on 1, 2, 4 CPUs.

1
2 #ifdef PASO_MPI
3 #include "Distribution.h"
4
5 /* note that numElementsThis is the number of elements assigned to this process */
6 void Finley_ElementDistribution_allocTable( Finley_ElementDistribution *in, dim_t numElements, dim_t numElementsThis ){
7 index_t i;
8
9 in->numLocal = numElements;
10 in->numBoundary = 0;
11 in->numInternal = 0;
12 in->vtxdist = MEMALLOC(in->MPIInfo->size+1,dim_t);
13 in->vtxdist[0] = 0;
14 if( in->MPIInfo->size>1 )
15 MPI_Allgather( &numElementsThis, 1, MPI_INT, in->vtxdist+1, 1, MPI_INT, in->MPIInfo->comm );
16 else
17 in->vtxdist[1] = numElements;
18 for( i=0; i<in->MPIInfo->size; i++ )
19 in->vtxdist[i+1] += in->vtxdist[i];
20 }
21 #else
22 void Finley_ElementDistribution_allocTable(void){
23 }
24 #endif

  ViewVC Help
Powered by ViewVC 1.1.26