66 |
|
void DumpWriter::writeDump( double currentTime ){ |
67 |
|
|
68 |
|
const int BUFFERSIZE = 2000; |
69 |
< |
const int MINIBUFFERSIZE = 10; |
69 |
> |
const int MINIBUFFERSIZE = 100; |
70 |
|
|
71 |
|
char tempBuffer[BUFFERSIZE]; |
72 |
|
char writeLine[BUFFERSIZE]; |
204 |
|
atomTypeTag, MPI_COMM_WORLD, &istatus); |
205 |
|
|
206 |
|
strncpy(atomTypeString, MPIatomTypeString, MINIBUFFERSIZE); |
207 |
+ |
|
208 |
+ |
// Null terminate the atomTypeString just in case: |
209 |
|
|
210 |
+ |
atomTypeString[strlen(atomTypeString) - 1] = '\0'; |
211 |
+ |
|
212 |
|
MPI_Recv(&isDirectional, 1, MPI_INT, which_node, |
213 |
|
atomIsDirectionalTag, MPI_COMM_WORLD, &istatus); |
214 |
|
|
383 |
|
|
384 |
|
strncpy(MPIatomTypeString, atomTypeString, MINIBUFFERSIZE); |
385 |
|
|
386 |
+ |
// null terminate the string before sending (just in case): |
387 |
+ |
MPIatomTypeString[MINIBUFFERSIZE-1] = '\0'; |
388 |
+ |
|
389 |
|
MPI_Send(MPIatomTypeString, MINIBUFFERSIZE, MPI_CHAR, 0, |
390 |
|
atomTypeTag, MPI_COMM_WORLD); |
391 |
|
|
422 |
|
ofstream finalOut; |
423 |
|
|
424 |
|
const int BUFFERSIZE = 2000; |
425 |
< |
const int MINIBUFFERSIZE = 10; |
425 |
> |
const int MINIBUFFERSIZE = 100; |
426 |
|
char tempBuffer[BUFFERSIZE]; |
427 |
|
char writeLine[BUFFERSIZE]; |
428 |
|
|