diff --git a/emper/io/Stats.hpp b/emper/io/Stats.hpp index 498c8b6f33a95e32fc5d838bc1615491ed976872..56f0c3c7d994dd92efa826ee7355976dfaa72025 100644 --- a/emper/io/Stats.hpp +++ b/emper/io/Stats.hpp @@ -150,6 +150,19 @@ class Stats { return; } + // Make sure exp which is passed as future.len is only > 0 for Futures with a buffer + switch (op) { + case Operation::SEND: + case Operation::RECV: + case Operation::READ: + case Operation::WRITE: + case Operation::WRITEV: + break; + default: + exp = 0; + break; + } + // Full completion if (!exp || (uint32_t)res == exp) { operation_map[FullCompletion]++;