#2960: CarpetRegrid2: failure to regrid on relative radius change - possible underlying race condition
| Reporter: | Jordan Nicoules |
| Status: | new |
| Milestone: | |
| Version: | |
| Type: | bug |
| Priority: | major |
| Component: | Carpet |
CarpetRegrid2 does not properly check for a change of radius of the refinement levels (when they are steered by a Trigger for instance).
Looking a bit closer, it seems that the computed drfac in CarpetRegrid2/src/regrid.cc is nan, and thus do_recompose is not set to true.
In particular, it means it is possible to change the radii if something else triggers a regridding (for instance, changing the number of active levels).
To figure out why drfac is nan, I added manual debugging information prints in the code. Depending on what information I ask, and in what order, I don't get consistent nor sensible results.
I haven't tried different compilers (I have gcc 11.4.0 locally), but this is happening even with a debug build (see attached make.config.defn file).
More precisely, printing rad, oldrad, rad - oldrad, their values are fine (done through std::cout).
Printing (CCTK_VINFO) the numerator and denominator of drfac separately gives the right values for them, but the quotient drfac is wrong (it is 0, and not nan anymore, even when it shouldn't).
If I create new local variables
CCTK_REAL const num = sqrt(sum(ipow(rad - oldrad, 2attachment: CarpetRegrid2_bug.zip
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2960/carpetregrid2-failure-to-regrid-on