[cig-commits] [commit] master: Once more, all procs tried to write into the same XDMF file (201b2a8)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 12 04:11:13 PST 2014


Repository : https://github.com/geodynamics/axisem

On branch  : master
Link       : https://github.com/geodynamics/axisem/compare/d0d174d06544d8ff9dab23bb84b619d7bc90e20d...201b2a8c3949bb5acd44c5b1f0eeaba0012815d3

>---------------------------------------------------------------

commit 201b2a8c3949bb5acd44c5b1f0eeaba0012815d3
Author: Simon Stähler <staehler at geophysik.uni-muenchen.de>
Date:   Wed Nov 12 13:10:19 2014 +0100

    Once more, all procs tried to write into the same XDMF file
    
     - Caused weird hang-ups on massively parallel runs.


>---------------------------------------------------------------

201b2a8c3949bb5acd44c5b1f0eeaba0012815d3
 SOLVER/time_evol_wave.F90 | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/SOLVER/time_evol_wave.F90 b/SOLVER/time_evol_wave.F90
index 4dcd3bf..67ab643 100644
--- a/SOLVER/time_evol_wave.F90
+++ b/SOLVER/time_evol_wave.F90
@@ -178,19 +178,22 @@ subroutine prepare_waves
   ! allow for different types of receiver files
   call prepare_from_recfile_seis
   
-  ! dump meshes for displ_only kwf output
-  if (dump_wavefields .and. dump_type == "displ_only") then 
-     call dump_kwf_midpoint_xdmf(datapath(1:lfdata)//'/axisem_output.nc4', &
-                                 npoint_kwf_global, nelem_kwf_global)
-     call dump_kwf_fem_xdmf(datapath(1:lfdata)//'/axisem_output.nc4', &
-                                 npoint_kwf_global, nelem_kwf_global)
-     call dump_kwf_sem_xdmf(datapath(1:lfdata)//'/axisem_output.nc4', &
-                                 npoint_kwf_global, nelem_kwf_global)
-
-  else if (dump_wavefields .and. dump_type == "strain_only") then 
-     call dump_kwf_gll_xdmf(datapath(1:lfdata)//'/axisem_output.nc4', &
-                                 npoint_kwf_global)
-  endif
+  if (lpr) then ! This has to be called by just one processor. Since 0 will have to
+                ! do more stuff further below, let's assign lpr to this task
+     ! dump meshes for displ_only kwf output
+     if (dump_wavefields .and. dump_type == "displ_only") then 
+        call dump_kwf_midpoint_xdmf(datapath(1:lfdata)//'/axisem_output.nc4', &
+                                    npoint_kwf_global, nelem_kwf_global)
+        call dump_kwf_fem_xdmf(datapath(1:lfdata)//'/axisem_output.nc4', &
+                                    npoint_kwf_global, nelem_kwf_global)
+        call dump_kwf_sem_xdmf(datapath(1:lfdata)//'/axisem_output.nc4', &
+                                    npoint_kwf_global, nelem_kwf_global)
+
+     else if (dump_wavefields .and. dump_type == "strain_only") then 
+        call dump_kwf_gll_xdmf(datapath(1:lfdata)//'/axisem_output.nc4', &
+                                    npoint_kwf_global)
+     endif
+  end if !lpr
 
   ! Need to reload old seismograms and add results
   if (isim>1 .and. sum_seis ) then  



More information about the CIG-COMMITS mailing list