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

Sandeep Gupta gupta.sandeep at gmail.com
Mon Nov 7 01:31:45 EST 2011


Thanks Krishna,
I did set MV2_ENABLE_AFFINITY=0 but it didn't change the performance.
What I eventually did use async mpi and that dramatically improved my
results.
I think MPI is  no longer the bottleneck to my code.
The references are very useful. Thank you for those.

Best,
Sandeep

On Sat, Nov 5, 2011 at 1:28 PM, Krishna Kandalla <
kandalla at cse.ohio-state.edu> wrote:

> 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/20111106/8ef7b19f/attachment-0001.html


More information about the mvapich-discuss mailing list