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 1128 by tim, Mon Apr 19 17:44:48 2004 UTC vs.
Revision 1129 by tim, Thu Apr 22 03:29:30 2004 UTC

# Line 273 | Line 273 | void DumpReader :: readSet( int whichFrame ){
273    int *MolToProcMap = mpiSim->getMolToProcMap();
274    int localIndex;
275    int nCurObj;
276 +  int nitems;
277  
278 +  nTotObjs = simnfo->getTotIntegrableObjects();
279    haveError = 0;
280    if (worldRank == 0) {
281       fsetpos(inFile,  framePos[whichFrame]);
# Line 286 | Line 288 | void DumpReader :: readSet( int whichFrame ){
288        simError();
289      }
290  
291 <    nTotObjs = atoi( read_buffer );
291 >    nitems = atoi( read_buffer );
292  
293      // Check to see that the number of integrable objects  in the intial configuration file is the
294      // same as declared in simBass.
295  
296 <    if( nTotObjs != simnfo->getTotIntegrableObjects()){
296 >    if( nTotObjs != nitems){
297        sprintf( painCave.errMsg,
298                 "DumpReadererror. %s n_atoms, %d, "
299                 "does not match the BASS file's n_atoms, %d.\n",
# Line 354 | Line 356 | void DumpReader :: readSet( int whichFrame ){
356            
357            if(haveError) nodeZeroError();
358  
359 <          parseDumpLine(read_buffer, integrableObjects[i]);
359 >          parseDumpLine(read_buffer, integrableObjects[j]);
360            
361         }
362  
# Line 363 | Line 365 | void DumpReader :: readSet( int whichFrame ){
365        else{
366        //molecule belongs to slave nodes
367  
368 <        MPI_Recv(&nCurObj, 1, MPI_INT, 0,
368 >        MPI_Recv(&nCurObj, 1, MPI_INT, which_node,
369                 TAKE_THIS_TAG_INT, MPI_COMM_WORLD, &istatus);
370        
371         for(j=0; j < integrableObjects.size(); j++){
# Line 393 | Line 395 | void DumpReader :: readSet( int whichFrame ){
395    }
396    else{
397    //actions taken at slave nodes
398 +    MPI_Bcast(read_buffer, BUFFERSIZE, MPI_CHAR, 0, MPI_COMM_WORLD);
399 +
400 +    parseErr = parseCommentLine( read_buffer, simnfo);
401 +
402 +    if( parseErr != NULL ){
403 +      strcpy( painCave.errMsg, parseErr );
404 +      haveError = 1;
405 +      simError();
406 +    }
407 +  
408      for (i=0 ; i < mpiSim->getTotNmol(); i++) {
409        which_node = MolToProcMap[i];
410        
# Line 411 | Line 423 | void DumpReader :: readSet( int whichFrame ){
423  
424          nCurObj = integrableObjects.size();
425          
426 <        MPI_Recv(&nCurObj, 1, MPI_INT, 0,
427 <                        TAKE_THIS_TAG_INT, MPI_COMM_WORLD, &istatus);
426 >        MPI_Send(&nCurObj, 1, MPI_INT, 0,
427 >                        TAKE_THIS_TAG_INT, MPI_COMM_WORLD);
428  
429          for(j = 0; j < integrableObjects.size(); j++){
430  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines