#2639: CarpetLib internal error with PreSync and analysis thorns
Reporter: Samuel Cupp
Status: new
Milestone:
Version: development version
Type: bug
Priority: major
Component: Carpet
Comment (by Samuel Cupp):
To expand on this, the code in regrid\(\) is
```
void th::regrid() {
CCTK_REAL const basetime = 0.0;
CCTK_REAL const basedelta = 1.0;
const int old_mglevels = times.size();
times.resize(h.mglevels());
deltas.resize(h.mglevels());
for (int ml = 0; ml < h.mglevels(); ++ml) {
const int old_reflevels = times.AT(ml).size();
times.AT(ml).resize(h.reflevels());
deltas.AT(ml).resize(h.reflevels());
for (int rl = 0; rl < h.reflevels(); ++rl) {
if (ml == 0) {
deltas.AT(ml).AT(rl) = basedelta / reffacts.AT(rl);
} else {
deltas.AT(ml).AT(rl) = deltas.AT(ml - 1).AT(rl) * h.mgfact;
}
```
As seen here, in line 14 deltas is always 1.0/reffacts, which is just 1 for the coarser grids. For PreSync, some synchronization/BCs are applied during the short period in which this is 1, and that doesn’t occur without PreSync. I believe this is where the incorrect time slips in. Since it quickly resets the deltas, most of the times afterward are correct. It’s only until later with the next call to CycleTimeLevels that this inconsistency finally breaks the code.
I believe that basedelta should be set to the dt of the coarsest timelevel. At the very least, doing this explicitly for my case fixes the error. I haven’t verified that the codes produce the same results, but it seems like a reasonable choice instead of a random default of 1.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2639/carpetlib-interna…
#2639: CarpetLib internal error with PreSync and analysis thorns
Reporter: Samuel Cupp
Status: new
Milestone:
Version: development version
Type: bug
Priority: major
Component: Carpet
Comment (by Samuel Cupp):
So, the heart of the problem comes from \(I think\) the function
```
th::regrid()
```
in repos/carpet/CarpetLib/src/th.cc:51. When this runs, it sets the
```
deltas.AT(ml).AT(rl)
```
object to 1.0 \(possibly divided by the timereffacts\), which then causes an incorrect cctk\_time. This seems to be polluting some functions which call get\_time. This happens without PreSync, but by miracle \(design?\) it gets reset to the right value before anything tries to use it. This does not occur in time with PreSync.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2639/carpetlib-interna…
#2647: incorrect WENO coefficient in GRHydro WENO reconstruction code
Reporter: Roland Haas
Status: new
Milestone:
Version:
Type: bug
Priority: major
Component: EinsteinToolkit thorn
The GRHydro WENO reconstruction code selected by `GRHydro::recon_method = "weno"` employs incorrect values for the `weno_coeffs` array that is constructed from the WENO $omega\_r$ values.
The current values are in fact WENO interpolation instead of WENO reconstruction.
Pull request
[https://bitbucket.org/einsteintoolkit/einsteinevolve/pull-requests/17/rhaas…
corrects the coefficients, re-computing them from the original publication used to implement the code \(“WHAM paper”, [https://arxiv.org/abs/0704.2608](https://arxiv.org/abs/0704.2608)\) and updates the test data as well.
The attached stand-alone test \(extracted code from GRHydro\) demonstrates the issue and shows that only WENO-Z and WHAM’s WENO do show the WENO property of exactly reconstructing smooth data of low order polynomials \(2nd order in the test, but should be up to 5th order\). It also shows that WENO as implemented by GRHydro is actually WENO interpolation.
This effectively reduces WENO to a 2nd order accurate scheme similar to a basic tvd scheme I would guess.
attachment: weno.cc (https://api.bitbucket.org/2.0/repositories/einsteintoolkit/tickets/issues/2…)
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2647/incorrect-weno-co…
#2639: CarpetLib internal error with PreSync and analysis thorns
Reporter: Samuel Cupp
Status: new
Milestone:
Version: development version
Type: bug
Priority: major
Component: Carpet
Comment (by Roland Haas):
Great work tracking this down!
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2639/carpetlib-interna…
#2639: CarpetLib internal error with PreSync and analysis thorns
Reporter: Samuel Cupp
Status: new
Milestone:
Version: development version
Type: bug
Priority: major
Component: Carpet
Comment (by Samuel Cupp):
I’ve made some progress in tracking down the source of this error. The if\(time within times min/max\) statement tracks back to checking if
```
const CCTK_REAL time = cctkGH->cctk_time (carpet/Carpet/src/Comm.cc:253)
```
is inside
```
times.AT(i) = t.get_time(ml2, rl2, tl2s.AT(i)) (carpet/CarpetLib/src/ggf.cc:540)
```
which has the length of
```
tl2s: tl2s.resize(prolongation_order_time + 1) (carpet/CarpetLib/src/ggf.cc:379)
```
In this parfile, the first several reflevels are not subcycling, so they should all step at the same iterations. I’m printing out a lot of stuff since its inside these functions, so the first times I’m seeing for reflevel 0 are 0.15, and 0.3 \(presumably its also running at the rk4 half-step, which is why i’m getting two times for each iteration on a single level\). If I run it with PreSync off, I see these same times appear for all the ones moving in lockstep, and it then goes into smaller time discretizations once it reaches the subcycled reflevels.
However, this does not happen with PreSync. Instead, when it gets to reflevel 1, cctk\_time returns a value of 1 instead of 0.15, which is not inside the bounds of that vector of times, causing the error. So somehow PreSync is affecting what `cctkGH->cctk_time` is.
I’m going to try to construct a simpler test case that still reproduces this now that I have concrete behavior to look for to making debugging easier.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2639/carpetlib-interna…
#2616: Add NRPyEllipticET to the Einstein Toolkit
Reporter:
Status: new
Milestone:
Version:
Type: enhancement
Priority: major
Component:
Comment (by Leonardo Werneck):
@{557058:59e031ba-9bb5-4298-a472-7b99d0ae6f22} I have added a `test` directory to `NRPyEllipticET`.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2616/add-nrpyelliptice…