Skip to content
Snippets Groups Projects
Commit db43eae9 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Make sure we dump cells for any particles and avoid a possible issue with increment timing.

parent 044bce3e
No related branches found
No related tags found
1 merge request!395Make the expected number of tasks per cell a parameter.
......@@ -300,7 +300,7 @@ static void dumpCells_map(struct cell *c, void *data) {
#endif
/* Only locally active cells are dumped. */
if (c->count > 0)
if (c->count > 0 || c->gcount > 0 || c->scount > 0)
fprintf(file,
" %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f %6d %6d %6d %6d "
"%6.1f %20lld %6d %6d %6d %6d\n",
......@@ -324,8 +324,8 @@ void dumpCells(const char *prefix, struct space *s) {
/* Name of output file. */
static int nseq = 0;
char fname[200];
sprintf(fname, "%s_%03d.dat", prefix, nseq);
atomic_inc(&nseq);
int uniq = atomic_inc(&nseq);
sprintf(fname, "%s_%03d.dat", prefix, uniq);
file = fopen(fname, "w");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment