150 ,rg_gll_acceleration&
154 ,ig_mpi_buffer_sizemax&
159 real ,
dimension(IG_NDOF,ig_mpi_buffer_sizemax) :: dummyr
160 real ,
dimension(IG_NDOF,ig_mpi_buffer_sizemax,ig_ncpu_neighbor) :: dlacce
162 integer,
dimension(MPI_STATUS_SIZE) :: statut
172 do icon = 1,ig_ncpu_neighbor
173 do igll = 1,tg_cpu_neighbor(icon)%ngll
175 dlacce(1,igll,icon) = rg_gll_acceleration(1,tg_cpu_neighbor(icon)%gll_send(igll))
176 dlacce(2,igll,icon) = rg_gll_acceleration(2,tg_cpu_neighbor(icon)%gll_send(igll))
177 dlacce(3,igll,icon) = rg_gll_acceleration(3,tg_cpu_neighbor(icon)%gll_send(igll))
186 do icon = 1,ig_ncpu_neighbor
188 ngll = tg_cpu_neighbor(icon)%ngll
190 call mpi_sendrecv(dlacce(1,1,icon),ig_ndof*ngll,mpi_real,tg_cpu_neighbor(icon)%icpu,300,dummyr(1,1),ig_ndof*ngll,mpi_real,tg_cpu_neighbor(icon)%icpu,300,mpi_comm_world,statut,ios)
194 rg_gll_acceleration(1,tg_cpu_neighbor(icon)%gll_recv(igll)) = rg_gll_acceleration(1,tg_cpu_neighbor(icon)%gll_recv(igll)) + dummyr(1,igll)
195 rg_gll_acceleration(2,tg_cpu_neighbor(icon)%gll_recv(igll)) = rg_gll_acceleration(2,tg_cpu_neighbor(icon)%gll_recv(igll)) + dummyr(2,igll)
196 rg_gll_acceleration(3,tg_cpu_neighbor(icon)%gll_recv(igll)) = rg_gll_acceleration(3,tg_cpu_neighbor(icon)%gll_recv(igll)) + dummyr(3,igll)
218 ,rg_gll_acceleration&
223 ,ig_mpi_buffer_offset&
226 ,ig_mpi_request_send&
227 ,ig_mpi_request_recv&
228 ,ig_mpi_buffer_sizemax&
233 real,
dimension(IG_NDOF,ig_mpi_buffer_sizemax,ig_ncpu_neighbor) :: dlacce
238 integer :: dof_offset
239 integer :: proc_offset
245 do icon = 1,ig_ncpu_neighbor
246 do igll =1,tg_cpu_neighbor(icon)%ngll
248 dlacce(1,igll,icon) = rg_gll_acceleration(1,tg_cpu_neighbor(icon)%gll_send(igll))
249 dlacce(2,igll,icon) = rg_gll_acceleration(2,tg_cpu_neighbor(icon)%gll_send(igll))
250 dlacce(3,igll,icon) = rg_gll_acceleration(3,tg_cpu_neighbor(icon)%gll_send(igll))
259 if ( (ig_ncpu > 1) .and. (ig_mpi_request_send(1) /= 0) ) call mpi_waitall(ig_ncpu_neighbor, ig_mpi_request_send, mpi_statuses_ignore, ios)
265 do icon = 1,ig_ncpu_neighbor
267 ngll = tg_cpu_neighbor(icon)%ngll
268 proc_offset = ig_mpi_buffer_offset(icon)
276 rg_mpi_buffer_send(proc_offset+dof_offset+igll) = dlacce(1,igll,icon)
280 rg_mpi_buffer_send(proc_offset+dof_offset+igll) = dlacce(2,igll,icon)
284 rg_mpi_buffer_send(proc_offset+dof_offset+igll) = dlacce(3,igll,icon)
288 call mpi_irecv(rg_mpi_buffer_recv(proc_offset+1),ig_ndof*ngll,mpi_real,tg_cpu_neighbor(icon)%icpu,300,mpi_comm_world,ig_mpi_request_recv(icon),ios)
289 call mpi_isend(rg_mpi_buffer_send(proc_offset+1),ig_ndof*ngll,mpi_real,tg_cpu_neighbor(icon)%icpu,300,mpi_comm_world,ig_mpi_request_send(icon),ios)
311 ,rg_gll_acceleration&
315 ,ig_mpi_buffer_offset&
318 ,ig_mpi_request_send&
319 ,ig_mpi_request_recv&
320 ,ig_mpi_buffer_sizemax&
328 integer :: dof_offset
329 integer :: proc_offset
332 integer,
dimension(MPI_STATUS_SIZE) :: statut
336 do while(nb_msg < ig_ncpu_neighbor)
339 call mpi_waitany(ig_ncpu_neighbor, ig_mpi_request_recv, r_index, statut, ios)
342 ngll = tg_cpu_neighbor(r_index)%ngll
343 proc_offset = ig_mpi_buffer_offset(r_index)
350 rg_gll_acceleration(1,tg_cpu_neighbor(r_index)%gll_recv(igll)) = rg_gll_acceleration(1,tg_cpu_neighbor(r_index)%gll_recv(igll)) + rg_mpi_buffer_recv(proc_offset+dof_offset+igll)
356 rg_gll_acceleration(2,tg_cpu_neighbor(r_index)%gll_recv(igll)) = rg_gll_acceleration(2,tg_cpu_neighbor(r_index)%gll_recv(igll)) + rg_mpi_buffer_recv(proc_offset+dof_offset+igll)
362 rg_gll_acceleration(3,tg_cpu_neighbor(r_index)%gll_recv(igll)) = rg_gll_acceleration(3,tg_cpu_neighbor(r_index)%gll_recv(igll)) + rg_mpi_buffer_recv(proc_offset+dof_offset+igll)
subroutine, public assemble_force_async_comm_end()
subroutine to finalize forces assembly between connected cpus by MPI asynchrone communications.
subroutine, public assemble_force_sync_comm()
subroutine to assemble forces between connected cpus by MPI synchrone communications.
This module defines all global variables of EFISPEC3D. Scalar variables are initialized directly in t...
This module contains subroutines to assemble forces between cpu myrank and its neighbor cpus by synch...
subroutine, public assemble_force_async_comm_init()
subroutine to initialize forces assembly between connected cpus by MPI asynchrone communications...