Aniu! To zabija równoległość :(
Proponuję to samo wrzucić do jakiegoś hooka, np:

    void hook_post_step()
    {
      parent_t::hook_post_step();
    
      this->mem->barrier();
      if (this->mem->rank() != 0) return;
      if (min(this->mem->advectee()) < 0)  
      {   
        auto ix = minIndex(this->mem->advectee());
        std::cerr << "  min @ (" << ix << ") = " << this->mem->advectee()(ix) << std::endl;
        throw std::runtime_error("values below zero!");
      }   
    }

Pozdrawiam,
S.