[petsc-dev] What is this? "Optimize VecNorm_MPI. Use BLASdot_ instead of BLASnrm2_"

Jed Brown jedbrown at mcs.anl.gov
Tue Jan 3 16:47:50 CST 2012


On Tue, Jan 3, 2012 at 16:44, Jack Poulson <jack.poulson at gmail.com> wrote:

> It is possible, though unlikely that the BLAS dot could be faster than the
> BLAS nrm2, though I am skeptical. The reason is that the result of dnrm2 on
> a vector u is more stable than the square root of the inner product of u
> with itself via ddot, as it scales the temporary products of the norm to
> make the computation more accurate:
> http://www.netlib.org/blas/dnrm2.f
>

Ah, thanks for pointing this out.


>
>
> Thus, if you don't care about accuracy, then it is _possible_ that ddot
> would be faster, but i doubt it, and it is likely a bad idea to give up on
> some stability.
>

Agreed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120103/0caca10c/attachment.html>


More information about the petsc-dev mailing list