[cig-commits] r12679 - seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Mon Aug 18 16:19:01 PDT 2008


Author: dkomati1
Date: 2008-08-18 16:19:01 -0700 (Mon, 18 Aug 2008)
New Revision: 12679

Modified:
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/specfem3D.F90
Log:
fixed the segmentation fault problem when calling write_seismograms: some allocatable arrays used as arguments were not allocated when nrec_local = 0 (i.e., no local receiver in a given mesh slice)


Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/specfem3D.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/specfem3D.F90	2008-08-18 22:18:45 UTC (rev 12678)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/specfem3D.F90	2008-08-18 23:19:01 UTC (rev 12679)
@@ -1103,6 +1103,9 @@
     hgammar_store(irec_local,:) = hgammar(:)
   enddo
 
+  else
+! allocate dummy array to be able to call subroutines with this argument
+    allocate(number_receiver_global(1),STAT=ier)
   endif ! nrec_local
 
 ! check that the sum of the number of receivers in each slice is nrec
@@ -1569,6 +1572,11 @@
     uydstore(:,:) = 0.d0
     uzdstore(:,:) = 0.d0
     nit_written = 0
+  else
+! allocate dummy arrays to be able to call subroutines with these arguments
+    allocate(uxdstore(1,1),stat=ier)
+    allocate(uydstore(1,1),stat=ier)
+    allocate(uzdstore(1,1),stat=ier)
   endif
 #endif
 



More information about the cig-commits mailing list