[cig-commits] r12821 - seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Fri Sep 5 15:48:48 PDT 2008
Author: dkomati1
Date: 2008-09-05 15:48:47 -0700 (Fri, 05 Sep 2008)
New Revision: 12821
Modified:
seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/main_program.F90
Log:
added test to check that there is no overlap between arrays due to the "equivalence" statement
Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/main_program.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/main_program.F90 2008-09-05 20:25:45 UTC (rev 12820)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/main_program.F90 2008-09-05 22:48:47 UTC (rev 12821)
@@ -425,6 +425,17 @@
if(CUSTOM_REAL /= 4) &
stop 'some of the equivalence statements used to save memory do not work in double precision, please edit and recompile'
+! make sure there is no overlap between arrays due to the "equivalence" statement
+ etax_crust_mantle = -10._CUSTOM_REAL
+ gammax_crust_mantle = +20._CUSTOM_REAL
+ if(any(etax_crust_mantle) > -9.999_CUSTOM_REAL .or. any(gammax_crust_mantle) < 19.999_CUSTOM_REAL) &
+ stop 'error: memory overlap between arrays in equivalence statement'
+
+ gammax_crust_mantle = +20._CUSTOM_REAL
+ etax_crust_mantle = -10._CUSTOM_REAL
+ if(any(etax_crust_mantle) > -9.999_CUSTOM_REAL .or. any(gammax_crust_mantle) < 19.999_CUSTOM_REAL) &
+ stop 'error: memory overlap between arrays in equivalence statement'
+
! YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
!! DK DK for the merged version, mesher inserted here
More information about the cig-commits
mailing list