| 95 | 
  | 
    indexArray.push_back(make_pair(i, atoms[i]->getGlobalIndex())); | 
| 96 | 
  | 
   | 
| 97 | 
  | 
  sort(indexArray.begin(), indexArray.end(), indexSortingCriterion);     | 
| 98 | 
– | 
 | 
| 99 | 
– | 
  //for (int i = 0; i < mpiSim->getMyNlocal(); i++) { | 
| 100 | 
– | 
  //  printf("node %d has global %d at local %d\n", worldRank, indexArray[i].second, indexArray[i].first); | 
| 101 | 
– | 
  //} | 
| 102 | 
– | 
     | 
| 98 | 
  | 
} | 
| 99 | 
  | 
 | 
| 100 | 
  | 
#endif | 
| 105 | 
  | 
  vector<ofstream*> fileStreams; | 
| 106 | 
  | 
 | 
| 107 | 
  | 
#ifdef IS_MPI | 
| 113 | 
– | 
  printf("Hello from node %d\n", worldRank); | 
| 114 | 
– | 
  sortByGlobalIndex(); | 
| 108 | 
  | 
  if(worldRank == 0 ){ | 
| 109 | 
< | 
     | 
| 109 | 
> | 
#endif     | 
| 110 | 
  | 
    finalOut.open( entry_plug->finalName, ios::out | ios::trunc ); | 
| 111 | 
  | 
    if( !finalOut ){ | 
| 112 | 
  | 
      sprintf( painCave.errMsg, | 
| 115 | 
  | 
      painCave.isFatal = 1; | 
| 116 | 
  | 
      simError(); | 
| 117 | 
  | 
    } | 
| 118 | 
+ | 
#ifdef IS_MPI | 
| 119 | 
  | 
  } | 
| 120 | 
  | 
#endif // is_mpi | 
| 121 | 
  | 
 | 
| 137 | 
  | 
 | 
| 138 | 
  | 
#ifdef IS_MPI | 
| 139 | 
  | 
  if(worldRank == 0 ){ | 
| 140 | 
+ | 
#endif // is_mpi | 
| 141 | 
  | 
 | 
| 142 | 
  | 
    finalOut.open( entry_plug->finalName, ios::out | ios::trunc ); | 
| 143 | 
  | 
 | 
| 149 | 
  | 
      simError(); | 
| 150 | 
  | 
    } | 
| 151 | 
  | 
 | 
| 152 | 
+ | 
#ifdef IS_MPI | 
| 153 | 
  | 
  } | 
| 154 | 
  | 
#endif // is_mpi | 
| 155 | 
  | 
   | 
| 389 | 
  | 
         | 
| 390 | 
  | 
        haveError = 0; | 
| 391 | 
  | 
        which_atom = i; | 
| 396 | 
– | 
         | 
| 397 | 
– | 
        //local_index = -1; | 
| 398 | 
– | 
 | 
| 399 | 
– | 
        //for (j=0; (j<mpiSim->getMyNlocal()) && (local_index < 0); j++) { | 
| 400 | 
– | 
        //  if (atoms[j]->getGlobalIndex() == which_atom) local_index = j; | 
| 401 | 
– | 
        //} | 
| 392 | 
  | 
         | 
| 403 | 
– | 
        //if (local_index != -1) { | 
| 404 | 
– | 
           | 
| 393 | 
  | 
          local_index = indexArray[currentIndex].first;         | 
| 394 | 
  | 
           | 
| 395 | 
  | 
          if (which_atom == indexArray[currentIndex].second) { | 
| 518 | 
  | 
        } | 
| 519 | 
  | 
        which_atom = i;  | 
| 520 | 
  | 
 | 
| 533 | 
– | 
        //local_index = -1; | 
| 534 | 
– | 
 | 
| 535 | 
– | 
        //for (j=0; (j<mpiSim->getMyNlocal()) && (local_index < 0); j++) { | 
| 536 | 
– | 
        // if (atoms[j]->getGlobalIndex() == which_atom) local_index = j; | 
| 537 | 
– | 
        //} | 
| 538 | 
– | 
         | 
| 539 | 
– | 
        //if (local_index != -1) { | 
| 540 | 
– | 
 | 
| 521 | 
  | 
        local_index = indexArray[currentIndex].first;         | 
| 522 | 
  | 
                 | 
| 523 | 
  | 
        if (which_atom == indexArray[currentIndex].second) { |