[petsc-dev] new P^1.5 algorithm in VecAssembleBegin?

Barry Smith bsmith at mcs.anl.gov
Fri May 29 14:39:00 CDT 2015


> On May 29, 2015, at 2:29 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Barry Smith <bsmith at mcs.anl.gov> writes:
> 
>>  I cannot explain why the load balance would be 1.0 unless, by
>>  unlikely coincidence on the 248 different calls to the function
>>  different processes are the ones waiting so that the sum of the
>>  waits on different processes matches over the 248 calls. Possible
>>  but
> 
> Uh, it's the same reason VecNorm often shows significant load imbalance.

   Uh, I don't understand. It shows NO imbalance but huge times. Normally I would expect a large imbalance and huge times. So I cannot explain why it has no imbalance. 1.0 means no imbalance.

> 
>>> I've added a barrier in the code.
>> 
>>   You don't need a barrier.  If you do not have a barrier you should
>>   see all the "wait time" now accumulate somewhere later in the code
>>   at the next reduction after the VecAssemblyBegin/End.
> 
> Presumably he added a barrier *before* calling the function.  The
> function does a small amount of work (basically none because he has no
> off-process entries) and synchronizes (PetscMaxSum).  If there was load
> imbalance before calling VecAssemblyBegin, the timer would start at
> different times on each process, but end at about the same time.

  Yes, but then it would show a large imbalance, while it in fact shows no imbalance.






More information about the petsc-dev mailing list