[petsc-users] petsc-3.5 quadruple precision mixed with double

Matthew Knepley knepley at gmail.com
Wed Jun 28 21:02:35 CDT 2017


On Wed, Jun 28, 2017 at 9:00 PM, Hao Zhang <hbcbh1999 at gmail.com> wrote:

> thanks, @Matthew
>
> I was worried about this. is there a way to convert double to PetscScalar?
>

C cast.


> incompressible code are double type everywhere else except for PETSc.
> could this be the problem?
>

I doubt using high precision only in the solve will make much difference,
certainly not 10^{-14}.

  Matt


> it was double type for the entire code  including PETSc before this
> quadruple test.
>
>
>
>
>
>
>
>
> On Wed, Jun 28, 2017 at 9:27 PM, Matthew Knepley <knepley at gmail.com>
> wrote:
>
>> On Wed, Jun 28, 2017 at 8:22 PM, Hao Zhang <hbcbh1999 at gmail.com> wrote:
>>
>>> It's 3d incompressible RT simulation. My pressure between serial and
>>> parallel calculation is off by 10^(-14) in relative error.
>>>
>>
>> This could just be reordering of the calculation.
>>
>>
>>> it eventually build up at later time. I want to rule out the
>>> possibilities that PETSc give me bad solution. pressure scale is 10^(-2).
>>>
>>> I use PetscScalar. thanks @Jed Brown for confirming that but I have
>>> Segmentation Violation when retrieving x. I allocated memory for the array
>>> x (PetscScalar type). if not for quadruple precision, there is no error.
>>>
>>
>> It sounds like maybe you are passing a double where a PetscScalar is
>> expected, or vice versa. Run under valgrind.
>>
>>   Matt
>>
>>
>>> thanks @Satish Balay. I will update code petsc-3.7 later.
>>>
>>
>>
>>
>> --
>> 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
>>
>> http://www.caam.rice.edu/~mk51/
>>
>
>
>
> --
> hao
>



-- 
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

http://www.caam.rice.edu/~mk51/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170628/f02230a1/attachment.html>


More information about the petsc-users mailing list