Skip to content

Commit 9103a9e

Browse files
committed
removes unused parameters
1 parent d693a9c commit 9103a9e

File tree

2 files changed

+61
-68
lines changed

2 files changed

+61
-68
lines changed

src/specfem3D/get_cmt.f90

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -592,13 +592,16 @@ double precision function get_cmt_moment_magnitude_from_M0(M0)
592592

593593
end function get_cmt_moment_magnitude_from_M0
594594

595-
595+
!
596+
!-------------------------------------------------------------------------------------------------
597+
!
596598

597599
!> read source attributes in binary source file, skip source time function
598-
subroutine get_solutions_attr(filename,tshift_src,hdur,lat,long,depth,moment_tensor, &
599-
DT,NSOURCES_CMT,NSOURCES,min_tshift_src_original,force_stf,factor_force_source, &
600-
comp_dir_vect_source_E,comp_dir_vect_source_N,comp_dir_vect_source_Z_UP)
601-
use constants, only: IIN,MAX_STRING_LEN,CUSTOM_REAL,TINYVAL
600+
subroutine get_solutions_attr(filename,tshift_src,hdur,lat,long,depth,moment_tensor, &
601+
DT,NSOURCES_CMT,NSOURCES,min_tshift_src_original,force_stf,factor_force_source, &
602+
comp_dir_vect_source_E,comp_dir_vect_source_N,comp_dir_vect_source_Z_UP)
603+
604+
use constants, only: MAX_STRING_LEN,CUSTOM_REAL,TINYVAL
602605
use shared_parameters, only: USE_EXTERNAL_SOURCE_FILE,NSTEP_STF,NOISE_TOMOGRAPHY,USE_RICKER_TIME_FUNCTION
603606
implicit none
604607

@@ -757,13 +760,17 @@ subroutine get_solutions_attr(filename,tshift_src,hdur,lat,long,depth,moment_ten
757760
endif
758761
enddo
759762

760-
end subroutine get_solutions_attr
763+
end subroutine get_solutions_attr
761764

765+
!
766+
!-------------------------------------------------------------------------------------------------
767+
!
762768

763769

764770
!> read stf from binary source file,
765-
subroutine get_solutions_stf(filename,NSOURCES_local,user_source_time_function)
766-
use constants, only: IIN,MAX_STRING_LEN,CUSTOM_REAL,TINYVAL
771+
subroutine get_solutions_stf(filename,NSOURCES_local,user_source_time_function)
772+
773+
use constants, only: MAX_STRING_LEN,CUSTOM_REAL
767774
use shared_parameters, only: USE_EXTERNAL_SOURCE_FILE,NSTEP_STF
768775
use shared_parameters, only: NSOURCES
769776
use specfem_par, only: isource_glob2loc
@@ -819,4 +826,4 @@ subroutine get_solutions_stf(filename,NSOURCES_local,user_source_time_function)
819826
enddo
820827
close(IO_SRC)
821828

822-
end subroutine get_solutions_stf
829+
end subroutine get_solutions_stf

src/tomography/postprocess_sensitivity_kernels/smooth_sem_pde.F90

Lines changed: 45 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,9 @@ program smooth_sem_pde
279279
allocate(dat(NGLLX,NGLLY,NGLLZ,NSPEC_AB))
280280
allocate(dat_glob(NGLOB_AB))
281281
allocate(ddat_glob(NGLOB_AB))
282-
allocate(buffer_send_vector_ext_mesh_smooth( &
283-
max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh),stat=ier)
284-
allocate(buffer_recv_vector_ext_mesh_smooth( &
285-
max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh),stat=ier)
282+
allocate(buffer_send_vector_ext_mesh_smooth(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh))
283+
allocate(buffer_recv_vector_ext_mesh_smooth(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh))
284+
286285
! prepare assemble array
287286
allocate(rvol(NGLOB_AB))
288287
rvol(:) = 0.0
@@ -302,9 +301,9 @@ program smooth_sem_pde
302301
enddo;enddo;enddo
303302
enddo
304303
call assemble_MPI_scalar_blocking(NPROC,NGLOB_AB,rvol, &
305-
num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh, &
306-
nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
307-
my_neighbors_ext_mesh)
304+
num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh, &
305+
nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
306+
my_neighbors_ext_mesh)
308307
rvol(:) = 1.0 / rvol(:)
309308
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
310309
! read in data to be smoothed
@@ -385,17 +384,17 @@ program smooth_sem_pde
385384
! prepares general fields on GPU
386385
! add GPU support for the C-PML routines
387386
call prepare_constants_smooth_device(Mesh_pointer, &
388-
NGLLX, NSPEC_AB, NGLOB_AB, NSPEC_IRREGULAR,irregular_element_number, &
389-
xixstore,xiystore,xizstore, &
390-
etaxstore,etaystore,etazstore, &
391-
gammaxstore,gammaystore,gammazstore, &
392-
xix_regular,jacobian_regular,ibool, &
393-
num_interfaces_ext_mesh, max_nibool_interfaces_ext_mesh, &
394-
nibool_interfaces_ext_mesh, ibool_interfaces_ext_mesh, &
395-
hprime_xx,hprimewgll_xx, &
396-
wgllwgll_xy, wgllwgll_xz, wgllwgll_yz, &
397-
myrank, &
398-
PML_CONDITIONS)
387+
NGLLX, NSPEC_AB, NGLOB_AB, NSPEC_IRREGULAR,irregular_element_number, &
388+
xixstore,xiystore,xizstore, &
389+
etaxstore,etaystore,etazstore, &
390+
gammaxstore,gammaystore,gammazstore, &
391+
xix_regular,jacobian_regular,ibool, &
392+
num_interfaces_ext_mesh, max_nibool_interfaces_ext_mesh, &
393+
nibool_interfaces_ext_mesh, ibool_interfaces_ext_mesh, &
394+
hprime_xx,hprimewgll_xx, &
395+
wgllwgll_xy, wgllwgll_xz, wgllwgll_yz, &
396+
myrank, &
397+
PML_CONDITIONS)
399398

