I agree with roy about the usefulness or lack thereof...

Besides, at least mpich and derivatives allow configuration with no threads, 
full mutlithreading, and some hybrid I don't understand.  So presumably there 
is enough of a performance impact - im sure some SC sites will continue with 
mpis that only partially support threads for some time to come...



----- Original Message -----
From: Roy Stogner <[email protected]>
To: John Peterson <[email protected]>
Cc: libmesh-users <[email protected]>; libmesh-devel 
<[email protected]>
Sent: Thu Mar 18 13:23:12 2010
Subject: Re: [Libmesh-users] [Libmesh-devel] Parallel::/Threads:: interaction


On Thu, 18 Mar 2010, John Peterson wrote:

> On Thu, Mar 18, 2010 at 12:57 PM, Roy Stogner <[email protected]> 
> wrote:
>>
>> I'd like to instead just "enforce" the current restrictions - set a
>> Threads::_now_multithreaded bool to true at the start of and false at
>> the end of any Threads::parallel_* call, and then do a
>> assert(!Threads::now_multithreaded()) in every Parallel:: call.
>
> This sounds like a good approach.  I have no idea what happens if you
> accidentally make an MPI call in a threaded section of code...
> probably nothing good, so it's best to avoid it.

Reading up on the standard for thread-safe MPI, it looks like
(assuming your implementation supports thread-safety) the result of
calls from multiple threads is guaranteed to be the same as if the
calls all came from the same thread "in some order, even if their
execution is interleaved".

I just can't think of where we'd find such behavior useful enough to
want to try it.  Maybe in the MeshRefinement synchronization code?
But even if we thread the evaluation of received data it wouldn't mean
we have to thread the send_receive calls.
---
Roy

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to