attempt to fix parallel writing on MacOS
should resolve TypeError: cannot pickle 'vtkmodules.vtkIOXML.vtkXMLRectilinearGridWriter' object error
This commit is contained in:
parent
e40ac13cad
commit
ae20f5ffe6
|
@ -190,9 +190,13 @@ class VTK:
|
||||||
writer.SetCompressorTypeToZLib()
|
writer.SetCompressorTypeToZLib()
|
||||||
writer.SetDataModeToBinary()
|
writer.SetDataModeToBinary()
|
||||||
writer.SetInputData(self.geom)
|
writer.SetInputData(self.geom)
|
||||||
|
|
||||||
if parallel:
|
if parallel:
|
||||||
mp_writer = mp.Process(target=self._write,args=(writer,))
|
try:
|
||||||
mp_writer.start()
|
mp_writer = mp.Process(target=self._write,args=(writer,))
|
||||||
|
mp_writer.start()
|
||||||
|
except TypeError:
|
||||||
|
writer.Write()
|
||||||
else:
|
else:
|
||||||
writer.Write()
|
writer.Write()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue