I have an openMP code that takes 8 instances of a class and uses them in parallel (the class itself is a well known particle physics simulation code). It runs slower on multiple cores than on a single core however.
When using Intel Inspector, I find data races in various functions of the class that seem to be related to basic maths functions in libm. See this screenshot for an example involving atan:
Is this genuine or a false positive? In which case, do I need to find an alternate thread safe implementation of these functions? I have checked the class itself and there are no static or global variables, so the objects themselves should be private in the omp parallel block.
A simple version of my code is this (the init function calls lots of other functions that heavily use the maths functions)
#pragma omp parallel