[cig-commits] r22605 - in seismo/3D/SPECFEM3D_GLOBE/trunk/src: shared specfem3D

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Sun Jul 14 07:39:27 PDT 2013


Author: dkomati1
Date: 2013-07-14 07:39:27 -0700 (Sun, 14 Jul 2013)
New Revision: 22605

Modified:
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/save_header_file.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_element.F90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_crust_mantle_noDev.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_inner_core_Dev.F90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_inner_core_noDev.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/initialize_simulation.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/specfem3D.F90
Log:
renamed COMPUTE_AND_STORE_STRAIN to COMPUTE_AND_STORE_STRAIN_VAL for clarity


Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/save_header_file.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/save_header_file.f90	2013-07-14 13:50:52 UTC (rev 22604)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/shared/save_header_file.f90	2013-07-14 14:39:27 UTC (rev 22605)
@@ -545,9 +545,9 @@
   ! attenuation and/or adjoint simulations
   if (ATTENUATION .or. SIMULATION_TYPE /= 1 .or. SAVE_FORWARD &
     .or. (MOVIE_VOLUME .and. SIMULATION_TYPE /= 3)) then
-    write(IOUT,*) 'logical, parameter :: COMPUTE_AND_STORE_STRAIN = .true.'
+    write(IOUT,*) 'logical, parameter :: COMPUTE_AND_STORE_STRAIN_VAL = .true.'
   else
-    write(IOUT,*) 'logical, parameter :: COMPUTE_AND_STORE_STRAIN = .false.'
+    write(IOUT,*) 'logical, parameter :: COMPUTE_AND_STORE_STRAIN_VAL = .false.'
   endif
   write(IOUT,*)
 

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_element.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_element.F90	2013-07-14 13:50:52 UTC (rev 22604)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_element.F90	2013-07-14 14:39:27 UTC (rev 22605)
@@ -165,7 +165,7 @@
 !ZN where U is the displacement vector and grad the gradient operator, i.e. there is a 1/2 factor difference between the two.
 !ZN Both expressions are fine, but we need to keep in mind that if we put the 1/2 factor here there we need to remove it
 !ZN from the expression in which we use the strain later in the code.
-        if (COMPUTE_AND_STORE_STRAIN) then
+        if (COMPUTE_AND_STORE_STRAIN_VAL) then
           templ = ONE_THIRD * (duxdxl + duydyl + duzdzl)
           eps_trace_over_3_loc(i,j,k) = templ
           epsilondev_loc(1,i,j,k) = duxdxl - templ
@@ -207,10 +207,7 @@
 
         ! subtract memory variables if attenuation
         if(ATTENUATION_VAL .and. .not. PARTIAL_PHYS_DISPERSION_ONLY) then
-
-!         ! note: Fortran passes pointers to array location, thus using R_memory(1,1,...) is fine
-!         call compute_element_att_stress(R_memory(1,1,i,j,k,ispec), &
-!                                         sigma_xx,sigma_yy,sigma_zz,sigma_xy,sigma_xz,sigma_yz)
+! do NOT put this is a subroutine, otherwise the call to the subroutine prevents compilers from vectorizing the outer loop
           do i_SLS = 1,N_SLS
             R_xx_val = R_memory(1,i_SLS,i,j,k,ispec)
             R_yy_val = R_memory(2,i_SLS,i,j,k,ispec)
@@ -221,7 +218,6 @@
             sigma_xz = sigma_xz - R_memory(4,i_SLS,i,j,k,ispec)
             sigma_yz = sigma_yz - R_memory(5,i_SLS,i,j,k,ispec)
           enddo
-
         endif ! ATTENUATION_VAL
 
         ! define symmetric components of sigma for gravity
@@ -513,7 +509,7 @@
 !ZN where U is the displacement vector and grad the gradient operator, i.e. there is a 1/2 factor difference between the two.
 !ZN Both expressions are fine, but we need to keep in mind that if we put the 1/2 factor here there we need to remove it
 !ZN from the expression in which we use the strain later in the code.
