> On Oct 21, 2015, at 1:54 PM, Eric Chamberland > <eric.chamberl...@giref.ulaval.ca> wrote: > > On 21/10/15 02:21 PM, Barry Smith wrote: >> Thanks. I don't think I need the Icount but. I think I can just generate >> an error if the FILE and LINE don't match exactly? > > Barry, I highly recommend you to use the static counter too otherwise you > won't catch the following bug: > > if all processes should call "n" times the same line of code (then the same > __LINE__ and __FILE__) but one process do not make the right number of call...
I don't understand. Say one process called it one less time then the rest. Then during the next call to MPI_Allreduce by the rogue process it will have a different LINE and FILE from the others (since they will still be at the previous call site) and hence the macro will generate an error message since line and file won't match. What is wrong with my reasoning? Barry > > Also, it is not a big deal to have this static value in a function, so it > shouldn't be a big issue... > > Eric >