PreSync's HasAccess check only checks CCTK_REAL grid functions

Create issue
Issue #2376 resolved
Roland Haas created an issue

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)

  1. Log in to comment