I was thinking of how often I’m generating Python scripts through the Trace capability and something that often comes up is that the serial VTK XML writers are used in the GUI when generating the trace but when I’m running the trace I really want to use the parallel VTK XML writers. That is, I get the following in the Trace:
SaveData('/home/acbauer/aaaa.vti', proxy=wavelet1, PointDataArrays=['RTData'])
but would have preferred to have:
SaveData('/home/acbauer/aaaa.pvti', proxy=wavelet1, PointDataArrays=['RTData'])
Note the .vti
extension instead of the .pvti
extension. So if I would run the script in parallel with pvbatch
in PV 5.10 I’d get the following error:
( 2.889s) [pvbatch.0 ] vtkSMWriterFactory.cxx:344 ERR| vtkSMWriterFactory (0x18f59c0): No matching writer found for extension: vti
Traceback (most recent call last):
File "/home/acbauer/testserial.py", line 17, in <module>
SaveData('/home/acbauer/abc.vti', proxy=wavelet1, PointDataArrays=['RTData'])
File "/home/acbauer/Code/ParaView/ParaView-5.10.0-MPI-Linux-Python3.9-x86_64/lib/python3.9/site-packages/paraview/simple.py", line 1266, in SaveData
writer = CreateWriter(filename, proxy, **extraArgs)
File "/home/acbauer/Code/ParaView/ParaView-5.10.0-MPI-Linux-Python3.9-x86_64/lib/python3.9/site-packages/paraview/simple.py", line 1252, in CreateWriter
writer_proxy.UnRegister(None)
AttributeError: 'NoneType' object has no attribute 'UnRegister'
So what I’m proposing for the VTK XML writers for SaveData()
in parallel is to automatically replace the serial version with the parallel version. A warning could be added in if that seems appropriate but this seems like a convenience thing to do for users for both ease of use as well as for users that haven’t quite picked up on the subtle difference between the serial and parallel versions of the VTK XML writers.