[mvapich-discuss] mpi_isend/recv in multi-threaded program

Krishna Kandalla kandalla at cse.ohio-state.edu
Sat Nov 5 16:28:07 EDT 2011


Hi Sandeep,
        Yes. MVAPICH2 offers thread-safety for MPI operations. You may find
more information about this in section 6.14 of our userguide - (
http://mvapich.cse.ohio-state.edu/support/user_guide_mvapich2-1.7.html#x1-700006.14).
You just have to:
(a) Request for THREAD_MULTIPLE support through the MPI_Init_thread()
function and
(b) Disable affinity at run-time by using : MV2_ENABLE_AFFINITY=0.

        The performance difference could be due to various factors --
thread scheduling, lock/unlock overheads etc. In case you are looking for a
sample MPI program that uses MPI_THREAD_MULTIPLE, you may look at the
osu_latency_mt.c benchmark inside the osu_benchmarks directory.
         Please let us know if you have any other questions.

Thanks,
Krishna


On Sat, Nov 5, 2011 at 12:45 AM, Sandeep Gupta <gupta.sandeep at gmail.com>wrote:

> Hi All,
> I had a simple question regarding using MPI with pthreads.
> Can  multiple threads call MPI_Isend/Irecv?  That is is MPI_Isend/Irecv
> thread-save.
> Do I have to use THREAD_SUPPORT_MULTIPLE?
> I am asking because i have found that MPI_send/recv under
> THREAD_SUPPORT_MULTIPLE has huge impact on performance.
> Other I like the convenience of writing program using
> THREAD_SUPPORT_MULTIPLE.
>
> Best,
> Sandeep
>
>
> _______________________________________________
> mvapich-discuss mailing list
> mvapich-discuss at cse.ohio-state.edu
> http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20111105/fbfb730a/attachment.html


More information about the mvapich-discuss mailing list