You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are at least 3 cases to consider, where we assume the buffer is a non-contiguous subarray.
Vector case
The datatype argument corresponds to an element of the array or is a contiguous datatype AND the total number of elements expressed by (count,datatype) evenly divides the buffer.
Easy example:
integer, dimension(4,4) :: A
call MPI_Bcast(A(1:3,1:3), 9, MPI_INTEGER, 0, MPI_COMM_WORLD)
Hard example:
integer, dimension(4,4) :: A
call MPI_Bcast(A(1:3,1:3), 6, MPI_INTEGER, 0, MPI_COMM_WORLD)
The latter works, because the count works out to an even multiple of the dimensions up to the last one. We can still use vector datatypes here.
Indexed case
The datatype argument corresponds to an element of the array or is a contiguous datatype but the total number of elements expressed by (count,datatype) does not evenly divide the buffer.
Example:
integer, dimension(4,4) :: A
call MPI_Bcast(A(1:3,1:3), 7, MPI_INTEGER, 0, MPI_COMM_WORLD)
This one is hard, because we need to use an indexed type to express subblocks of different sizes.
Doubly non-contiguous case
The datatype argument is a non-contiguous derived datatype.
We need to implement non-contiguous support in CFI.
https://github.com/jeffhammond/vapaa/blob/main/tests/test_vector_noncontig.F90#L34 tests this.
The text was updated successfully, but these errors were encountered: