[Carpet] memory allocation in global loop-local mode?
Erik Schnetter
schnetter at cct.lsu.edu
Wed Aug 23 21:21:50 CEST 2006
On Aug 23, 2006, at 13:59:13, Bela Szilagyi wrote:
> In one of my thorns (taken after AHFinderDirect's mask-setter
> routine schedule
> bing) I had
>
>
> schedule my_routine in my_group
> {
> lang: C
> storage: my_var
> options: global loop-local
> } "..."
>
>
> while the parfile says
>
> Carpet::enable_all_storage = no
>
> The routine ended up being called, at least once within the first
> course
> time-step worth of time, with my_var being set to NULL.
>
> A bit of peaking into it with gdb has shown that not all calls to
> the routine
> were lacking the memory, but, in the one case this variable would
> have been
> used, the memory was not there.
>
> Is this a bug or a feature? In other terms -- does "global loop-
> local" imply
> that one should not assume memory associated with tmp_var ?
That depends on what my_var is. If it is a grid function, then in
local mode, memory should always be there, otherwise not. If it is a
grid arrays or grid scalar, then memory should always be there.
-erik
--
Erik Schnetter <schnetter at cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/developers/attachments/20060823/a9ed9732/attachment.pgp
More information about the developers
mailing list