# | Line 299 | Line 299 | void DumpWriter::writeFrame( vector<ofstream*>& outFil | |
---|---|---|
299 | for(k = 0; k < outFile.size(); k++) | |
300 | *outFile[k] << writeLine; | |
301 | } | |
302 | < | |
303 | < | } |
302 | > | |
303 | > | } |
304 | ||
305 | #else // is_mpi | |
306 | ||
# | Line 333 | Line 333 | void DumpWriter::writeFrame( vector<ofstream*>& outFil | |
333 | for (i = 0; i < nProc; i++) | |
334 | potatoes[i] = 0; | |
335 | ||
336 | < | for(k = 0; k < outFile.size(); k++){ |
337 | < | *outFile[k] << nTotObjects << "\n"; |
338 | < | |
339 | < | *outFile[k] << currentTime << ";\t" |
340 | < | << entry_plug->Hmat[0][0] << "\t" |
341 | < | << entry_plug->Hmat[1][0] << "\t" |
342 | < | << entry_plug->Hmat[2][0] << ";\t" |
343 | < | |
344 | < | << entry_plug->Hmat[0][1] << "\t" |
345 | < | << entry_plug->Hmat[1][1] << "\t" |
346 | < | << entry_plug->Hmat[2][1] << ";\t" |
347 | < | |
348 | < | << entry_plug->Hmat[0][2] << "\t" |
349 | < | << entry_plug->Hmat[1][2] << "\t" |
350 | < | << entry_plug->Hmat[2][2] << ";"; |
351 | < | |
352 | < | *outFile[k] << entry_plug->the_integrator->getAdditionalParameters() << endl; |
353 | < | } |
354 | < | |
336 | > | for(k = 0; k < outFile.size(); k++){ |
337 | > | *outFile[k] << nTotObjects << "\n"; |
338 | > | |
339 | > | *outFile[k] << currentTime << ";\t" |
340 | > | << entry_plug->Hmat[0][0] << "\t" |
341 | > | << entry_plug->Hmat[1][0] << "\t" |
342 | > | << entry_plug->Hmat[2][0] << ";\t" |
343 | > | |
344 | > | << entry_plug->Hmat[0][1] << "\t" |
345 | > | << entry_plug->Hmat[1][1] << "\t" |
346 | > | << entry_plug->Hmat[2][1] << ";\t" |
347 | > | |
348 | > | << entry_plug->Hmat[0][2] << "\t" |
349 | > | << entry_plug->Hmat[1][2] << "\t" |
350 | > | << entry_plug->Hmat[2][2] << ";"; |
351 | > | |
352 | > | *outFile[k] << entry_plug->the_integrator->getAdditionalParameters() |
353 | > | << endl; |
354 | > | } |
355 | > | |
356 | currentIndex = 0; | |
357 | < | |
357 | > | |
358 | for (i = 0 ; i < mpiSim->getNMolGlobal(); i++ ) { | |
359 | ||
360 | // Get the Node number which has this atom; | |
# | Line 367 | Line 368 | void DumpWriter::writeFrame( vector<ofstream*>& outFil | |
368 | // so wrap this processor potato back to 0: | |
369 | ||
370 | potatoes[which_node] = 0; | |
371 | < | MPI_Send(&potatoes[which_node], 1, MPI_INT, which_node, 0, MPI_COMM_WORLD); |
371 | > | MPI_Send(&potatoes[which_node], 1, MPI_INT, which_node, 0, |
372 | > | MPI_COMM_WORLD); |
373 | ||
374 | } | |
375 | ||
# | Line 449 | Line 451 | void DumpWriter::writeFrame( vector<ofstream*>& outFil | |
451 | ||
452 | }// end for(int l =0) | |
453 | potatoes[which_node] = myPotato; | |
454 | < | |
454 | > | |
455 | } | |
456 | else { | |
457 | < | |
457 | > | |
458 | haveError = 0; | |
459 | ||
460 | local_index = indexArray[currentIndex].first; | |
461 | + | |
462 | + | integrableObjects = (entry_plug->molecules[local_index]).getIntegrableObjects(); |
463 | ||
460 | – | integrableObjects = (entry_plug->molecules[local_index]).getIntegrableObjects(); |
461 | – | |
464 | for(iter= integrableObjects.begin(); iter != integrableObjects.end(); ++iter){ | |
465 | sd = *iter; | |
466 | atomTypeString = sd->getType(); | |
# | Line 587 | Line 589 | void DumpWriter::writeFrame( vector<ofstream*>& outFil | |
589 | nCurObj = integrableObjects.size(); | |
590 | ||
591 | MPI_Send(&nCurObj, 1, MPI_INT, 0, | |
592 | < | myPotato, MPI_COMM_WORLD); |
592 | > | myPotato, MPI_COMM_WORLD); |
593 | myPotato++; | |
594 | ||
595 | for( iter = integrableObjects.begin(); iter != integrableObjects.end(); iter++){ | |
# | Line 670 | Line 672 | void DumpWriter::writeFrame( vector<ofstream*>& outFil | |
672 | } | |
673 | ||
674 | sprintf( checkPointMsg, | |
675 | < | "Sucessfully took a dump.\n"); |
675 | > | "Successfully took a dump.\n"); |
676 | MPIcheckPoint(); | |
677 | ||
678 | < | } |
677 | < | |
678 | < | |
678 | > | } |
679 | ||
680 | #endif // is_mpi | |
681 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |