[cig-commits] r7902 - mc/3D/CitcomS/trunk/lib

becker at geodynamics.org becker at geodynamics.org
Tue Aug 28 18:46:41 PDT 2007


Author: becker
Date: 2007-08-28 18:46:41 -0700 (Tue, 28 Aug 2007)
New Revision: 7902

Modified:
   mc/3D/CitcomS/trunk/lib/Instructions.c
Log:
Missed to merge one modification after the conflict.



Modified: mc/3D/CitcomS/trunk/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Instructions.c	2007-08-29 00:51:20 UTC (rev 7901)
+++ mc/3D/CitcomS/trunk/lib/Instructions.c	2007-08-29 01:46:41 UTC (rev 7902)
@@ -1076,20 +1076,27 @@
   char output_file[255];
 
   /* only one CPU will write to those */
-
-  /* top heat flux and other stat quantities */
-  if (strcmp(E->output.format, "ascii-gz") == 0)
-    sprintf(output_file,"%s/qt.dat", E->control.data_dir);
-  else
-    sprintf(output_file,"%s.qt.dat", E->control.data_file);
-  E->output.fpqt = output_open(output_file);
-  /* bottom heat flux and other stat quantities */
-  if (strcmp(E->output.format, "ascii-gz") == 0)
-    sprintf(output_file,"%s/qb.dat", E->control.data_dir);
-  else
-    sprintf(output_file,"%s.qb.dat", E->control.data_file);
-  E->output.fpqb = output_open(output_file);
-
+  if((E->parallel.me_loc[3] == E->parallel.nprocz-1) &&
+     (E->parallel.me==E->parallel.nprocz-1)){
+    /* top heat flux and other stat quantities */
+    if (strcmp(E->output.format, "ascii-gz") == 0)
+      sprintf(output_file,"%s/qt.dat", E->control.data_dir);
+    else
+      sprintf(output_file,"%s.qt.dat", E->control.data_file);
+    E->output.fpqt = output_open(output_file);
+  }else{
+    E->output.fpqt = NULL;
+  }
+  if (E->parallel.me_loc[3] == 0)    {
+    /* bottom heat flux and other stat quantities */
+    if (strcmp(E->output.format, "ascii-gz") == 0)
+      sprintf(output_file,"%s/qb.dat", E->control.data_dir);
+    else
+      sprintf(output_file,"%s.qb.dat", E->control.data_file);
+    E->output.fpqb = output_open(output_file);
+  }else{
+    E->output.fpqb = NULL;
+  }
   
 
   return;



More information about the cig-commits mailing list