-        if (COMPUTE_AND_STORE_STRAIN) then
+        if (COMPUTE_AND_STORE_STRAIN_VAL) then
           templ = ONE_THIRD * (duxdxl + duydyl + duzdzl)
           eps_trace_over_3_loc(i,j,k) = templ
           epsilondev_loc(1,i,j,k) = duxdxl - templ
@@ -742,10 +738,7 @@
 
         ! subtract memory variables if attenuation
         if(ATTENUATION_VAL .and. .not. PARTIAL_PHYS_DISPERSION_ONLY) then
-
-!         ! note: Fortran passes pointers to array location, thus using R_memory(1,1,...) is fine
-!         call compute_element_att_stress(R_memory(1,1,i,j,k,ispec), &
-!                                         sigma_xx,sigma_yy,sigma_zz,sigma_xy,sigma_xz,sigma_yz)
+! do NOT put this is a subroutine, otherwise the call to the subroutine prevents compilers from vectorizing the outer loop
           do i_SLS = 1,N_SLS
             R_xx_val = R_memory(1,i_SLS,i,j,k,ispec)
             R_yy_val = R_memory(2,i_SLS,i,j,k,ispec)
@@ -756,7 +749,6 @@
             sigma_xz = sigma_xz - R_memory(4,i_SLS,i,j,k,ispec)
             sigma_yz = sigma_yz - R_memory(5,i_SLS,i,j,k,ispec)
           enddo
-
         endif ! ATTENUATION_VAL
 
         ! define symmetric components of sigma for gravity
@@ -1040,7 +1032,7 @@
 !ZN where U is the displacement vector and grad the gradient operator, i.e. there is a 1/2 factor difference between the two.
 !ZN Both expressions are fine, but we need to keep in mind that if we put the 1/2 factor here there we need to remove it
 !ZN from the expression in which we use the strain later in the code.
-        if (COMPUTE_AND_STORE_STRAIN) then
+        if (COMPUTE_AND_STORE_STRAIN_VAL) then
           templ = ONE_THIRD * (duxdxl + duydyl + duzdzl)
           eps_trace_over_3_loc(i,j,k) = templ
           epsilondev_loc(1,i,j,k) = duxdxl - templ
@@ -1119,10 +1111,7 @@
 
         ! subtract memory variables if attenuation
         if(ATTENUATION_VAL .and. .not. PARTIAL_PHYS_DISPERSION_ONLY) then
-
-!         ! note: Fortran passes pointers to array location, thus using R_memory(1,1,...) is fine
-!         call compute_element_att_stress(R_memory(1,1,i,j,k,ispec), &
-!                                         sigma_xx,sigma_yy,sigma_zz,sigma_xy,sigma_xz,sigma_yz)
+! do NOT put this is a subroutine, otherwise the call to the subroutine prevents compilers from vectorizing the outer loop
           do i_SLS = 1,N_SLS
             R_xx_val = R_memory(1,i_SLS,i,j,k,ispec)
             R_yy_val = R_memory(2,i_SLS,i,j,k,ispec)
@@ -1133,7 +1122,6 @@
             sigma_xz = sigma_xz - R_memory(4,i_SLS,i,j,k,ispec)
             sigma_yz = sigma_yz - R_memory(5,i_SLS,i,j,k,ispec)
           enddo
-
         endif ! ATTENUATION_VAL
 
         ! define symmetric components of sigma for gravity

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_crust_mantle_noDev.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_crust_mantle_noDev.f90	2013-07-14 13:50:52 UTC (rev 22604)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_crust_mantle_noDev.f90	2013-07-14 14:39:27 UTC (rev 22605)
@@ -369,7 +369,7 @@
 !ZN where U is the displacement vector and grad the gradient operator, i.e. there is a 1/2 factor difference between the two.
 !ZN Both expressions are fine, but we need to keep in mind that if we put the 1/2 factor here there we need to remove it
 !ZN from the expression in which we use the strain later in the code.
