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 916 by gezelter, Fri Jan 9 20:29:32 2004 UTC vs.
Revision 919 by tim, Sat Jan 10 02:15:35 2004 UTC

# Line 160 | Line 160 | void DumpWriter::writeDump( double currentTime ){
160  
161   #else // is_mpi
162  
163 +  cout << "master" <<endl;
164    /* code to find maximum tag value */
165 <  int *tagub, flag, MAXTAG;
165 >  
166 >  int tagub, flag, MAXTAG;
167    MPI_Attr_get(MPI_COMM_WORLD, MPI_TAG_UB, &tagub, &flag);
168    if (flag) {
169 <    MAXTAG = *tagub;
169 >    MAXTAG = tagub;
170    } else {
171      MAXTAG = 32767;
172    }  
# Line 357 | Line 359 | void DumpWriter::writeDump( double currentTime ){
359      sprintf( checkPointMsg,
360               "Sucessfully took a dump.\n");
361      MPIcheckPoint();        
362 <    
362 >    delete[] potatoes;
363    } else {
364  
365      // worldRank != 0, so I'm a remote node.  
# Line 381 | Line 383 | void DumpWriter::writeDump( double currentTime ){
383            MPI_Recv(&myPotato, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &istatus);
384            
385          }
386 <
387 <        local_index=-1;
386 >        which_atom = i;
387 >        local_index=-1;
388          for (j=0; (j<mpiSim->getMyNlocal()) && (local_index < 0); j++) {
389            if (atoms[j]->getGlobalIndex() == which_atom) local_index = j;
390          }
# Line 788 | Line 790 | void DumpWriter::writeFinal(double finalTime){
790      finalOut.flush();
791      sprintf( checkPointMsg,
792               "Sucessfully took a dump.\n");
793 +    delete[] potatoes;
794 +      
795      MPIcheckPoint();        
796      
797    } else {
# Line 813 | Line 817 | void DumpWriter::writeFinal(double finalTime){
817            MPI_Recv(&myPotato, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &istatus);
818            
819          }
820 <
820 >        which_atom = i;  
821          local_index=-1;
822          for (j=0; (j<mpiSim->getMyNlocal()) && (local_index < 0); j++) {
823            if (atoms[j]->getGlobalIndex() == which_atom) local_index = j;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines