root rankの倍精度配列を全rankへbroadcastする。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mpi_context), | intent(in) | :: | ctx | |||
| real(kind=dp), | intent(inout) | :: | values(:) | |||
| integer(kind=i32), | intent(in) | :: | root |
subroutine mpi_bcast_real_dp_array(ctx, values, root) type(mpi_context), intent(in) :: ctx real(dp), intent(inout) :: values(:) integer(i32), intent(in) :: root #ifdef USE_MPI integer :: ierr #endif if (root < 0_i32 .or. root >= max(1_i32, ctx%size)) then error stop 'mpi_bcast_real_dp_array root out of range.' end if #ifdef USE_MPI if (.not. ctx%enabled) return call MPI_Bcast(values, size(values), MPI_DOUBLE_PRECISION, int(root), MPI_COMM_WORLD, ierr) #endif end subroutine mpi_bcast_real_dp_array