I found the problem. Probably no one else on earth does this, but I was using my own macros to declare grid variables. It seems I need to append a "[0]" to the name
for vectors, thus, I use this:

#define DECLARE_CCTK_VREADS(X) \
const CCTK_REAL *X = (const CCTK_REAL *)CCTKi_VarDataPtr(cctkGH, 0, cctk_auto_thorn, #X "[0]");

instead of this

#define DECLARE_CCTK_READS(X) \
const CCTK_REAL *X = (const CCTK_REAL *)CCTKi_VarDataPtr(cctkGH, 0, cctk_auto_thorn, #X);

Cheers,
Steve

On 07/15/2015 02:24 PM, Erik Schnetter wrote:
Steve

What is the value of num_wave_components -- is it maybe zero?

Are you checking storage in local mode?

-erik

On Wed, Jul 15, 2015 at 3:21 PM, Steven R. Brandt <[email protected] <mailto:[email protected]>> wrote:

    I've been trying to use a vector

    interface.ccl:
    real cm[num_wave_components] TYPE=GF Timelevels=1
    tags='Prolongation="None"'
    real sm[num_wave_components] TYPE=GF Timelevels=1
    tags='Prolongation="None"'

    storage.ccl:
    STORAGE: cm
    STORAGE: sm

    When the code runs, I find that cm is not allocated (assert(cm !=
    0) fails).

    I found this syntax elsewhere, e.g. CarpetCG

    carpet/CarpetDev/CarpetCG/interface.ccl:
    real dirvars[cg_maxsolvevars] TYPE=GF Timelevels=1
    tags='Prolongation="None"'

    carpet/CarpetDev/CarpetCG/schedule.ccl:
    STORAGE: dirvars

    I've tried a number of variations of the syntax. I've discovered that
    removing the square brackets
    allows the storage allocation to happen (see below), but I really do
    want the vector.

    real cm TYPE=GF Timelevels=1 tags='Prolongation="None"'
    real sm TYPE=GF Timelevels=1 tags='Prolongation="None"'

    Note, this is an old Carpet Nov 2012 (newer carpets sync
    differently and
    my ghost zones don't update).

    Any idea what am I doing wrong?

    Cheers,
    Steve
    _______________________________________________
    Users mailing list
    [email protected] <mailto:[email protected]>
    http://cactuscode.org/mailman/listinfo/users




--
Erik Schnetter <[email protected] <mailto:[email protected]>>
http://www.perimeterinstitute.ca/personal/eschnetter/

_______________________________________________
Users mailing list
[email protected]
http://cactuscode.org/mailman/listinfo/users

Reply via email to