~vcs-imports/escript-finley/trunk

« back to all changes in this revision

Viewing changes to finley/src/Mesh_optimizeDOFLabeling.c

  • Committer: jfenwick
  • Date: 2010-10-11 01:48:14 UTC
  • Revision ID: svn-v4:77569008-7704-0410-b7a0-a92fef0b09fd:trunk:3259
Merging dudley and scons updates from branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
     register index_t k;
30
30
     dim_t mpiSize, myNumVertices,len, p, i;
31
31
     Paso_Pattern *pattern=NULL;
32
 
     Paso_MPI_rank myRank,dest,source,current_rank;
 
32
     Esys_MPI_rank myRank,dest,source,current_rank;
33
33
     Finley_IndexList* index_list=NULL;
34
 
     #ifdef PASO_MPI
 
34
     #ifdef ESYS_MPI
35
35
     MPI_Status status;
36
36
     #endif
37
37
 
84
84
 
85
85
           Paso_Pattern_free(pattern);
86
86
      }
87
 
      Paso_MPIInfo_noError(in->MPIInfo);
 
87
      Esys_MPIInfo_noError(in->MPIInfo);
88
88
      if (Finley_noError()) {
89
89
              /* shift new labeling to create a global id */
90
90
              #pragma omp parallel for private(i)
92
92
 
93
93
 
94
94
              /* distribute new labeling to other processors */
95
 
              dest=Paso_MPIInfo_mod(mpiSize, myRank + 1);
96
 
              source=Paso_MPIInfo_mod(mpiSize, myRank - 1);
 
95
              dest=Esys_MPIInfo_mod(mpiSize, myRank + 1);
 
96
              source=Esys_MPIInfo_mod(mpiSize, myRank - 1);
97
97
              current_rank=myRank;
98
98
              for (p=0; p< mpiSize; ++p) {
99
99
                  firstVertex=distribution[current_rank];
107
107
                  }
108
108
   
109
109
                  if (p<mpiSize-1) {  /* the final send can be skipped */
110
 
                     #ifdef PASO_MPI
 
110
                     #ifdef ESYS_MPI
111
111
                     MPI_Sendrecv_replace(newGlobalDOFID,len, MPI_INT,
112
112
                                          dest, in->MPIInfo->msg_tag_counter,
113
113
                                          source, in->MPIInfo->msg_tag_counter,
114
114
                                          in->MPIInfo->comm,&status);
115
115
                     #endif
116
116
                     in->MPIInfo->msg_tag_counter++;
117
 
                     current_rank=Paso_MPIInfo_mod(mpiSize, current_rank-1);
 
117
                     current_rank=Esys_MPIInfo_mod(mpiSize, current_rank-1);
118
118
                 }
119
119
              }
120
120
     }