[cig-commits] [commit] master: fix a memory leak problem with buildgammadot0 (88a92d8)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Apr 10 03:02:44 PDT 2014


Repository : ssh://geoshell/relax

On branch  : master
Link       : https://github.com/geodynamics/relax/compare/f58c3e4a3b537ce548f0dc9b6301d68585ba7587...64bc932cf611ccf4683972590830ed18b974c6e9

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

commit 88a92d886bfa5bc09f9d672917085eee1635d792
Author: Sylvain Barbot <sbarbot at ntu.edu.sg>
Date:   Sat Mar 22 22:34:03 2014 +0800

    fix a memory leak problem with buildgammadot0


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

88a92d886bfa5bc09f9d672917085eee1635d792
 src/relax.f90 | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/relax.f90 b/src/relax.f90
index e1682f2..1edd3d5 100644
--- a/src/relax.f90
+++ b/src/relax.f90
@@ -177,16 +177,14 @@
   !! (04-26-11) - include command-line arguments
   !! (11-04-11) - compatible with gfortran                         <br>
   !! (07-25-13) - include cylindrical and spherical ductile zones  <br>
+  !! (01-03-14) - accelerate processing of ductile zones           <br>
   !!
   !! \todo 
   !!   - homogenize VTK output so that geometry of events match event index
   !!   - evaluate Green's function, stress and body forces in GPU
   !!   - write the code for MPI multi-thread
-  !!   - fix the vtk export to grid for anisotropic sampling
   !!   - export position of observation points to long/lat in opts-geo.dat
-  !!   - check the projected output on the south hemisphere
   !!   - check the fully-relaxed afterslip for uniform stress change
-  !!   - include topography of parameter interface
   !!   - export afterslip output in VTK legacy format (binary)
   !!   - export ductile zones for cylindrical and spherical geometries
   !------------------------------------------------------------------------
@@ -465,9 +463,9 @@ PROGRAM relax
      DEALLOCATE(in%linearlayer)
 
      IF (0 .LT. in%nlwz) THEN
-        ALLOCATE(lineardgammadot0(in%sx1,in%sx2,in%sx3),STAT=iostatus)
+        ALLOCATE(lineardgammadot0(in%sx1,in%sx2,in%sx3/2),STAT=iostatus)
         IF (iostatus.GT.0) STOP "could not allocate lineardgammadot0"
-        CALL builddgammadot0(in%sx1,in%sx2,in%sx3,in%dx1,in%dx2,in%dx3,in%beta, &
+        CALL builddgammadot0(in%sx1,in%sx2,in%sx3/2,in%dx1,in%dx2,in%dx3,in%beta, &
                              in%nlwz,in%linearweakzone,lineardgammadot0)
      END IF
   END IF
@@ -480,9 +478,9 @@ PROGRAM relax
      DEALLOCATE(in%nonlinearlayer)
 
      IF (0 .LT. in%nnlwz) THEN
-        ALLOCATE(nonlineardgammadot0(in%sx1,in%sx2,in%sx3),STAT=iostatus)
+        ALLOCATE(nonlineardgammadot0(in%sx1,in%sx2,in%sx3/2),STAT=iostatus)
         IF (iostatus.GT.0) STOP "could not allocate nonlineardgammadot0"
-        CALL builddgammadot0(in%sx1,in%sx2,in%sx3,in%dx1,in%dx2,in%dx3,in%beta, &
+        CALL builddgammadot0(in%sx1,in%sx2,in%sx3/2,in%dx1,in%dx2,in%dx3,in%beta, &
                              in%nnlwz,in%nonlinearweakzone,nonlineardgammadot0)
      END IF
   END IF



More information about the CIG-COMMITS mailing list