开发者

Can I write from different MPI_Irecv into the same buffer/array at different index positions?

开发者 https://www.devze.com 2023-02-23 07:03 出处:网络
MPI_IRecv(&myArr[0], 5, MPI_INT, 1, MPI_ANY_TAG, MPI_COMM_WORLD, request); MPI_IRecv(&myArr[5], 5, MPI_INT, 2, MPI_ANY_TAG, MPI_COMM_WORLD, request);
MPI_IRecv(&myArr[0], 5, MPI_INT, 1, MPI_ANY_TAG, MPI_COMM_WORLD, request);
MPI_IRecv(&myArr[5], 5, MPI_INT, 2, MPI_ANY_TAG, MPI_COMM_WORLD, request);
MPI_IRecv(开发者_如何学Python&myArr[10], 5, MPI_INT, 3, MPI_ANY_TAG, MPI_COMM_WORLD, request);

Hi, does c/mpi allow you to write into different areas of the same array from an mpi non-blocking receive? The above code shows roughly what I would like to achieve.


Yes. You aren't allowed to read or modify the buffer of a non-blocking communications request until the communications are done; but as far as MPI are concerned, non-overlapping regions of the same array are completely different buffers.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号