#928: openmp parallelization within Exact broken --------------------+------------------------------------------------------- Reporter: knarf | Owner: Type: defect | Status: new Priority: major | Milestone: ET_2012_05 Component: Other | Version: Keywords: | --------------------+------------------------------------------------------- Exact uses openmp for the loop over grid points. However, quite a few metrics (which get called pointwise) use static (saved) data. In all cases I have looked at this is only used to initialize some local variables with values from Cactus parameters - and only as long as a 'global' variable 'firstcall' is true. This variable is set to 'false' after the other variables had been initialized, which should be ok even when using multiple threads. However, the compiler can switch the two (and does according to the assembly output), leading to another thread 'seeing' first_call being false, but the global variables not being initialized yet.
The right solution would be to remove these variables. They are not really necessary, because the Cactus parameters could directly be used. However, that patch would be quite large.
A simple and quick workaround would be to remove the openmp parallelization for that loop, at least for the upcoming release.
We have to do one of the two - or something else in case someone comes up with another idea. This is currently breaking several testsuites (sometimes).
In case you want to see an example: look at de_Sitter.F77 and firstcall and arad. Thoughts?