-          if (COMPUTE_AND_STORE_STRAIN) then
+          if (COMPUTE_AND_STORE_STRAIN_VAL) then
             templ = ONE_THIRD * (duxdxl + duydyl + duzdzl)
             epsilondev_loc(1,i,j,k) = duxdxl - templ
             epsilondev_loc(2,i,j,k) = duydyl - templ

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_inner_core_Dev.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_inner_core_Dev.F90	2013-07-14 13:50:52 UTC (rev 22604)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_inner_core_Dev.F90	2013-07-14 14:39:27 UTC (rev 22605)
@@ -434,7 +434,7 @@
             duzdxl_plus_duxdzl = duzdxl + duxdzl
             duzdyl_plus_duydzl = duzdyl + duydzl
 
-            if (COMPUTE_AND_STORE_STRAIN) then
+            if (COMPUTE_AND_STORE_STRAIN_VAL) then
               templ = ONE_THIRD * (duxdxl + duydyl + duzdzl)
               epsilondev_loc(1,i,j,k) = duxdxl - templ
               epsilondev_loc(2,i,j,k) = duydyl - templ
@@ -519,10 +519,7 @@
 
             ! subtract memory variables if attenuation
             if(ATTENUATION_VAL .and. .not. PARTIAL_PHYS_DISPERSION_ONLY) then
-
-!             ! note: Fortran passes pointers to array location, thus using R_memory(1,1,...) is fine
-!             call compute_element_att_stress(R_memory(1,1,i,j,k,ispec), &
-!                                             sigma_xx,sigma_yy,sigma_zz,sigma_xy,sigma_xz,sigma_yz)
+! do NOT put this is a subroutine, otherwise the call to the subroutine prevents compilers from vectorizing the outer loop
               do i_SLS = 1,N_SLS
                 R_xx_val = R_memory(1,i_SLS,i,j,k,ispec)
                 R_yy_val = R_memory(2,i_SLS,i,j,k,ispec)
@@ -533,7 +530,6 @@
                 sigma_xz = sigma_xz - R_memory(4,i_SLS,i,j,k,ispec)
                 sigma_yz = sigma_yz - R_memory(5,i_SLS,i,j,k,ispec)
               enddo
-
             endif
 
             ! define symmetric components of sigma for gravity

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_inner_core_noDev.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_inner_core_noDev.f90	2013-07-14 13:50:52 UTC (rev 22604)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/compute_forces_inner_core_noDev.f90	2013-07-14 14:39:27 UTC (rev 22605)
@@ -348,7 +348,7 @@
 !ZN where U is the displacement vector and grad the gradient operator, i.e. there is a 1/2 factor difference between the two.
 !ZN Both expressions are fine, but we need to keep in mind that if we put the 1/2 factor here there we need to remove it
 !ZN from the expression in which we use the strain later in the code.
-          if (COMPUTE_AND_STORE_STRAIN) then
+          if (COMPUTE_AND_STORE_STRAIN_VAL) then
             templ = ONE_THIRD * (duxdxl + duydyl + duzdzl)
             epsilondev_loc(1,i,j,k) = duxdxl - templ
             epsilondev_loc(2,i,j,k) = duydyl - templ

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/initialize_simulation.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/initialize_simulation.f90	2013-07-14 13:50:52 UTC (rev 22604)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/initialize_simulation.f90	2013-07-14 14:39:27 UTC (rev 22605)
@@ -463,10 +463,10 @@
   ! checks strain storage
   if (ATTENUATION_VAL .or. SIMULATION_TYPE /= 1 .or. SAVE_FORWARD &
     .or. (MOVIE_VOLUME .and. SIMULATION_TYPE /= 3)) then
-    if( COMPUTE_AND_STORE_STRAIN .neqv. .true. ) &
+    if( COMPUTE_AND_STORE_STRAIN_VAL .neqv. .true. ) &
       call exit_MPI(myrank, 'error in compiled compute_and_store_strain parameter, please recompile solver 19')
   else
