[petsc-dev] the complex dot business

Matthew Knepley knepley at gmail.com
Mon Feb 27 11:18:05 CST 2012


On Mon, Feb 27, 2012 at 11:16 AM, Alexander Grayver <agrayver at gfz-potsdam.de
> wrote:

> **
> On 27.02.2012 18:01, Matthew Knepley wrote:
>
> On Mon, Feb 27, 2012 at 10:55 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>>
>>   I'm afraid the sudden appearance of the blas dot for complex numbers
>> problem is my fault.
>>
>>   Traditionally since 199x we never used the complex dot product from
>> blas because of the return complex type problem. VecDot_Seq() used #ifdef
>> for complex and a simple loop.
>>
>>   Since some blas norm suck I off-hand told Shri to use dot for norm and
>> wasn't thinking the complex case.
>>
>>   Since then, of course, the complex dot problem has been coming up.
>>
>>   Maybe it is best to continue to never use complex blas dot and just
>> change the VecNorm_ routines to use norm for complex and not dot.? Just
>> throw away this silly problem and time sink?
>
>
>  Why is this such a problem? Just use PetscScalar for the BLASdot_()
> return type and its fine.
>
>
> For instance MKL's BLAS returns result for zdot in the first argument and
> PETSc's BLASdot_() fails there.
>

Yes, there is already a configure test for that and code that fixes it.
This is about interfaces.

   Matt


>     Matt
>
>
>>
>>    Barry
>>
>>
>
>
>  --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
>
>
> --
> Regards,
> Alexander
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120227/12213d0b/attachment.html>


More information about the petsc-dev mailing list