400399

401400
if (myrank == 0) then
@@ -562,7 +561,7 @@ program smooth_sem_pde
562561
buffer_send_vector_ext_mesh_smooth, &
563562
buffer_recv_vector_ext_mesh_smooth, &
564563
num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh, &
565-
nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
564+
nibool_interfaces_ext_mesh, &
566565
my_neighbors_ext_mesh, &
567566
request_send_vector_ext_mesh,request_recv_vector_ext_mesh)
568567
else
@@ -580,9 +579,7 @@ program smooth_sem_pde
580579
Mesh_pointer, Smooth_container, &
581580
buffer_recv_vector_ext_mesh_smooth,num_interfaces_ext_mesh, &
582581
max_nibool_interfaces_ext_mesh, &
583-
nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
584-
request_send_vector_ext_mesh,request_recv_vector_ext_mesh, &
585-
my_neighbors_ext_mesh)
582+
request_send_vector_ext_mesh,request_recv_vector_ext_mesh)
586583
else
587584
call assemble_MPI_w_ord_smooth(NPROC,NGLOB_AB, &
588585
ddat_glob,buffer_recv_vector_ext_mesh_smooth,num_interfaces_ext_mesh, &
@@ -787,12 +784,12 @@ end program smooth_sem_pde
787784
!
788785

789786
subroutine assemble_MPI_send_smooth(NPROC,NGLOB_AB, &
790-
array_val,buffer_send_vector_ext_mesh_smooth, &
791-
buffer_recv_vector_ext_mesh_smooth, &
792-
num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh, &
793-
nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
794-
my_neighbors_ext_mesh, &
795-
request_send_vector_ext_mesh,request_recv_vector_ext_mesh)
787+
array_val,buffer_send_vector_ext_mesh_smooth, &
788+
buffer_recv_vector_ext_mesh_smooth, &
789+
num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh, &
790+
nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
791+
my_neighbors_ext_mesh, &
792+
request_send_vector_ext_mesh,request_recv_vector_ext_mesh)
796793

797794
! sends data
798795

@@ -857,12 +854,12 @@ end subroutine assemble_MPI_send_smooth
857854
!
858855

859856
subroutine assemble_MPI_send_smooth_cuda(NPROC, &
860-
buffer_send_vector_ext_mesh_smooth, &
861-
buffer_recv_vector_ext_mesh_smooth, &
862-
num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh, &
863-
nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
864-
my_neighbors_ext_mesh, &
865-
request_send_vector_ext_mesh,request_recv_vector_ext_mesh)
857+
buffer_send_vector_ext_mesh_smooth, &
858+
buffer_recv_vector_ext_mesh_smooth, &
859+
num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh, &
860+
nibool_interfaces_ext_mesh, &
861+
my_neighbors_ext_mesh, &
862+
request_send_vector_ext_mesh,request_recv_vector_ext_mesh)
866863

867864
! sends data
868865

@@ -874,18 +871,15 @@ subroutine assemble_MPI_send_smooth_cuda(NPROC, &
874871

875872
integer :: num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh
876873

877-
real(kind=CUSTOM_REAL), &
878-
dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh) :: &
874+
real(kind=CUSTOM_REAL), dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh) :: &
879875
buffer_send_vector_ext_mesh_smooth,buffer_recv_vector_ext_mesh_smooth
880876

