Skip to content

Commit

Permalink
Corrected GPU smoothing routine
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Bachmann authored and Etienne Bachmann committed Jun 13, 2018
1 parent ca16296 commit 6dac0c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/tomography/postprocess_sensitivity_kernels/smooth_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ z_me = zstore_me[NGLL3*ispec + igll ];
sh_wgll_cube[igll]=wgll_cube[igll];
__syncthreads();

dat=0;
normalisation_slice=0;
dat=0.f;
normalisation_slice=0.f;
//We test 125 spectral elements at a time
for (int i=0;i<n_loop;i++)
{
__syncthreads();
if (NGLL3*i + threadIdx.x < nspec_other){
x_other = (xstore_other[i*NGLL3*NGLL3 + threadIdx.x*NGLL3 ] + xstore_other[i*NGLL3*NGLL3 + threadIdx.x*NGLL3 + NGLL3 - 1 ])/2;
y_other = (ystore_other[i*NGLL3*NGLL3 + threadIdx.x*NGLL3 ] + ystore_other[i*NGLL3*NGLL3 + threadIdx.x*NGLL3 + NGLL3 - 1 ])/2;
Expand Down
4 changes: 2 additions & 2 deletions src/tomography/postprocess_sensitivity_kernels/smooth_sem.F90
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ program smooth_sem
! frees memory
deallocate(xstore,ystore,zstore)
deallocate(xix,xiy,xiz,etax,etay,etaz,gammax,gammay,gammaz)
deallocate(ibool)
deallocate(ibool,irregular_element_number)
deallocate(jacobian)

call synchronize_all()
Expand Down Expand Up @@ -673,7 +673,7 @@ program smooth_sem
deallocate(ibool)

! data file
write(prname,'(a,i6.6,a)') trim(input_dir)//'proc',iproc,'_'
write(prname,'(a,i6.6,a)') trim(input_dir)//'/proc',iproc,'_'
local_data_file = trim(prname) // trim(kernel_name) // '.bin'

open(unit = IIN,file = trim(local_data_file),status='old',action='read',form ='unformatted',iostat=ier)
Expand Down

0 comments on commit 6dac0c6

Please sign in to comment.