Is there a way to detect a NaN occurring in a parallel loop?
I have tried the isnanf function as described on the Programming and Compiling forum http://www.pgroup.com/userforum/viewtopic.php?t=614&postdays=0&postorder=asc&start=5
I receive a compiler message ‘Procedures called in a compute region must have acc routine information’ when I use this approach.
The ieee_is_nan approach described here https://forums.developer.nvidia.com/t/undefined-reference-to-isnan/131626/1 gives the same message.
I vaguely recall that in some compilers, a NaN is not equal to any other value so a(i).eq.a(i) returns a false if a(i) is a NaN. This does not seem to be the case for the PGI compiler though…
Can you suggest a way forward?