[cig-commits] r8528 - in seismo/2D/SPECFEM2D/trunk: . DATA

walter at geodynamics.org walter at geodynamics.org
Fri Dec 7 15:53:46 PST 2007


Author: walter
Date: 2007-12-07 15:53:46 -0800 (Fri, 07 Dec 2007)
New Revision: 8528

Modified:
   seismo/2D/SPECFEM2D/trunk/DATA/STATIONS
   seismo/2D/SPECFEM2D/trunk/TODO_list
   seismo/2D/SPECFEM2D/trunk/specfem2D.F90
Log:
output of source time function in a text file done by one process only in case of a parallel job.

Modified: seismo/2D/SPECFEM2D/trunk/DATA/STATIONS
===================================================================
--- seismo/2D/SPECFEM2D/trunk/DATA/STATIONS	2007-06-26 00:43:10 UTC (rev 8527)
+++ seismo/2D/SPECFEM2D/trunk/DATA/STATIONS	2007-12-07 23:53:46 UTC (rev 8528)
@@ -1,12 +1,12 @@
           11
-S0001    AA          300.0000000         2200.0000000       0.0         0.0
-S0002    AA          640.0000000         2200.0000000       0.0         0.0
-S0003    AA          980.0000000         2200.0000000       0.0         0.0
-S0004    AA         1320.0000000         2200.0000000       0.0         0.0
-S0005    AA         1660.0000000         2200.0000000       0.0         0.0
-S0006    AA         2000.0000000         2200.0000000       0.0         0.0
-S0007    AA         2340.0000000         2200.0000000       0.0         0.0
-S0008    AA         2680.0000000         2200.0000000       0.0         0.0
-S0009    AA         3020.0000000         2200.0000000       0.0         0.0
-S0010    AA         3360.0000000         2200.0000000       0.0         0.0
-S0011    AA         3700.0000000         2200.0000000       0.0         0.0
+S0001    AA          300.0000000         2997.7298909       0.0         0.0
+S0002    AA          640.0000000         3008.0430011       0.0         0.0
+S0003    AA          980.0000000         3090.8224062       0.0         0.0
+S0004    AA         1320.0000000         3283.0303923       0.0         0.0
+S0005    AA         1660.0000000         3347.8768862       0.0         0.0
+S0006    AA         2000.0000000         3250.0000000       0.0         0.0
+S0007    AA         2340.0000000         3197.3138031       0.0         0.0
+S0008    AA         2680.0000000         3150.9619873       0.0         0.0
+S0009    AA         3020.0000000         3086.5939051       0.0         0.0
+S0010    AA         3360.0000000         3042.8523748       0.0         0.0
+S0011    AA         3700.0000000         3020.6886768       0.0         0.0

Modified: seismo/2D/SPECFEM2D/trunk/TODO_list
===================================================================
--- seismo/2D/SPECFEM2D/trunk/TODO_list	2007-06-26 00:43:10 UTC (rev 8527)
+++ seismo/2D/SPECFEM2D/trunk/TODO_list	2007-12-07 23:53:46 UTC (rev 8528)
@@ -1,5 +1,4 @@
 - enabling output of vectxxx.ps files in parallel.
-- enabling output of source.txt file in parallel.
 - looking for a better way to show mesh partitioning.
 - splitting file part_unstruct.F90 in several files for clarity purpose.
 - improving compiling with SCOTCH (issue with header file scotchf.h which is Fortran77 legal). Having our own scotchf.h file (without the comments) is ugly.

Modified: seismo/2D/SPECFEM2D/trunk/specfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/specfem2D.F90	2007-06-26 00:43:10 UTC (rev 8527)
+++ seismo/2D/SPECFEM2D/trunk/specfem2D.F90	2007-12-07 23:53:46 UTC (rev 8528)
@@ -1366,10 +1366,12 @@
 
     allocate(source_time_function(NSTEP))
 
+      if ( myrank == 0 ) then
     write(IOUT,*)
     write(IOUT,*) 'Saving the source time function in a text file...'
     write(IOUT,*)
     open(unit=55,file='OUTPUT_FILES/source.txt',status='unknown')
+      endif
 
 ! loop on all the time steps
     do it = 1,NSTEP
@@ -1400,12 +1402,15 @@
       endif
 
 ! output absolute time in third column, in case user wants to check it as well
+      if ( myrank == 0 ) then
       write(55,*) sngl(time),sngl(source_time_function(it)),sngl(time-t0)
-
+      endif
    enddo
-
+      
+      if ( myrank == 0 ) then
     close(55)
-    
+      endif
+      
     source_time_function(:) = source_time_function(:) / nb_proc_source
 
   else



More information about the cig-commits mailing list