git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1723 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2008-04-08 13:58:15 +00:00
parent cc5def9f6e
commit cfe0d02a30
8 changed files with 31 additions and 19 deletions

View File

@ -94,7 +94,7 @@ double DumpXYZ::memory_usage()
void DumpXYZ::write_header(int n)
{
// realloc types & coords if necessary
// all procs realloc types & coords if necessary
if (igroup == 0 && n != natoms) {
memory->sfree(types);
@ -106,8 +106,12 @@ void DumpXYZ::write_header(int n)
coords = (float *) memory->smalloc(3*natoms*sizeof(float),"dump:coords");
}
fprintf(fp,"%d\n",n);
fprintf(fp,"Atoms\n");
// only proc 0 writes header
if (me == 0) {
fprintf(fp,"%d\n",n);
fprintf(fp,"Atoms\n");
}
}
/* ---------------------------------------------------------------------- */