Catalysts creates newline when running on Cray machines
@patchett2002 @cmbiwer @ethan.stam @demarle @cory.quammen
For awhile we have noticed that when running a code using Catalyst, every rank will produce a newline when Catalyst is initialized. For large jobs, this is a very annoying thing, seeing thousands of blank newline in the middle of your job output. This only occurs on Cray machines, Trinity and Trinitite. It does not happen with our other HPC machines.
I've traced it to the call to coprocessorinitializewithpython(). Eventually in that call stack, in vtkCPPythonPipeline.cxx, in void CatalystInitializePython(), some python modules are imported using a call to vtkPythonInterpreter::RunSimpleString() -- so line 58, file vtkCPPythonPipeline.cxx. That call to RunSimpleString() produces a newline.
I've noticed in vtkPythonInterpreter.cxx that there is a hack calling RunSimpleString() with nothing because calling it the first time produces a newline. I'm guessing on Cray machines that this hack does not work.
So far I've tested this using Python 2. I haven't been able to test with Python 3 because we are having issues building with it.