-    if( COMPUTE_AND_STORE_STRAIN .neqv. .false. ) &
+    if( COMPUTE_AND_STORE_STRAIN_VAL .neqv. .false. ) &
       call exit_MPI(myrank, 'error in compiled compute_and_store_strain parameter, please recompile solver 20')
   endif
 

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/specfem3D.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/specfem3D.F90	2013-07-14 13:50:52 UTC (rev 22604)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/src/specfem3D/specfem3D.F90	2013-07-14 14:39:27 UTC (rev 22605)
@@ -1134,7 +1134,7 @@
   undo_att_sim_type_3 = .false.
 
 ! ZN if we want to storing the strain to acclerate the code but cost more memory then
-  if(ATTENUATION_VAL .and. COMPUTE_AND_STORE_STRAIN)then
+  if(ATTENUATION_VAL .and. COMPUTE_AND_STORE_STRAIN_VAL)then
     allocate(epsilondev_crust_mantle(5,NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ATTENUAT),stat=ier)
     if( ier /= 0 ) call exit_MPI(myrank,'error allocating epsilondev_crust_mantle')
     allocate(eps_trace_over_3_crust_mantle(NGLLX,NGLLY,NGLLZ,NSPEC_CRUST_MANTLE_ATTENUAT),stat=ier)
@@ -2355,7 +2355,7 @@
     div_displ_outer_core(:,:,:,:) = 0._CUSTOM_REAL
   endif
 
-  if (COMPUTE_AND_STORE_STRAIN) then
+  if (COMPUTE_AND_STORE_STRAIN_VAL) then
     if(MOVIE_VOLUME .and. (MOVIE_VOLUME_TYPE == 2 .or. MOVIE_VOLUME_TYPE == 3)) then
       Iepsilondev_crust_mantle(:,:,:,:,:) = 0._CUSTOM_REAL
       Ieps_trace_over_3_crust_mantle(:,:,:,:)=0._CUSTOM_REAL
@@ -2592,9 +2592,9 @@
       it_temp = it
       seismo_current_temp = seismo_current
 
-        if(COMPUTE_AND_STORE_STRAIN) then
+        if(COMPUTE_AND_STORE_STRAIN_VAL) then
           if(.not. USE_DEVILLE_PRODUCTS_VAL) &
-             call exit_MPI(myrank,'COMPUTE_AND_STORE_STRAIN is not implemented without USE_DEVILLE_PRODUCTS_VAL')
+             call exit_MPI(myrank,'COMPUTE_AND_STORE_STRAIN_VAL is not implemented without USE_DEVILLE_PRODUCTS_VAL')
           do ispec = 1, NSPEC_INNER_CORE
             call compute_element_strain_att_Dev(ispec,NGLOB_INNER_CORE,NSPEC_INNER_CORE,b_displ_inner_core,&
                                             b_veloc_inner_core,0._CUSTOM_REAL,ibool_inner_core,hprime_xx,hprime_xxT,&
@@ -2642,9 +2642,9 @@
       it = it_temp
       seismo_current = seismo_current_temp
 
-      if(COMPUTE_AND_STORE_STRAIN) then
+      if(COMPUTE_AND_STORE_STRAIN_VAL) then
         if(.not. USE_DEVILLE_PRODUCTS_VAL) &
-           call exit_MPI(myrank,'COMPUTE_AND_STORE_STRAIN is not implemented without USE_DEVILLE_PRODUCTS_VAL')
+           call exit_MPI(myrank,'COMPUTE_AND_STORE_STRAIN_VAL is not implemented without USE_DEVILLE_PRODUCTS_VAL')
         do ispec = 1, NSPEC_INNER_CORE
           call compute_element_strain_att_Dev(ispec,NGLOB_INNER_CORE,NSPEC_INNER_CORE,displ_inner_core,&
                                             veloc_inner_core,0._CUSTOM_REAL,ibool_inner_core,hprime_xx,hprime_xxT,&



More information about the CIG-COMMITS mailing list