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

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

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

revision 3258 by gross, Thu Sep 2 07:26:43 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 225  void Paso_LinearCombination(const dim_t Line 225  void Paso_LinearCombination(const dim_t
225    
226    
227    
228  double Paso_InnerProduct(const dim_t n,const double* x, const double* y, Paso_MPIInfo* mpiinfo)  double Paso_InnerProduct(const dim_t n,const double* x, const double* y, Esys_MPIInfo* mpiinfo)
229  {  {
230     dim_t i,local_n,rest,n_start,n_end,q;     dim_t i,local_n,rest,n_start,n_end,q;
231     double my_out=0, local_out=0., out=0.;     double my_out=0, local_out=0., out=0.;
# Line 248  double Paso_InnerProduct(const dim_t n,c Line 248  double Paso_InnerProduct(const dim_t n,c
248              my_out+=local_out;              my_out+=local_out;
249          }          }
250     }     }
251     #ifdef PASO_MPI     #ifdef ESYS_MPI
252        #pragma omp single        #pragma omp single
253        {        {
254            MPI_Allreduce(&my_out,&out, 1, MPI_DOUBLE, MPI_SUM, mpiinfo->comm);            MPI_Allreduce(&my_out,&out, 1, MPI_DOUBLE, MPI_SUM, mpiinfo->comm);
# Line 260  double Paso_InnerProduct(const dim_t n,c Line 260  double Paso_InnerProduct(const dim_t n,c
260     return out;     return out;
261    
262  }  }
263  double Paso_lsup(const dim_t n, const double* x, Paso_MPIInfo* mpiinfo)  double Paso_lsup(const dim_t n, const double* x, Esys_MPIInfo* mpiinfo)
264  {  {
265     dim_t i,local_n,rest,n_start,n_end,q;     dim_t i,local_n,rest,n_start,n_end,q;
266     double my_out=0., local_out=0., out=0.;     double my_out=0., local_out=0., out=0.;
# Line 282  double Paso_lsup(const dim_t n, const do Line 282  double Paso_lsup(const dim_t n, const do
282              my_out=MAX(my_out,local_out);              my_out=MAX(my_out,local_out);
283          }          }
284     }     }
285     #ifdef PASO_MPI     #ifdef ESYS_MPI
286        #pragma omp single        #pragma omp single
287        {        {
288            MPI_Allreduce(&my_out,&out, 1, MPI_DOUBLE, MPI_MAX, mpiinfo->comm);            MPI_Allreduce(&my_out,&out, 1, MPI_DOUBLE, MPI_MAX, mpiinfo->comm);
# Line 294  double Paso_lsup(const dim_t n, const do Line 294  double Paso_lsup(const dim_t n, const do
294     return out;     return out;
295    
296  }  }
297  double Paso_l2(const dim_t n, const double* x, Paso_MPIInfo* mpiinfo)  double Paso_l2(const dim_t n, const double* x, Esys_MPIInfo* mpiinfo)
298  {  {
299     dim_t i,local_n,rest,n_start,n_end,q;     dim_t i,local_n,rest,n_start,n_end,q;
300     double my_out=0, local_out=0., out=0.;     double my_out=0, local_out=0., out=0.;
# Line 316  double Paso_l2(const dim_t n, const doub Line 316  double Paso_l2(const dim_t n, const doub
316              my_out+=local_out;              my_out+=local_out;
317          }          }
318     }     }
319     #ifdef PASO_MPI     #ifdef ESYS_MPI
320        #pragma omp single        #pragma omp single
321        {        {
322            MPI_Allreduce(&my_out,&out, 1, MPI_DOUBLE, MPI_SUM, mpiinfo->comm);            MPI_Allreduce(&my_out,&out, 1, MPI_DOUBLE, MPI_SUM, mpiinfo->comm);

Legend:
Removed from v.3258  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26