the attached patch 1 adds a new option ignore_restricted_points to NaNChecker which, if set, makes NaNChecker not complain about grid points for which a mask (by default CarpetReduce::weight, but its name is another parameter) is zero. This is useful for hydro runs to not abort a run if a NaN is found on a very coarse level where it will be overwritten afterwards.
The second patch adds OpenMP to NaNChecker. It also converts to code to C++ and uses templates instead of macros.
Both patches pass the testsuite in NanChecker (in their default setting).