ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/DumpWriter.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/DumpWriter.cpp (file contents):
Revision 1108 by tim, Wed Apr 14 15:37:41 2004 UTC vs.
Revision 1129 by tim, Thu Apr 22 03:29:30 2004 UTC

# Line 91 | Line 91 | void DumpWriter::sortByGlobalIndex(){
91    Molecule* mols = entry_plug->molecules;  
92    indexArray.clear();
93    
94 <  for(int i = 0; i < mpiSim->getMyNlocal();i++)
94 >  for(int i = 0; i < entry_plug->n_mol;i++)
95      indexArray.push_back(make_pair(i, mols[i].getGlobalIndex()));
96    
97    sort(indexArray.begin(), indexArray.end(), indexSortingCriterion);    
# Line 366 | Line 366 | void DumpWriter::writeFrame( vector<ofstream*>& outFil
366            // so wrap this processor potato back to 0:        
367  
368            potatoes[which_node] = 0;          
369 <          MPI_Send(0, 1, MPI_INT, which_node, 0, MPI_COMM_WORLD);
369 >          MPI_Send(&potatoes[which_node], 1, MPI_INT, which_node, 0, MPI_COMM_WORLD);
370            
371          }
372  
# Line 375 | Line 375 | void DumpWriter::writeFrame( vector<ofstream*>& outFil
375          //recieve the number of integrableObject in current molecule
376          MPI_Recv(&nCurObj, 1, MPI_INT, which_node,
377                   myPotato, MPI_COMM_WORLD, &istatus);
378 +        myPotato++;
379          
380          for(int l = 0; l < nCurObj; l++){
381  
# Line 383 | Line 384 | void DumpWriter::writeFrame( vector<ofstream*>& outFil
384              // so wrap this processor potato back to 0:        
385  
386              potatoes[which_node] = 0;          
387 <            MPI_Send(0, 1, MPI_INT, which_node, 0, MPI_COMM_WORLD);
387 >            MPI_Send(&potatoes[which_node], 1, MPI_INT, which_node, 0, MPI_COMM_WORLD);
388              
389            }
390  
# Line 544 | Line 545 | void DumpWriter::writeFrame( vector<ofstream*>& outFil
545                        
546            MPI_Send(&nCurObj, 1, MPI_INT, 0,
547                               myPotato, MPI_COMM_WORLD);
548 +          myPotato++;
549  
550            for( iter = integrableObjects.begin(); iter  != integrableObjects.end(); iter++){
551  
# Line 630 | Line 632 | void DumpWriter::writeFrame( vector<ofstream*>& outFil
632          }
633        
634        }
633    
634    }
635  
636      sprintf( checkPointMsg,
637               "Sucessfully took a dump.\n");
638 <    MPIcheckPoint();        
638 >    MPIcheckPoint();                
639      
640 +    }
641 +
642 +
643    
644   #endif // is_mpi
645   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines