/[escript]/trunk/escript/src/Utils.cpp
ViewVC logotype

Diff of /trunk/escript/src/Utils.cpp

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

revision 2606 by jfenwick, Mon Jul 20 06:20:06 2009 UTC revision 2607 by jfenwick, Tue Aug 18 01:02:56 2009 UTC
# Line 91  void printParallelThreadCnt() Line 91  void printParallelThreadCnt()
91      omp_iam = omp_get_thread_num(); /* Call in a parallel region */      omp_iam = omp_get_thread_num(); /* Call in a parallel region */
92      omp_num = omp_get_num_threads();      omp_num = omp_get_num_threads();
93      #endif      #endif
94        #pragma omp critical (printthrdcount)
95      printf("printParallelThreadCounts: MPI=%03d/%03d OpenMP=%03d/%03d running on %s core %d\n",      printf("printParallelThreadCounts: MPI=%03d/%03d OpenMP=%03d/%03d running on %s core %d\n",
96        mpi_iam, mpi_num, omp_iam, omp_num, hname, get_core_id());        mpi_iam, mpi_num, omp_iam, omp_num, hname, get_core_id());
97    }    }
# Line 142  ESCRIPT_DLL_API int getMPIWorldMax(const Line 143  ESCRIPT_DLL_API int getMPIWorldMax(const
143    return out;    return out;
144  }  }
145    
146      ESCRIPT_DLL_API int getMPIWorldSum(const int val) {
147      #ifdef PASO_MPI
148      int val2 = val;
149      int out = 0;
150      MPI_Allreduce( &val2, &out, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD );
151      #else
152      int out = val;
153      #endif
154      return out;
155    }
156    
157  ESCRIPT_DLL_API double getMachinePrecision() {  ESCRIPT_DLL_API double getMachinePrecision() {
158     return DBL_EPSILON;     return DBL_EPSILON;

Legend:
Removed from v.2606  
changed lines
  Added in v.2607

  ViewVC Help
Powered by ViewVC 1.1.26