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 919 by tim, Sat Jan 10 02:15:35 2004 UTC vs.
Revision 920 by tim, Sat Jan 10 09:46:47 2004 UTC

# Line 160 | Line 160 | void DumpWriter::writeDump( double currentTime ){
160  
161   #else // is_mpi
162  
163  cout << "master" <<endl;
163    /* code to find maximum tag value */
164    
165 <  int tagub, flag, MAXTAG;
165 >  int *tagub, flag, MAXTAG;
166    MPI_Attr_get(MPI_COMM_WORLD, MPI_TAG_UB, &tagub, &flag);
167    if (flag) {
168 <    MAXTAG = tagub;
168 >    MAXTAG = *tagub;
169    } else {
170      MAXTAG = 32767;
171    }  
# Line 229 | Line 228 | void DumpWriter::writeDump( double currentTime ){
228          MPI_Recv(MPIatomTypeString, MINIBUFFERSIZE, MPI_CHAR, which_node,
229                   myPotato, MPI_COMM_WORLD, &istatus);
230          
231 <        strncpy(atomTypeString, MPIatomTypeString, MINIBUFFERSIZE);
231 >        //strncpy(atomTypeString, MPIatomTypeString, MINIBUFFERSIZE);
232          
233          // Null terminate the atomTypeString just in case:
234  
235 <        atomTypeString[strlen(atomTypeString) - 1] = '\0';
236 <
235 >        //atomTypeString[strlen(atomTypeString) - 1] = '\0';
236 >        atomTypeString = MPIatomTypeString;
237 >        
238          myPotato++;
239  
240          MPI_Recv(&isDirectional, 1, MPI_INT, which_node,
# Line 660 | Line 660 | void DumpWriter::writeFinal(double finalTime){
660          
661          MPI_Recv(MPIatomTypeString, MINIBUFFERSIZE, MPI_CHAR, which_node,
662                   myPotato, MPI_COMM_WORLD, &istatus);
663        
664        strncpy(atomTypeString, MPIatomTypeString, MINIBUFFERSIZE);
663          
664 <        // Null terminate the atomTypeString just in case:
665 <
668 <        atomTypeString[strlen(atomTypeString) - 1] = '\0';
669 <
664 >        atomTypeString = MPIatomTypeString;
665 >                
666          myPotato++;
667  
668          MPI_Recv(&isDirectional, 1, MPI_INT, which_node,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines