intel / mpi-benchmarks

145 stars 63 forks source link

MPI_Reduce_scatter[_block] fix the receive buffer size. #11

Closed ggouaillardet closed 5 years ago

ggouaillardet commented 5 years ago

In the case of MPI_Reduce_scatter(), the sum of all the recvcounts should be equal to the number of elements in the send buffer.

In the case of MPI_Reduce_scatter_block(), recvcount * comm_size should be equal to the number of elements in the send buffer.

This issue was initially reported by Simon David Hammond at https://www.mail-archive.com/users@lists.open-mpi.org/msg32889.html

ggouaillardet commented 5 years ago

Incidentally, I noted IMB_Reduce_scatter_block() is not used. Is this intentional ?

mkurnosov commented 5 years ago

@ggouaillardet Perhaps it should be taken into account the case size / s_size % c_info->num_procs > 0. For example, msglen=100, typesize=4 (FLOAT), and commsize=6 all recvcnt[] = 4.

ggouaillardet commented 5 years ago

@mkurnosov fair point, I updated the fix.

VinnitskiV commented 5 years ago

@ggouaillardet Thank you for the contribution. We are fixed this issue in https://github.com/intel/mpi-benchmarks/commit/841446d8cf4ca1f607c0f24b9a424ee39ee1f569 Basically, Makefile from src_c using for compile IMB_2018. For using last IMB version please use Makefile from root directory.

ggouaillardet commented 5 years ago

@VinnitskiV thanks !