[petsc-users] Big discrepancy between machines

Dave May dave.mayhem23 at gmail.com
Mon Dec 14 02:04:52 CST 2015


One suggestion is you have some uninitialized variables in your pcshell.
Despite your arch being called "debug", your configure options indicate you
have turned debugging off.

C standard doesn't prescribe how uninit variables should be treated - the
behavior is labelled as undefined. As a result, different compilers on
different archs with the same optimization flags can and will treat uninit
variables differently. I find OSX c compilers tend to set them to zero.

I suggest compiling a debug build on both machines and trying your
test again. Also, consider running the debug builds through valgrind.

Thanks,
  Dave

On Monday, 14 December 2015, Timothée Nicolas <timothee.nicolas at gmail.com>
wrote:

> Hi,
>
> I have noticed I have a VERY big difference in behaviour between two
> machines in my problem, solved with SNES. I can't explain it, because I
> have tested my operators which give the same result. I also checked that
> the vectors fed to the SNES are the same. The problem happens only with my
> shell preconditioner. When I don't use it, and simply solve using -snes_mf,
> I don't see anymore than the usual 3-4 changing digits at the end of the
> residuals. However, when I use my pcshell, the results are completely
> different between the two machines.
>
> I have attached output_SuperComputer.txt and output_DesktopComputer.txt,
> which correspond to the output from the exact same code and options (and of
> course same input data file !). More precisely
>
> output_SuperComputer.txt : output on a supercomputer called Helios, sorry
> I don't know the exact specs.
> In this case, the SNES norms are reduced successively:
> 0 SNES Function norm 4.867111712420e-03
> 1 SNES Function norm 5.632325929998e-08
> 2 SNES Function norm 7.427800084502e-15
>
> output_DesktopComputer.txt : output on a Mac OS X Yosemite 3.4 GHz Intel
> Core i5 16GB 1600 MHz DDr3. (the same happens on an other laptop with Mac
> OS X Mavericks).
> In this case, I obtain the following for the SNES norms,
> while in the other, I obtain
> 0 SNES Function norm 4.867111713544e-03
> 1 SNES Function norm 1.560094052222e-03
> 2 SNES Function norm 1.552118650943e-03
> 3 SNES Function norm 1.552106297094e-03
> 4 SNES Function norm 1.552106277949e-03
> which I can't explain, because otherwise the KSP residual (with the same
> operator, which I checked) behave well.
>
> As you can see, the first time the preconditioner is applied (DB_, DP_,
> Drho_ and PS_ solves), the two outputs coincide (except for the few last
> digits, up to 9 actually, which is more than I would expect), and
> everything starts to diverge at the first print of the main KSP (the one
> stemming from the SNES) residual norms.
>
> Do you have an idea what may cause such a strange behaviour ?
>
> Best
>
> Timothee
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151214/e2ef29cc/attachment.html>


More information about the petsc-users mailing list