#2359: DECLARE_CCTK_ARGUMENTS_FunctionName does not handle private grid variables correctly
| Reporter: | Roland Haas |
| Status: | new |
| Milestone: | |
| Version: | |
| Type: | bug |
| Priority: | major |
| Component: | Cactus |
Changes (by Roland Haas):
For grid variables declared PRIVATE in interface.ccl the fully qualified variable name is ThornName::VariableName while for PUBLIC or PROTECTED variables the fully qualified variable name is ImplementationName::VariableName and those forms are what needs to be passed to eg CCTK_VarIndex or CCTK_VarDataPtr.
rdwr.pl seems always use the thorn name, which fails if thorn name and implementation name differ and non-PRIVATE variables are used.
An example is https://bitbucket.org/cactuscode/cactustest/src/master/TestReadWrite/interface.ccl where var1 is of that time since the implementation is TestReadWriteImp. The auto-generated DECLARE_CCTK_ARGUMENTS_TestReadWrite_TestC_A macro contains:
cctki_vi_Var1 = CCTK_VarIndex("testreadwrite::var1");
which uses the thorn name, leading to NULL pointer for var1 even though TestReadWrite_TestC_A declares the variable as WRITES.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2359/declare_cctk_arguments_functionname-does