[cig-commits] r12656 - in seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta: setup src

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Sat Aug 16 14:44:53 PDT 2008


Author: dkomati1
Date: 2008-08-16 14:44:53 -0700 (Sat, 16 Aug 2008)
New Revision: 12656

Modified:
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/constants.h
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/compute_forces_crust_mantle.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/memory_eval.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/read_compute_parameters.F90
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/save_header_file.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/specfem3D.F90
Log:
reverted part of a change I made a few hours ago to improve performance when computing attenuation because with Intel ifort it in fact made the code slower


Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/constants.h
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/constants.h	2008-08-16 17:43:17 UTC (rev 12655)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/constants.h	2008-08-16 21:44:53 UTC (rev 12656)
@@ -182,7 +182,7 @@
   logical, parameter :: MESHER_ONLY = .false.
 
 ! flag to put a fictitious source in each region in the case of a serial test
-  logical, parameter :: PUT_SOURCE_IN_EACH_REGION = .true.
+  logical, parameter :: PUT_SOURCE_IN_EACH_REGION = .false.
 
 !------------------------------------------------------
 !----------- do not modify anything below -------------

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/compute_forces_crust_mantle.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/compute_forces_crust_mantle.f90	2008-08-16 17:43:17 UTC (rev 12655)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/compute_forces_crust_mantle.f90	2008-08-16 21:44:53 UTC (rev 12656)
@@ -157,7 +157,6 @@
   real(kind=CUSTOM_REAL) tempy1l,tempy2l,tempy3l
   real(kind=CUSTOM_REAL) tempz1l,tempz2l,tempz3l
 
-! for gravity
   real(kind=CUSTOM_REAL) radius_cr
 
 ! ****************************************************
@@ -256,23 +255,8 @@
 
 ! precompute terms for attenuation if needed
   if(ATTENUATION_VAL) then
-!! DK DK do not call Brian's routine anymore, to improve performance I rewrote it differently
     radius_cr = xstore(ibool(i,j,k,ispec))
-!!!    call get_attenuation_index(idoubling(ispec), dble(radius_cr), iregion_selected, .FALSE., AM_V)
-    iregion_selected = nint(radius_cr * TABLE_ATTENUATION)
-    if(idoubling(ispec) == IFLAG_MANTLE_NORMAL) then
-      iregion = IREGION_ATTENUATION_CMB_670
-    else if(idoubling(ispec) == IFLAG_670_220) then
-      iregion = IREGION_ATTENUATION_670_220
-    else if(idoubling(ispec) == IFLAG_220_80) then
-      iregion = IREGION_ATTENUATION_220_80
-    else if(idoubling(ispec) == IFLAG_CRUST .or. idoubling(ispec) == IFLAG_80_MOHO) then
-      iregion = IREGION_ATTENUATION_80_SURFACE
-    endif
-! clamp regions
-    if(iregion_selected < AM_V%Qrmin(iregion)) iregion_selected = AM_V%Qrmin(iregion)
-    if(iregion_selected > AM_V%Qrmax(iregion)) iregion_selected = AM_V%Qrmax(iregion)
-!! DK DK do not call Brian's routine anymore, to improve performance I rewrote it differently
+    call get_attenuation_index(idoubling(ispec), dble(radius_cr), iregion_selected, .FALSE., AM_V)
     one_minus_sum_beta_use = one_minus_sum_beta(1,1,1,iregion_selected)
     minus_sum_beta =  one_minus_sum_beta_use - 1.0
   endif

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/memory_eval.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/memory_eval.f90	2008-08-16 17:43:17 UTC (rev 12655)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/memory_eval.f90	2008-08-16 21:44:53 UTC (rev 12656)
@@ -101,7 +101,7 @@
   enddo
 !! DK DK the above code by David is incorrect when SUPPRESS_CRUSTAL_MESH = .true.
 !! DK DK therefore apply a temporary patch for now
-!! DK DK we should fix the above code later
+!! DK DK we should fix the above code later because this patch wastes memory
   if(SUPPRESS_CRUSTAL_MESH) nspec_tiso = NSPEC(IREGION_CRUST_MANTLE)
 
 ! define static size of the arrays whose size depends on logical tests

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/read_compute_parameters.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/read_compute_parameters.F90	2008-08-16 17:43:17 UTC (rev 12655)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/read_compute_parameters.F90	2008-08-16 21:44:53 UTC (rev 12656)
@@ -781,10 +781,6 @@
       if (NER_CRUST<2) NER_CRUST=2
     endif
 
-! take a 5% safety margin on the maximum stable time step
-! which was obtained by trial and error
-!!!!!!!!!!!!!!!!!!  DT = DT * (1.d0 - 0.05d0)
-
 ! determine suitable attenuation periods for the mesh
   call auto_attenuation_periods(ANGULAR_WIDTH_XI_IN_DEGREES,NEX_MAX,MIN_ATTENUATION_PERIOD,MAX_ATTENUATION_PERIOD)
 

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/save_header_file.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/save_header_file.f90	2008-08-16 17:43:17 UTC (rev 12655)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/save_header_file.f90	2008-08-16 21:44:53 UTC (rev 12656)
@@ -463,8 +463,7 @@
   write(IOUT,*) 'integer, parameter :: NSPEC2D_BOTTOM_OC = ',NSPEC2D_BOTTOM(IREGION_OUTER_CORE)
   write(IOUT,*) 'integer, parameter :: NSPEC2D_TOP_OC = ',NSPEC2D_TOP(IREGION_OUTER_CORE)
 
-  ! for boundary kernels
-
+! for boundary kernels
   if (SAVE_BOUNDARY_MESH) then
     NSPEC2D_MOHO = NSPEC2D_TOP(IREGION_CRUST_MANTLE)
     NSPEC2D_400 = NSPEC2D_MOHO / 4

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/specfem3D.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/specfem3D.F90	2008-08-16 17:43:17 UTC (rev 12655)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/specfem3D.F90	2008-08-16 21:44:53 UTC (rev 12656)
@@ -2498,7 +2498,7 @@
             seismo_offset,seismo_current,WRITE_SEISMOGRAMS_BY_MASTER, &
             SAVE_ALL_SEISMOS_IN_ONE_FILE,USE_BINARY_FOR_LARGE_FILE,one_seismogram,scale_displ,nu)
 
-      if(myrank==0) then
+      if(myrank == 0) then
         write(IMAIN,*)
         write(IMAIN,*) ' Total number of time steps written: ',it-it_begin+1
         write(IMAIN,*)



More information about the cig-commits mailing list