[ET Trac] [Einstein Toolkit] #1302: Reduce time spent in deciding not to do output.
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Thu Mar 28 11:08:41 CDT 2013
#1302: Reduce time spent in deciding not to do output.
--------------------------------------+-------------------------------------
Reporter: diener | Owner: eschnett
Type: enhancement | Status: new
Priority: major | Milestone:
Component: Carpet | Version: development version
Keywords: performance optimization |
--------------------------------------+-------------------------------------
I noticed, during some scaling tests, that for my code a significant
amount of time was spent by CarpetIOASCII, even though I only had it
activated and didn't actually request any output. The reason is that in
order to figure out whether to do output or not, there is a loop over all
grid variables and a routine (TimeToOutput) is called. In this
routine there is a check if the out_dir and out_vars parameters have been
steered and if so update some internal data structures. It should be
sufficient to do this before entering the loop over grid variables. The
same issue is present in CarpetIOScalar and CarpetIOHDF5. The attached
patches for CarpetIOASCII, CarpetIOScalar and CarpetIOHDF5 moves this
check outside of the loop over grid variables and in addition bypasses the
loop completely if the out_vars parameter string is the empty string. Note
that the code where I noticed this problem uses large vectors of 1D grid
arrays, and it turns out that Cactus counts each vector element as a
distinct grid variables and the length of the loop over grid variables in
my case was close to 100.000, which might explain why nobody has noticed
this before.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1302>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list