/[escript]/trunk/paso/src/Coupler.c
ViewVC logotype

Diff of /trunk/paso/src/Coupler.c

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

revision 1553 by gross, Thu May 8 09:38:07 2008 UTC revision 1556 by gross, Mon May 12 00:54:58 2008 UTC
# Line 194  void Paso_Coupler_startCollect(Paso_Coup Line 194  void Paso_Coupler_startCollect(Paso_Coup
194    dim_t i,j;    dim_t i,j;
195    if ( mpi_info->size>1) {    if ( mpi_info->size>1) {
196       /* start reveiving input */       /* start reveiving input */
      #pragma omp master  
197       {       {
198          for (i=0; i< coupler->connector->recv->numNeighbors; ++i) {          for (i=0; i< coupler->connector->recv->numNeighbors; ++i) {
199              #ifdef PASO_MPI              #ifdef PASO_MPI
# Line 215  void Paso_Coupler_startCollect(Paso_Coup Line 214  void Paso_Coupler_startCollect(Paso_Coup
214          memcpy(&(coupler->send_buffer[(block_size)*i]),&(in[ block_size * coupler->connector->send->shared[i]]), block_size_size);          memcpy(&(coupler->send_buffer[(block_size)*i]),&(in[ block_size * coupler->connector->send->shared[i]]), block_size_size);
215       }       }
216       /* send buffer out */       /* send buffer out */
      #pragma omp master  
217       {       {
218          for (i=0; i< coupler->connector->send->numNeighbors; ++i) {          for (i=0; i< coupler->connector->send->numNeighbors; ++i) {
219               #ifdef PASO_MPI               #ifdef PASO_MPI
# Line 238  double* Paso_Coupler_finishCollect(Paso_ Line 236  double* Paso_Coupler_finishCollect(Paso_
236    Paso_MPIInfo *mpi_info = coupler->mpi_info;      Paso_MPIInfo *mpi_info = coupler->mpi_info;  
237    if ( mpi_info->size>1) {    if ( mpi_info->size>1) {
238       /* wait for receive */       /* wait for receive */
      #pragma omp master  
      {  
239          #ifdef PASO_MPI          #ifdef PASO_MPI
240          MPI_Waitall(coupler->connector->recv->numNeighbors+coupler->connector->send->numNeighbors,          MPI_Waitall(coupler->connector->recv->numNeighbors+coupler->connector->send->numNeighbors,
241                      coupler->mpi_requests,                      coupler->mpi_requests,
242                      coupler->mpi_stati);                      coupler->mpi_stati);
243          #endif          #endif
      }  
244    }    }
245    return coupler->recv_buffer;    return coupler->recv_buffer;
246  }  }

Legend:
Removed from v.1553  
changed lines
  Added in v.1556

  ViewVC Help
Powered by ViewVC 1.1.26