--- trunk/OOPSE/libmdtools/DumpWriter.cpp 2003/08/26 20:12:51 723 +++ trunk/OOPSE/libmdtools/DumpWriter.cpp 2003/10/16 19:16:24 804 @@ -72,15 +72,23 @@ void DumpWriter::writeDump( double currentTime ){ char tempBuffer[BUFFERSIZE]; char writeLine[BUFFERSIZE]; - int i, j, which_node, done, which_atom, local_index; + int i; +#ifdef IS_MPI + int j, which_node, done, which_atom, local_index; +#else //is_mpi + int nAtoms = entry_plug->n_atoms; +#endif //is_mpi + double q[4]; DirectionalAtom* dAtom; - int nAtoms = entry_plug->n_atoms; Atom** atoms = entry_plug->atoms; - double pos[3], vel[3]; + + // write current frame to the eor file + this->writeFinal( currentTime ); + #ifndef IS_MPI outFile << nAtoms << "\n"; @@ -349,9 +357,13 @@ void DumpWriter::writeFinal(double finalTime){ double q[4]; DirectionalAtom* dAtom; - int nAtoms = entry_plug->n_atoms; Atom** atoms = entry_plug->atoms; - int i, j, which_node, done, game_over, which_atom, local_index; + int i; +#ifdef IS_MPI + int j, which_node, done, which_atom, local_index; +#else //is_mpi + int nAtoms = entry_plug->n_atoms; +#endif //is_mpi double pos[3], vel[3];