get_mpipattern Subroutine

public subroutine get_mpipattern(comm, istart, iend, n, n_loc, iloc_start, iloc_end)

Divides an integer range into chunks, that can be worked on with separate MPI-processes

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: comm

MPI communicator

integer, intent(in) :: istart

Initial index of range

integer, intent(in) :: iend

Final index of range

integer, intent(out) :: n

Global length of range

integer, intent(out) :: n_loc

Local length of range

integer, intent(out) :: iloc_start

Local start of MPI-chunk

integer, intent(out) :: iloc_end

Local end of MPI-chunk