Interpolation Error

59 views
Skip to first unread message

John Regan

unread,
May 28, 2015, 4:59:03 AM5/28/15
to enzo...@googlegroups.com
Hi All,

Just wondering if someone could help point me in the correct debug direction.

I added a new species to Enzo (HeHII). Enzo runs for several hours and then fails on an interpolation error. The multispecies chemistry is solved using Grackle (and I may have introduced an error there of course). The error I get is:

 abc  -1.0000000000000000E-025   1.0000000000000000        1.0000000000000000        1.0000000000000000        0.0000000000000000       -1.8066822653393576E-026  -1.6299583962972629E-026   0.0000000000000000        3.3544115539760295E-026  -3.4366406616366205E-026  -1.8066822653393576E-026  -1.6299583962972629E-026   0.0000000000000000       -3.4366406616366205E-026   3.0559438647942834E-015   2.9699973367311011E-016   3.6015101123615431E-015   1.5477292886366719E-026   3.4721376550363216E-015   1.7244531576787666E-026   3.7938978216699795E-026   4.1806088985293788E-015
                    1                   13                    2                    6                   14                   14                    8                   16                   16                   14                   30                   30                    2                    2                    2                    1                    1                    1
   4.8891783235693351E-015   1.7900194154549277E-027   5.8671930959468579E-015   2.8937361273153650E-026   6.6211610278363528E-015   2.2496910326987593E-027   7.0700184709352024E-015   3.3544115539760295E-026
   3.3544115539760295E-026   2.9118454820552501E-026   1.4126808393266048E-027   1.2567313723422236E-027   3.5648603893502610E-026   2.9352661747972770E-026   1.2840420234168190E-015   1.0919558458377287E-015
P8: Error interpolating field 15 (HeH_Density).
ParentGrid ID = 426
     LeftEdge  = 0.503906 0.495361 0.501221
     RightEdge = 0.506592 0.498779 0.503906
ThisGrid ID = 467
     LeftEdge  = 0.505737 0.496460 0.501343
     RightEdge = 0.505981 0.497681 0.502563


So the error is with the new species. There are no obvious nan's or anything but someone more familiar with the interpolation mechanics may recognise something? It could be that something funny happens in (my modified) Grackle and I'm debugging that now but the plots before the failure look normal.

Anyway maybe someone knows a trick that might help?

Cheers,
John

Greg Bryan

unread,
May 28, 2015, 10:05:39 AM5/28/15
to enzo...@googlegroups.com
Hi John — This is occurring (I think) because the field values are getting very small, hitting the “tiny” number limit.  I see that the field has values around 1e-26 — for a cosmology run, this would be a very small fraction.  Is that expected?  If not, I suspect the error is somewhere else, perhaps in the chemistry code?  

If such small values are expected to occur, then you’ll have to either (a) decrease tiny in fortran_types.def, (b) fix the interpolator so the error doesn’t happen (e.g. by setting def1new, delf2new and delf3new to 0.0 instead of generating that error message — that essentially reverts to piecewise constant interpolation in such cells), or (c) switch to a different interpolator.

Cheers,
Greg

--
You received this message because you are subscribed to the Google Groups "enzo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enzo-dev+u...@googlegroups.com.
To post to this group, send email to enzo...@googlegroups.com.
Visit this group at http://groups.google.com/group/enzo-dev.
For more options, visit https://groups.google.com/d/optout.

John Regan

unread,
May 28, 2015, 10:34:20 AM5/28/15
to enzo...@googlegroups.com
Hi Greg,

Thanks for getting back to me. Yes I had the "tiny" number limit in the chemistry solver less than the the "tiny" number limit in Enzo. It appears that some values of the HeH_density broke through the 1e-20 barrier in grackle and this caused problems in Enzo. Changing the "tiny" limit in grackle fixed the issue.

Thanks for verifying!

Cheers,
John


Reply all
Reply to author
Forward
0 new messages