- changed status to resolved
PreSync's HasAccess check only checks CCTK_REAL grid functions
Issue #2376
resolved
The HasAccess implementation in Carpet currently 3acfebf1 reads something like:
if(type == CCTK_GF && CCTK_VarTypeSize(CCTK_VarTypeI(var_index)) == sizeof(CCTK_REAL)) { var_tuple vi{var_index,-1,0}; if(hasAccess(reads[current_routine],vi)) return true; if(hasAccess(writes[current_routine],vi)) return true; if(hasAccess(tmp_read,vi)) { return true; } if(hasAccess(tmp_write,vi)) { return true; } return false; } else { return true; }
ie unless a variable checked is a grid function and real valued it always is accessible.
While it is true that only real-valued grid functions have all possible operations applied to them during a SYNC, access control should include CCTK_INT variables (eg spacemask) and grid scalars (eg results of reductions) as well.
Comments (1)
-
reporter - Log in to comment
Fixed as of git hash bde55de9 "Carpet: check access for all types of grid variables" of carpet