--- trunk/OOPSE/libmdtools/DumpWriter.cpp 2004/01/10 09:46:47 920 +++ trunk/OOPSE/libmdtools/DumpWriter.cpp 2004/01/12 20:37:59 926 @@ -309,51 +309,52 @@ void DumpWriter::writeDump( double currentTime ){ } if(haveError) DieDieDie(); - - // If we've survived to here, format the line: - if (!isDirectional) { - - sprintf( tempBuffer, - "%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t", - atomTypeString, - atomData6[0], - atomData6[1], - atomData6[2], - atomData6[3], - atomData6[4], - atomData6[5]); - - strcpy( writeLine, tempBuffer ); - strcat( writeLine, "0.0\t0.0\t0.0\t0.0\t0.0\t0.0\t0.0\n" ); - - } else { - - sprintf( tempBuffer, - "%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n", - atomTypeString, - atomData13[0], - atomData13[1], - atomData13[2], - atomData13[3], - atomData13[4], - atomData13[5], - atomData13[6], - atomData13[7], - atomData13[8], - atomData13[9], - atomData13[10], - atomData13[11], - atomData13[12]); - - strcat( writeLine, tempBuffer ); - - } + } + // If we've survived to here, format the line: + + if (!isDirectional) { + + sprintf( tempBuffer, + "%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t", + atomTypeString, + atomData6[0], + atomData6[1], + atomData6[2], + atomData6[3], + atomData6[4], + atomData6[5]); + + strcpy( writeLine, tempBuffer ); + strcat( writeLine, "0.0\t0.0\t0.0\t0.0\t0.0\t0.0\t0.0\n" ); + + } else { + + sprintf( tempBuffer, + "%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n", + atomTypeString, + atomData13[0], + atomData13[1], + atomData13[2], + atomData13[3], + atomData13[4], + atomData13[5], + atomData13[6], + atomData13[7], + atomData13[8], + atomData13[9], + atomData13[10], + atomData13[11], + atomData13[12]); + + strcat( writeLine, tempBuffer ); - outFile << writeLine; - outFile.flush(); } + + outFile << writeLine; + outFile.flush(); } + outFile.flush(); sprintf( checkPointMsg, @@ -674,6 +675,7 @@ void DumpWriter::writeFinal(double finalTime){ MPI_Recv(atomData13, 13, MPI_DOUBLE, which_node, myPotato, MPI_COMM_WORLD, &istatus); } else { + printf("inside \n"); MPI_Recv(atomData6, 6, MPI_DOUBLE, which_node, myPotato, MPI_COMM_WORLD, &istatus); } @@ -737,57 +739,59 @@ void DumpWriter::writeFinal(double finalTime){ } if(haveError) DieDieDie(); - - // If we've survived to here, format the line: - if (!isDirectional) { + } - sprintf( tempBuffer, - "%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t", - atomTypeString, - atomData6[0], - atomData6[1], - atomData6[2], - atomData6[3], - atomData6[4], - atomData6[5]); - - strcpy( writeLine, tempBuffer ); - strcat( writeLine, "0.0\t0.0\t0.0\t0.0\t0.0\t0.0\t0.0\n" ); - } else { - - sprintf( tempBuffer, - "%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n", - atomTypeString, - atomData13[0], - atomData13[1], - atomData13[2], - atomData13[3], - atomData13[4], - atomData13[5], - atomData13[6], - atomData13[7], - atomData13[8], - atomData13[9], - atomData13[10], - atomData13[11], - atomData13[12]); - - strcat( writeLine, tempBuffer ); - - } + // If we've survived to here, format the line: + + if (!isDirectional) { + + sprintf( tempBuffer, + "%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t", + atomTypeString, + atomData6[0], + atomData6[1], + atomData6[2], + atomData6[3], + atomData6[4], + atomData6[5]); + + strcpy( writeLine, tempBuffer ); + strcat( writeLine, "0.0\t0.0\t0.0\t0.0\t0.0\t0.0\t0.0\n" ); + + } else { + + sprintf( tempBuffer, + "%s\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf\n", + atomTypeString, + atomData13[0], + atomData13[1], + atomData13[2], + atomData13[3], + atomData13[4], + atomData13[5], + atomData13[6], + atomData13[7], + atomData13[8], + atomData13[9], + atomData13[10], + atomData13[11], + atomData13[12]); + + strcat( writeLine, tempBuffer ); - finalOut << writeLine; - finalOut.flush(); } + + finalOut << writeLine; + finalOut.flush(); } - + finalOut.flush(); sprintf( checkPointMsg, "Sucessfully took a dump.\n"); delete[] potatoes; - + MPIcheckPoint(); } else {