Distinguish between local and global reduction handles

Create issue
Issue #1001 open
Erik Schnetter created an issue

Local and global reduction handles both use small integers. This means that code may accidentally confuse one for the other.

To avoid this, we could add large, different offsets for local and global handles, so that they would be different. We already do this for other integer IDs in the flesh.


Comments (6)

  1. Roland Haas

    Local and global here refer to the handles returned by

    int CCTK_ReductionHandle(const char *reduction_name);
    int CCTK_ReductionArrayHandle(const char *reduction_name);  


  2. Roland Haas

    Of note: CarpetReduce is one of the codes that confuses them, so this is by no means unlikely to happen 🙂. Fixed in rhaas/reductionhandles of CarpetReduce.

    There’ may be more thorns doing the same (often using CCTK_ReduceLocalScalar) leading to failed tests.

  3. Log in to comment