[petsc-dev] Generality of VecScatter

Barry Smith bsmith at mcs.anl.gov
Tue Nov 29 10:35:29 CST 2011


On Nov 29, 2011, at 10:31 AM, Jed Brown wrote:

> On Tue, Nov 29, 2011 at 10:14, Barry Smith <bsmith at mcs.anl.gov> wrote:
> In the world Intel is pushing us toward they want us to have SEVERAL threads per core (and IBM BlueGene Q also I think) how is the spinning going to work in that situation.
> 
> This is what the "pause" instruction is for. I don't have docs for the /Q instruction set, but it must have an equivalent.

Synchronization between threads frequently involves the use of spin-wait loops. These loops should make use of the PAUSE instruction to maximize performance and minimize power consumption. The PAUSE instruction can be added to application code now, as it is ignored on all known existing Intel architectures.

So for Q all I need do is 

#define PAUSE 

and then use PAUSE in the spin-wait to get similar performance to the Intel?


   Barry




More information about the petsc-dev mailing list