[petsc-dev] Generality of VecScatter

Barry Smith bsmith at mcs.anl.gov
Thu Nov 24 16:01:57 CST 2011


On Nov 24, 2011, at 3:56 PM, Jed Brown wrote:

> On Thu, Nov 24, 2011 at 15:44, Barry Smith <bsmith at mcs.anl.gov> wrote:
>   I totally agree with you on this.  Where we disagree is thatI don't believe that MPI or pthreads have what is needed. For example since pthreads sequentializes the waking up threads it cannot be used in a way scalable to hundreds of threads.
> 
> Can't the threads all be live and poll on a shared variable?

   Yes, but they can only get access to that shared variable one at a time: first get's it, then second get's it, then third gets, .... Ok for a couple of cores but not for dozens.

   Take a look at src/sys/objects/pthread.c for the various ways we have coded for "waking" the threads. Maybe I am missing something but this is the best Kerry and I could figure out.



   Barry

> Or do you need a kernel-level primitive to activate a bunch of threads in one call? (I think this depends whether you want to have more threads than cores.) In any case, wouldn't that just be pthreads+1?




More information about the petsc-dev mailing list