Skip to content

Commit

Permalink
Fixing issue SPECFEM#487
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Bachmann authored and Etienne Bachmann committed Jun 5, 2017
1 parent 4dc16ec commit 8d597dd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/specfem3D/compute_add_sources_acoustic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ subroutine compute_add_sources_acoustic(NSPEC_AB,NGLOB_AB,potential_dot_dot_acou
use specfem_par, only: xigll,yigll,zigll,xi_receiver,eta_receiver,gamma_receiver, &
station_name,network_name,adj_source_file,nrec_local,number_receiver_global, &
nsources_local,tshift_src,DT,t0,SU_FORMAT,USE_LDDRK,istage, &
USE_EXTERNAL_SOURCE_FILE,user_source_time_function
USE_EXTERNAL_SOURCE_FILE,user_source_time_function,USE_BINARY_FOR_SEISMOGRAMS

implicit none

Expand Down Expand Up @@ -184,6 +184,8 @@ subroutine compute_add_sources_acoustic(NSPEC_AB,NGLOB_AB,potential_dot_dot_acou
if (ier /= 0) stop 'error allocating array adj_sourcearray'

if (.not. SU_FORMAT) then

if (USE_BINARY_FOR_SEISMOGRAMS) stop 'Adjoint simulations not supported with .bin format, please use SU format instead'
!!! read ascii adjoint sources
do irec_local = 1, nrec_local
! compute source arrays
Expand Down Expand Up @@ -393,7 +395,7 @@ subroutine compute_add_sources_acoustic_GPU(NSPEC_AB, &
use specfem_par, only: xigll,yigll,zigll,xi_receiver,eta_receiver,gamma_receiver, &
station_name,network_name,adj_source_file,nrec_local,number_receiver_global, &
nsources_local,tshift_src,DT,t0,SU_FORMAT,USE_LDDRK,istage, &
USE_EXTERNAL_SOURCE_FILE,user_source_time_function
USE_EXTERNAL_SOURCE_FILE,user_source_time_function,USE_BINARY_FOR_SEISMOGRAMS

implicit none

Expand Down Expand Up @@ -512,6 +514,8 @@ subroutine compute_add_sources_acoustic_GPU(NSPEC_AB, &
if (ier /= 0) stop 'error allocating array adj_sourcearray'

if (.not. SU_FORMAT) then

if (USE_BINARY_FOR_SEISMOGRAMS) stop 'Adjoint simulations not supported with .bin format, please use SU format instead'
!!! read ascii adjoint sources
do irec_local = 1, nrec_local

Expand Down
3 changes: 2 additions & 1 deletion src/specfem3D/compute_add_sources_poroelastic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ subroutine compute_add_sources_poroelastic(NSPEC_AB,NGLOB_AB, &
USE_FORCE_POINT_SOURCE, &
tshift_src,dt,t0, &
USE_LDDRK,istage, &
USE_EXTERNAL_SOURCE_FILE,user_source_time_function
USE_EXTERNAL_SOURCE_FILE,user_source_time_function,USE_BINARY_FOR_SEISMOGRAMS

implicit none

Expand Down Expand Up @@ -216,6 +216,7 @@ subroutine compute_add_sources_poroelastic(NSPEC_AB,NGLOB_AB, &
!!! read ascii adjoint sources
irec_local = 0
do irec = 1, nrec
if (USE_BINARY_FOR_SEISMOGRAMS) stop 'Adjoint simulations not supported with .bin format, please use ASCII instead'
! compute source arrays
if (myrank == islice_selected_rec(irec)) then
irec_local = irec_local + 1
Expand Down
6 changes: 4 additions & 2 deletions src/specfem3D/compute_add_sources_viscoelastic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ subroutine compute_add_sources_viscoelastic(NSPEC_AB,NGLOB_AB,accel, &
nrec_local,number_receiver_global, &
nsources_local,tshift_src,dt,t0,SU_FORMAT, &
USE_LDDRK,istage, &
USE_EXTERNAL_SOURCE_FILE,user_source_time_function
USE_EXTERNAL_SOURCE_FILE,user_source_time_function,USE_BINARY_FOR_SEISMOGRAMS

#ifdef DEBUG_COUPLED
include "../../../add_to_compute_add_sources_viscoelastic_1.F90"
Expand Down Expand Up @@ -190,6 +190,7 @@ subroutine compute_add_sources_viscoelastic(NSPEC_AB,NGLOB_AB,accel, &
if (ier /= 0) stop 'error allocating array adj_sourcearray'

if (.not. SU_FORMAT) then
if (USE_BINARY_FOR_SEISMOGRAMS) stop 'Adjoint simulations not supported with .bin format, please use SU format instead'
!!! read ascii adjoint sources
do irec_local = 1, nrec_local
! compute source arrays
Expand Down Expand Up @@ -447,7 +448,7 @@ subroutine compute_add_sources_viscoelastic_GPU(NSPEC_AB, &
irec_master_noise,noise_surface_movie, &
nrec_local,number_receiver_global, &
nsources_local,tshift_src,dt,t0,SU_FORMAT, &
USE_LDDRK,istage,USE_EXTERNAL_SOURCE_FILE,user_source_time_function
USE_LDDRK,istage,USE_EXTERNAL_SOURCE_FILE,user_source_time_function,USE_BINARY_FOR_SEISMOGRAMS

#ifdef DEBUG_COUPLED
include "../../../add_to_compute_add_sources_viscoelastic_1.F90"
Expand Down Expand Up @@ -573,6 +574,7 @@ subroutine compute_add_sources_viscoelastic_GPU(NSPEC_AB, &
if (ier /= 0) stop 'error allocating array adj_sourcearray'

if (.not. SU_FORMAT) then
if (USE_BINARY_FOR_SEISMOGRAMS) stop 'Adjoint simulations not supported with .bin format, please use SU format instead'
!!! read ascii adjoint sources
do irec_local = 1, nrec_local
! compute source arrays
Expand Down

0 comments on commit 8d597dd

Please sign in to comment.