[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:54:55 UTC 2009
The following commit has been merged in the upstream branch:
commit d070b8cca1655bccda99a4f8de99c93a73f02f64
Author: Stephane Popinet <popinet at users.sf.net>
Date: Thu Jan 10 11:10:48 2008 +1100
'error.gfs' dump files are indexed by PE number
darcs-hash:20080110001048-d4795-8ab1d42f460749b82fbb377903a672cbfb2c44bb.gz
diff --git a/src/init.c b/src/init.c
index 180b984..d64b095 100644
--- a/src/init.c
+++ b/src/init.c
@@ -65,7 +65,7 @@ static void gfs_log (const gchar * log_domain,
rank = -1;
#endif /* HAVE_MPI */
if (rank >= 0)
- sprintf (pe, "PE %d: ", rank);
+ snprintf (pe, 10, "PE %d: ", rank);
else
pe[0] = '\0';
diff --git a/src/simulation.c b/src/simulation.c
index 5a7a189..ad022a4 100644
--- a/src/simulation.c
+++ b/src/simulation.c
@@ -1264,7 +1264,10 @@ static void error_handler (const gchar *log_domain,
domain->variables_io = g_slist_append (domain->variables_io, i->data);
i = i->next;
}
- FILE * fp = fopen ("error.gfs", "w");
+ gchar fname[20] = "error.gfs";
+ if (domain->pid >= 0)
+ snprintf (fname, 20, "error-%d.gfs", domain->pid);
+ FILE * fp = fopen (fname, "w");
if (fp) {
gfs_simulation_write (GFS_SIMULATION (domain), -1, fp);
fclose (fp);
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list