881877
integer, dimension(num_interfaces_ext_mesh) :: &
882878
nibool_interfaces_ext_mesh,my_neighbors_ext_mesh
883-
integer, dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh):: &
884-
ibool_interfaces_ext_mesh
885879
integer, dimension(num_interfaces_ext_mesh) :: &
886880
request_send_vector_ext_mesh,request_recv_vector_ext_mesh
887881

888-
integer iinterface
882+
integer :: iinterface
889883

890884
! here we have to assemble all the contributions between partitions using MPI
891885

@@ -915,11 +909,11 @@ end subroutine assemble_MPI_send_smooth_cuda
915909
!
916910

917911
subroutine assemble_MPI_w_ord_smooth(NPROC,NGLOB_AB, &
918-
array_val,buffer_recv_vector_ext_mesh_smooth,num_interfaces_ext_mesh, &
919-
max_nibool_interfaces_ext_mesh, &
920-
nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
921-
request_send_vector_ext_mesh,request_recv_vector_ext_mesh, &
922-
my_neighbors_ext_mesh,myrank)
912+
array_val,buffer_recv_vector_ext_mesh_smooth,num_interfaces_ext_mesh, &
913+
max_nibool_interfaces_ext_mesh, &
914+
nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
915+
request_send_vector_ext_mesh,request_recv_vector_ext_mesh, &
916+
my_neighbors_ext_mesh,myrank)
923917

924918
! waits for data to receive and assembles
925919

@@ -934,19 +928,17 @@ subroutine assemble_MPI_w_ord_smooth(NPROC,NGLOB_AB, &
934928

935929
integer :: num_interfaces_ext_mesh,max_nibool_interfaces_ext_mesh,myrank
936930

937-
real(kind=CUSTOM_REAL), &
938-
dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh) :: &
931+
real(kind=CUSTOM_REAL), dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh) :: &
939932
buffer_recv_vector_ext_mesh_smooth
940933

941934
integer, dimension(num_interfaces_ext_mesh) :: nibool_interfaces_ext_mesh
942-
integer, dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh)::&
935+
integer, dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh):: &
943936
ibool_interfaces_ext_mesh
944937
integer, dimension(num_interfaces_ext_mesh) :: &
945938
request_send_vector_ext_mesh,request_recv_vector_ext_mesh
946939
integer, dimension(num_interfaces_ext_mesh) :: my_neighbors_ext_mesh
947940

948-
real(kind=CUSTOM_REAL), &
949-
dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh) :: &
941+
real(kind=CUSTOM_REAL), dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh) :: &
950942
mybuffer
951943
integer :: ipoin,iinterface,iglob
952944
logical :: need_add_my_contrib
@@ -1011,12 +1003,10 @@ end subroutine add_my_contrib
10111003
end subroutine assemble_MPI_w_ord_smooth
10121004

10131005
subroutine assemble_MPI_write_smooth_cuda(NPROC,Mesh_pointer, &
1014-
Smooth_container, &
1015-
buffer_recv_vector_ext_mesh_smooth,num_interfaces_ext_mesh, &
1016-
max_nibool_interfaces_ext_mesh, &
1017-
nibool_interfaces_ext_mesh,ibool_interfaces_ext_mesh, &
1018-
request_send_vector_ext_mesh,request_recv_vector_ext_mesh, &
1019-
my_neighbors_ext_mesh)
1006+
Smooth_container, &
1007+
buffer_recv_vector_ext_mesh_smooth,num_interfaces_ext_mesh, &
1008+
max_nibool_interfaces_ext_mesh, &
1009+
request_send_vector_ext_mesh,request_recv_vector_ext_mesh)
10201010

10211011
! waits for data to receive and assembles
10221012

@@ -1034,12 +1024,8 @@ subroutine assemble_MPI_write_smooth_cuda(NPROC,Mesh_pointer, &
10341024
dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh) :: &
10351025
buffer_recv_vector_ext_mesh_smooth
10361026

1037-
integer, dimension(num_interfaces_ext_mesh) :: nibool_interfaces_ext_mesh
1038-
integer, dimension(max_nibool_interfaces_ext_mesh,num_interfaces_ext_mesh)::&
1039-
ibool_interfaces_ext_mesh
10401027
integer, dimension(num_interfaces_ext_mesh) :: &
10411028
request_send_vector_ext_mesh,request_recv_vector_ext_mesh
1042-
integer, dimension(num_interfaces_ext_mesh) :: my_neighbors_ext_mesh
10431029

10441030
integer :: iinterface
10451031

0 commit comments

Comments
 (0)