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

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

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

revision 3489 by jfenwick, Tue Feb 22 06:38:57 2011 UTC revision 3490 by caltinay, Wed Mar 30 02:24:33 2011 UTC
# Line 2178  Data::calc_minGlobalDataPoint(int& ProcN Line 2178  Data::calc_minGlobalDataPoint(int& ProcN
2178    next[1] = numSamples;    next[1] = numSamples;
2179    int lowProc = 0;    int lowProc = 0;
2180    double *globalMins = new double[get_MPISize()*2+1];    double *globalMins = new double[get_MPISize()*2+1];
2181    int error;    /*int error =*/ MPI_Gather (next, 2, MPI_DOUBLE, globalMins, 2, MPI_DOUBLE, 0, get_MPIComm() );
   error = MPI_Gather (next, 2, MPI_DOUBLE, globalMins, 2, MPI_DOUBLE, 0, get_MPIComm() );  
2182    
2183    if( get_MPIRank()==0 ){    if( get_MPIRank()==0 ){
2184      for (lowProc=0; lowProc<get_MPISize(); lowProc++)      for (lowProc=0; lowProc<get_MPISize(); lowProc++)
# Line 2265  Data::calc_maxGlobalDataPoint(int& ProcN Line 2264  Data::calc_maxGlobalDataPoint(int& ProcN
2264    next[1] = numSamples;    next[1] = numSamples;
2265    int highProc = 0;    int highProc = 0;
2266    double *globalMaxs = new double[get_MPISize()*2+1];    double *globalMaxs = new double[get_MPISize()*2+1];
2267    int error;    /*int error =*/ MPI_Gather ( next, 2, MPI_DOUBLE, globalMaxs, 2, MPI_DOUBLE, 0, get_MPIComm() );
   error = MPI_Gather ( next, 2, MPI_DOUBLE, globalMaxs, 2, MPI_DOUBLE, 0, get_MPIComm() );  
2268    if( get_MPIRank()==0 ){    if( get_MPIRank()==0 ){
2269      for (highProc=0; highProc<get_MPISize(); highProc++)      for (highProc=0; highProc<get_MPISize(); highProc++)
2270      if (globalMaxs[highProc*2+1] > 0) break;      if (globalMaxs[highProc*2+1] > 0) break;
# Line 3879  Data::get_MPISize() const Line 3877  Data::get_MPISize() const
3877  {  {
3878      int size;      int size;
3879  #ifdef ESYS_MPI  #ifdef ESYS_MPI
3880      int error;      /*int error =*/ MPI_Comm_size( get_MPIComm(), &size );
     error = MPI_Comm_size( get_MPIComm(), &size );  
3881  #else  #else
3882      size = 1;      size = 1;
3883  #endif  #endif
# Line 3892  Data::get_MPIRank() const Line 3889  Data::get_MPIRank() const
3889  {  {
3890      int rank;      int rank;
3891  #ifdef ESYS_MPI  #ifdef ESYS_MPI
3892      int error;      /*int error =*/ MPI_Comm_rank( get_MPIComm(), &rank );
     error = MPI_Comm_rank( get_MPIComm(), &rank );  
3893  #else  #else
3894      rank = 0;      rank = 0;
3895  #endif  #endif

Legend:
Removed from v.3489  
changed lines
  Added in v.3490

  ViewVC Help
Powered by ViewVC 1.1.26