- changed status to resolved
READS / WRITES requires comma in between list of variables, while other options eg SYNC OPTIONS do not
The schedule parser fails to parse this fragment:
SCHEDULE TestReadWrite_TestC AT initial AFTER TestReadWrite_TestC_B
{
WrITES: varpastlevelc, grouppastlevelc
ReADs: Var1, Var1_p
READs: var2
READs: testgroup_pp
WrITES: VarCurrentLevelC GroupCurrentLevelC
LANG: C
} "Record results in grid scalars"
with
TestReadWrite
Parse Error at /home/rhaas/postdoc/gr/cactus/ET_trunk/repos/flesh/lib/sbin/CSTUtils.pl line 966.
main::parse_ccl(Grammar=HASH(0x557d3f77fcd0), "sched", "/home/rhaas/postdoc/gr/cactus/ET_trunk/arrangements/CactusTes"..., "/home/rhaas/postdoc/gr/cactus/ET_trunk/repos/flesh/lib/sbin/."...) called at /home/rhaas/postdoc/gr/cactus/ET_trunk/repos/flesh/lib/sbin/ScheduleParser.pl line 95
main::create_schedule_database("Cactus", "/home/rhaas/postdoc/gr/cactus/ET_trunk/src", "TestReadWrite", "/home/rhaas/postdoc/gr/cactus/ET_trunk/arrangements/CactusTes"...) called at /home/rhaas/postdoc/gr/cactus/ET_trunk/lib/sbin/CST line 168
CST ERROR IN FILE '/home/rhaas/postdoc/gr/cactus/ET_trunk/arrangements/CactusTest/TestReadWrite/schedule.ccl' make[1]: *** No rule to make target '/home/rhaas/postdoc/gr/cactus/ET_trunk/configs/testrdwr/config-data/make.thornlist', needed by '/home/rhaas/postdoc/gr/cactus/ET_trunk/exe/cactus_testrdwr'. Stop.
but parses
SCHEDULE TestReadWrite_TestC AT initial AFTER TestReadWrite_TestC_B
{
WrITES: varpastlevelc, grouppastlevelc
ReADs: Var1, Var1_p
READs: var2
READs: testgroup_pp
WrITES: VarCurrentLevelC, GroupCurrentLevelC
LANG: C
} "Record results in grid scalars"
which has comma in the last WRITES
. This behaviour differs from eg the SYNC
statement's which accepts both comma and spaces. See eg arrangements/CactusTest/TestArrays/schedule.ccl
which contains:
sync: bar_a_4d bar_b_4d bar_c_4d bar_d_4d bar_e_4d bar_f_4d
and arrangements/Zelmani/GRHydro_InitData/schedule.ccl
which contains
SYNC: GRHydro::dens, GRHydro::tau, GRHydro::scon, GRHydro::Bcons
The documentation http://einsteintoolkit.org/usersguide/UsersGuidech12.html#x17-186000D2.4 gives the syntax of a schedule block as
schedule [GROUP] <function name|group name> AT|IN <time> \
[AS <alias>] \
[WHILE <variable>] [IF <variable>] \
[BEFORE|AFTER <function name>|(<function name> <function name> ...)] \
{
[LANG: <language>]
[OPTIONS: <option>,<option>...]
[TAGS: <keyword=value>,<keyword=value>...]
[STORAGE: <group>[timelevels],<group>[timelevels]...]
[READS: <group>,<group>...]
[WRITES: <group>,<group>...]
[TRIGGER: <group>,<group>...]
[SYNCHRONISE: <group>,<group>...]
[OPTIONS: <option>,<option>...]
} "Description of function"
which one could argue would require the comma. However, not having a comma is currently in use by thorns and the same list syntax is used for SYNC
and for OPTIONS
. For OPTIONS
spaces were always used to separate individual options eg in arrangements/CactusNumerical/SphericalSurface/schedule.ccl
:
OPTIONS: global loop-local
thus in order for READS
/ WRITES
to behave similar to the other statements in a schedule block they should accept both comma and spaces to separate variables and groups.
Comments (1)
-
reporter - Log in to comment
fixed as of git hash 37730f5a "Cactus: do not attempt to make reads vars fully qualified in parser" of cactus