demo_timing.py is broken
demo_timing.py
doesn't handle writing to existing XML files properly.
The XMLFile
class is very simple and doesn't handle things like
if MPI.rank(mpi_comm_world()) == 0:
f = File(mpi_comm_self(), "timings_aggregate.xml")
f << t_sum
f << t_min
f << t_max
f << t_avg
properly. XMLFile
is set-up to read, or to write just once.
The proper fix is return a handle to an XML objects that can be manipulated, which at destruction writes to file.
Comments (13)
-
reporter -
Garth, could you elaborate more on what's the actual problem? Is it related with c6064e1?
-
Nevermind, I got it...
-
-
reporter @blechta I'm not sure if this a priority for 1.6. Maybe just make sure a single table can be output? Longer term we can let a user get a XML handle and stick whatever they want in file (implementing this would be too much for the 1.6 release).
-
Let me fix this, it is easy. Regression is that
pugixlm::load_file
now returnsstatus_no_document_element
instead of0
if document is empty. -
reporter The logic in the code seemed a bit wonky to me. Do we need a better fix longer term?
-
- changed status to resolved
Fix issue
#549This is a regression of pugixml update c6064e1: pugixml::load_file returns status_no_document_element instead of 0 when document is empty.
→ <<cset 54bd9b0f836a>>
-
Merged into next and buildbot started
-
- changed status to open
Not yet in master
-
The logic in the code seemed a bit wonky to me. Do we need a better fix longer term?
What do you mean, Garth? Which code?
-
- changed status to resolved
Fix in master
-
- removed milestone
Removing milestone: 1.6 (automated comment)
- Log in to comment
Diasable demo_timing. See Issue
#549.→ <<cset 58a73c9e1b3d>>