#928: openmp parallelization within Exact broken ------------------------------------+--------------------------------------- Reporter: knarf | Owner: Type: defect | Status: confirmed Priority: minor | Milestone: ET_2012_11 Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: ------------------------------------+---------------------------------------
Comment (by eschnett):
Your reasoning is correct; one needs a barrier as well. Given how the function is called, however, a barrier cannot be used here. - Maybe one could use atomic access to first_call instead? - I wonder whether one could use an OpenMP flush statement here to ensure a correct ordering of access to first_call.
I've had problems with threadprivate variables in the past. This was in C++ (Carpet). I don't recall whether this was with "relevant" compilers, and/or what linkage these variables had. I suggest to try this patch, and be careful.
The subdirectory metrics contains many save statements as well. Some of these are trivial and should simply be omitted, others may require special handling as well.