--- branches/development/src/io/DumpWriter.cpp 2013/02/20 15:39:39 1850 +++ branches/development/src/io/DumpWriter.cpp 2013/06/13 14:26:09 1878 @@ -310,7 +310,6 @@ namespace OpenMD { SimInfo::MoleculeIterator mi; Molecule::IntegrableObjectIterator ii; RigidBody::AtomIterator ai; - Atom* atom; #ifndef IS_MPI os << " \n"; @@ -318,8 +317,8 @@ namespace OpenMD { writeFrameProperties(os, info_->getSnapshotManager()->getCurrentSnapshot()); os << " \n"; - for (mol = info_->beginMolecule(mi); mol != NULL; mol = info_->nextMolecule(mi)) { - + for (mol = info_->beginMolecule(mi); mol != NULL; + mol = info_->nextMolecule(mi)) { for (sd = mol->beginIntegrableObject(ii); sd != NULL; sd = mol->nextIntegrableObject(ii)) { @@ -345,7 +344,7 @@ namespace OpenMD { RigidBody* rb = static_cast(sd); int siteIndex = 0; - for (atom = rb->beginAtom(ai); atom != NULL; + for (Atom* atom = rb->beginAtom(ai); atom != NULL; atom = rb->nextAtom(ai)) { os << prepareSiteLine(atom, ioIndex, siteIndex); siteIndex++; @@ -420,6 +419,7 @@ namespace OpenMD { // send our buffer: MPI::COMM_WORLD.Send((void *)buffer.c_str(), sendBufferLength, MPI::CHAR, masterNode, 0); + } } } @@ -447,7 +447,7 @@ namespace OpenMD { RigidBody* rb = static_cast(sd); int siteIndex = 0; - for (atom = rb->beginAtom(ai); atom != NULL; + for (Atom* atom = rb->beginAtom(ai); atom != NULL; atom = rb->nextAtom(ai)) { buffer += prepareSiteLine(atom, ioIndex, siteIndex); siteIndex++; @@ -726,20 +726,22 @@ namespace OpenMD { #ifdef IS_MPI if (worldRank == 0) { #endif // is_mpi - + eorStream = createOStream(eorFilename_); #ifdef IS_MPI } -#endif // is_mpi - +#endif + writeFrame(*eorStream); - + #ifdef IS_MPI if (worldRank == 0) { -#endif // is_mpi +#endif + writeClosing(*eorStream); delete eorStream; + #ifdef IS_MPI } #endif // is_mpi