Ian
The operating system will zero all pages before the application sees them. Malloc and friends will reuse memory from the operating system without zeroing it. In practice, the first malloc calls will see all zeros, later ones (especially for smaller regions) might see non-zeros. Carpet does not set anything to zero, but it can set things to nan if you ask it to. MoL will also set the RHS to zero by default before every iteration.
-erik
On Fri, Oct 7, 2016 at 9:31 AM, Roland Haas rhaas@illinois.edu wrote:
Hello Ian,
ah, these are all tricky questions.
which is a bit surprising. This might come from the old issue of the intersection between outer boundaries and interpatch boundaries not being correctly initialised by the combination of Interpolate2 and McLachlan. Last time I checked though, this may have been fixed. If you don't use poison, does Carpet zero the variables, or leave them uninitialised? In which case, does the OS zero them? Presumably new memory from the OS is zeroed (for security/privacy reasons), but if the memory has been malloc/freed already by the cactus process, then maybe it is random.
Yes, the OS would zero, malloc does not have to. new() on the other hand will also zero (you'd have to check if CarpetLib uses new() or malloc() or posix_memalign() to get new memory, I believe it is actually malloc).
Now, another related question. Is it possible to change the number of CarpetRegrid2 centres during evolution? The num_centres parameter is non-steerable, and indeed CarpetRegrid2 only looks at the centre parameters initially (otherwise every recovery would overwrite the dynamical centre variables with the parameter values). Ideally, I would have set num_centres to a larger value when I started the run, but I didn't.
We just need to make sure that CarpetRegrid2 runs INIT_CENTRE (from initialise.cc) on any newly added centres on recovery. This is done in WRAGH, and then similar to the previous issue, overwritten by recovery. So this should just work?
Yes that would work. You just have to make sure you can identify new levels, eg. by their number of levels being -42 or similar. The alternative is to use the Trigger thorn and set the grid scalars (see the NSNS gallery parfile and look for
Trigger::Trigger_Steered_Scalar[1] = "CarpetRegrid2::num_levels[2]"
Since you can change the grid scalars and "activate" more levels.
Yours, Roland
-- My email is as private as my paper mail. I therefore support encrypting and signing email messages. Get my PGP key from http://keys.gnupg.net.
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users