[ET Trac] [Einstein Toolkit] #928: openmp parallelization within Exact broken
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Mon Oct 8 09:46:16 CDT 2012
#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 rhaas):
I don't know if an atomic would help us. The problem is that we would need
to guarantee that first_call is only updated (in memory) after all the
other variables have been flushed to memory. Ie the problem is not that
threads see an inconsistent first_call but that first_call does not match
status of the other saved variables. A flush would seem to have the same
problem: we don't know if the compiler might move the first_call setting
and flushing to the beginning of the block (OpenMP says nothig about
ordering it seems and as far Fortran itself goes I don't know either).
The attached patch also contained omp statements for the metrics
subdirectory. The only reason I did not drop them is that some of the code
inside the if(first_call) sections was CCTK_Equals which can be quite
expensive (if eg Exact runs at each timestep) when run for each grid point
(or multiple times when derivatives are taken inside Exact).
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/928#comment:9>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list