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

Diff of /trunk-mpi-branch/finley/src/ElementFile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1271 by ksteube, Wed Aug 22 08:55:03 2007 UTC revision 1272 by gross, Fri Aug 24 00:40:43 2007 UTC
# Line 123  void Finley_ElementFile_setElementDistri Line 123  void Finley_ElementFile_setElementDistri
123              local_num_elements=0;              local_num_elements=0;
124              #pragma omp for private(e)              #pragma omp for private(e)
125              for (e=0;e<in->numElements;e++) {              for (e=0;e<in->numElements;e++) {
126                 if (in->numElements == myRank) local_num_elements++;                 if (in->Owner[e] == myRank) local_num_elements++;
127              }              }
128              #pragma omp critical              #pragma omp critical
129              num_elements+=local_num_elements;              num_elements+=local_num_elements;
130           }           }
131           #ifdef PASO_MPI           #ifdef PASO_MPI
132            MPI_Allgather(&num_elements,1,MPI_INT,distribution,1,MPI_INT,in->MPIInfo->comm);             MPI_Allgather(&num_elements,1,MPI_INT,distribution,1,MPI_INT,in->MPIInfo->comm);
133           #else           #else
134             distribution[0]=num_elements;             distribution[0]=num_elements;
135           #endif           #endif
136        } else {        } else {
137          distribution[0]=num_elements;          distribution[0]=in->numElements;
138        }        }
139    }    }
140  }  }

Legend:
Removed from v.1271  
changed lines
  Added in v.1272

  ViewVC Help
Powered by ViewVC 1.1.26