Sum-Allreduce for a 3D global vector field.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(flow_mpi_t), | intent(in) | :: | flow | |||
| real(kind=rk), | intent(in) | :: | local_values(:,:) | |||
| real(kind=rk), | intent(out) | :: | global_values(:,:) |
subroutine flow_allreduce_global_vector(flow, local_values, global_values) use mod_profiler, only : profiler_start, profiler_stop type(flow_mpi_t), intent(in) :: flow real(rk), intent(in) :: local_values(:,:) real(rk), intent(out) :: global_values(:,:) integer :: ierr call profiler_start('MPI_Communication') call MPI_Allreduce(local_values, global_values, size(local_values), & MPI_DOUBLE_PRECISION, MPI_SUM, flow%comm, ierr) call check_mpi(ierr, 'MPI_Allreduce flow vector') call profiler_stop('MPI_Communication') end subroutine flow_allreduce_global_vector