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

Comparing trunk/OOPSE/libmdtools/DumpReader.cpp (file contents):
Revision 1129 by tim, Thu Apr 22 03:29:30 2004 UTC vs.
Revision 1252 by gezelter, Mon Jun 7 14:26:33 2004 UTC

# Line 84 | Line 84 | void DumpReader::scanFile( void ){
84  
85   void DumpReader::scanFile( void ){
86  
87 <  int vectorSize;
88 <  int i, j, k;
87 >  int i, j;
88    int lineNum = 0;
89    char readBuffer[2000];
91  char* foo;
90    fpos_t *currPos;
93  double time;
91  
95
96
92   #ifdef IS_MPI
93    if( worldRank == 0 ){
94   #endif // is_mpi
# Line 176 | Line 171 | void DumpReader :: readSet( int whichFrame ){
171  
172   void DumpReader :: readSet( int whichFrame ){
173  
174 <   int i, j;
174 >  int i;
175 >  unsigned int j;
176  
177   #ifdef IS_MPI
178    int done, which_node, which_atom; // loop counter
# Line 327 | Line 323 | void DumpReader :: readSet( int whichFrame ){
323        simError();
324      }
325  
326 <    for (i=0 ; i < mpiSim->getTotNmol(); i++) {
326 >    for (i=0 ; i < mpiSim->getNMolGlobal(); i++) {
327        which_node = MolToProcMap[i];
328        if(which_node == 0){
329         //molecules belong to master node
# Line 368 | Line 364 | void DumpReader :: readSet( int whichFrame ){
364          MPI_Recv(&nCurObj, 1, MPI_INT, which_node,
365                 TAKE_THIS_TAG_INT, MPI_COMM_WORLD, &istatus);
366        
367 <       for(j=0; j < integrableObjects.size(); j++){
367 >       for(j=0; j < nCurObj; j++){
368          
369            eof_test = fgets(read_buffer, sizeof(read_buffer), inFile);
370            if(eof_test == NULL){
# Line 405 | Line 401 | void DumpReader :: readSet( int whichFrame ){
401        simError();
402      }
403    
404 <    for (i=0 ; i < mpiSim->getTotNmol(); i++) {
404 >    for (i=0 ; i < mpiSim->getNMolGlobal(); i++) {
405        which_node = MolToProcMap[i];
406        
407        if(which_node == worldRank){
# Line 744 | Line 740 | void DumpReader::nodeZeroError( void ){
740    int j, myStatus;
741  
742    myStatus = 0;
743 <  for (j = 0; j < mpiSim->getNumberProcessors(); j++) {
743 >  for (j = 0; j < mpiSim->getNProcessors(); j++) {
744      MPI_Send( &myStatus, 1, MPI_INT, j,
745                TAKE_THIS_TAG_INT, MPI_COMM_WORLD);
746    }
# Line 760 | Line 756 | void DumpReader::anonymousNodeDie( void ){
756    MPI_Finalize();
757    exit (0);
758   }
759 < #endif
759 > #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines