[petsc-users] Matlab gets a different solution to Petsc

Andrew Cramer andrewdalecramer at gmail.com
Tue Jul 8 19:10:59 CDT 2014


Seems those last few significant figures were significant after all. Now to
figure out why getting rid of them gets a better answer than leaving them
in...

Thanks for the help, I'll root around a bit more.


On 9 July 2014 09:41, Jed Brown <jed at jedbrown.org> wrote:

> Andrew Cramer <andrewdalecramer at gmail.com> writes:
>
> > I get *significantly *different results from backslash and petsc using
> > the *same
> > matrix*.
> >
> >                  Deflection  |Au-b|/|b|
> > Euler-Bernoulli:       4000
> > Petsc:                 4386        0.3
> > Matlab:                4013    1.6e-10
> >
> > I'm exporting to 6 significant figures. Condition number is rather poor
> > (~2e7) but I get similar or worse results with problems having lower
> > conditions numbers (~1e3).
>
> Are you sure the matrices are the same?  Use "-ksp_view_mat binary",
> then in MATLAB, A = PetscBinaryRead('binaryoutput') if you want to get
> both matrices in the same environment.  Or explicitly compute the norms
> in PETSc.
>
> To debug, start with the simplest and most well-conditioned problem
> that exhibits the issue.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140709/4f20b30f/attachment.html>


More information about the petsc-users mailing list