aboutsummaryrefslogtreecommitdiff
path: root/src/Write2D.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Write2D.c')
-rw-r--r--src/Write2D.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Write2D.c b/src/Write2D.c
index fb1fbbd..a1c2270 100644
--- a/src/Write2D.c
+++ b/src/Write2D.c
@@ -215,9 +215,11 @@ int IOJpeg_Write2D (cGH *GH, int index, const char *alias)
like for HDF5 can go here.
********************************************** */
- /* Close the file */
- fclose (fdset_2D [si]);
-
+ if(CCTK_MyProc(GH) == 0)
+ {
+ /* Close the file */
+ fclose (fdset_2D [si]);
+ }
}
free(fname);