[cig-commits] [commit] devel: fixed two compilation errors detected by David Luet when configuring with --enable-double-precision (7616dfa)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Jul 30 14:01:19 PDT 2014


Repository : https://github.com/geodynamics/specfem3d

On branch  : devel
Link       : https://github.com/geodynamics/specfem3d/compare/626009410516d2eee650f64ea0e006147982416e...7616dfa81fe0573db3a26c89be8f849861a631aa

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

commit 7616dfa81fe0573db3a26c89be8f849861a631aa
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Wed Jul 30 22:51:24 2014 +0200

    fixed two compilation errors detected by David Luet when configuring with --enable-double-precision


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

7616dfa81fe0573db3a26c89be8f849861a631aa
 src/specfem3D/fault_solver_dynamic.f90 |  6 +++---
 src/specfem3D/save_adjoint_kernels.f90 | 10 ++++++++--
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/specfem3D/fault_solver_dynamic.f90 b/src/specfem3D/fault_solver_dynamic.f90
index fda5dd2..3d3fbc7 100644
--- a/src/specfem3D/fault_solver_dynamic.f90
+++ b/src/specfem3D/fault_solver_dynamic.f90
@@ -515,15 +515,15 @@ subroutine BC_DYNFLT_set3d(bc,MxA,V,D,iflt)
       theta_old = bc%rsf%theta
       call rsf_update_state(Vf_old,bc%dt,bc%rsf)
       do i=1,bc%nglob
-        Vf_new(i)=rtsafe(funcd,0.0,Vf_old(i)+5.0,1e-5,tStick(i),-T(3,i),bc%Z(i),bc%rsf%f0(i), &
+        Vf_new(i)=rtsafe(funcd,0.0_CUSTOM_REAL,Vf_old(i)+5.0_CUSTOM_REAL,1e-5_CUSTOM_REAL,tStick(i),-T(3,i),bc%Z(i),bc%rsf%f0(i), &
                          bc%rsf%V0(i),bc%rsf%a(i),bc%rsf%b(i),bc%rsf%L(i),bc%rsf%theta(i),bc%rsf%StateLaw)
       enddo
 
       ! second pass
       bc%rsf%theta = theta_old
-      call rsf_update_state(0.5e0_CUSTOM_REAL*(Vf_old + Vf_new),bc%dt,bc%rsf)
+      call rsf_update_state(0.5_CUSTOM_REAL*(Vf_old + Vf_new),bc%dt,bc%rsf)
       do i=1,bc%nglob
-        Vf_new(i)=rtsafe(funcd,0.0,Vf_old(i)+5.0,1e-5,tStick(i),-T(3,i),bc%Z(i),bc%rsf%f0(i), &
+        Vf_new(i)=rtsafe(funcd,0.0_CUSTOM_REAL,Vf_old(i)+5.0_CUSTOM_REAL,1e-5_CUSTOM_REAL,tStick(i),-T(3,i),bc%Z(i),bc%rsf%f0(i), &
                          bc%rsf%V0(i),bc%rsf%a(i),bc%rsf%b(i),bc%rsf%L(i),bc%rsf%theta(i),bc%rsf%StateLaw)
       enddo
 
diff --git a/src/specfem3D/save_adjoint_kernels.f90 b/src/specfem3D/save_adjoint_kernels.f90
index 13401f3..9c73085 100644
--- a/src/specfem3D/save_adjoint_kernels.f90
+++ b/src/specfem3D/save_adjoint_kernels.f90
@@ -55,6 +55,8 @@ subroutine save_adjoint_kernels()
                                     betav_kl, betah_kl, eta_kl,         &
                                     rhop_kl, alpha_kl, beta_kl)
 
+      use constants, only: CUSTOM_REAL
+
       integer(kind=8) :: adios_handle
       ! FIXME
       ! Break the CUSTOM_REAL stuff.
@@ -63,7 +65,8 @@ subroutine save_adjoint_kernels()
       ! redo what was done before SVN revision 22718
       !
       ! see other FIXME below (same than see one)
-      real(kind=4), dimension(:,:,:,:), allocatable :: &
+!! DK DK: sorry, we cannot afford to break the code; too many people use it; I thus put CUSTOM_REAL back
+      real(kind=CUSTOM_REAL), dimension(:,:,:,:), allocatable :: &
           alphav_kl,alphah_kl,betav_kl,betah_kl, &
           eta_kl, rhop_kl, alpha_kl, beta_kl
     end subroutine save_kernels_elastic
@@ -288,10 +291,13 @@ subroutine save_kernels_elastic(adios_handle, alphav_kl, alphah_kl, &
                                           betav_kl, betah_kl, eta_kl,         &
                                           rhop_kl, alpha_kl, beta_kl)
 
+      use constants, only: CUSTOM_REAL
+
       integer(kind=8), intent(in) :: adios_handle
       ! FIXME
       ! see other FIXME above.
-      real(kind=4), dimension(:,:,:,:), allocatable :: &
+!! DK DK: sorry, we cannot afford to break the code; too many people use it; I thus put CUSTOM_REAL back
+      real(kind=CUSTOM_REAL), dimension(:,:,:,:), allocatable :: &
           alphav_kl,alphah_kl,betav_kl,betah_kl, &
           eta_kl, rhop_kl, alpha_kl, beta_kl
     end subroutine save_kernels_elastic_adios



More information about the CIG-COMMITS mailing list