<div dir="ltr">Hi again!<div><br></div><div>So I gave that a shot Berk (starting the server and client separatly), but it still fails (although now I can see the output). It seems like each thread is trying to operate on the data, but some of the threads have no data.</div><div><br></div><div>E.g. if I do;</div><div>
<pre style="margin-top:12px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">from</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,0,255)">paraview.numpy_support</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">import</span><span style="font-family:monospace"> vtk_to_numpy</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">import</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,0,255)">vtkCommonDataModelPython</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">import</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,0,255)">numpy</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">as</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,0,255)">np</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">from</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,0,255)">scipy.optimize</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">import</span><span style="font-family:monospace"> curve_fit</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">if</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(0,128,0)">type</span><span style="font-family:monospace">(</span><span style="font-family:monospace;color:rgb(0,128,0)">self</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">GetInputDataObject(</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">,</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">)) </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">is</span><span style="font-family:monospace"> vtkCommonDataModelPython</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">vtkUnstructuredGrid </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">and</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(0,128,0)">type</span><span style="font-family:monospace">(</span><span style="font-family:monospace;color:rgb(0,128,0)">self</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">GetInputDataObject(</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">,</span><span style="font-family:monospace;color:rgb(102,102,102)">1</span><span style="font-family:monospace">)) </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">is</span><span style="font-family:monospace"> vtkCommonDataModelPython</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">vtkPolyData:</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> g </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">0</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> p </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">1</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">elif</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(0,128,0)">type</span><span style="font-family:monospace">(</span><span style="font-family:monospace;color:rgb(0,128,0)">self</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">GetInputDataObject(</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">,</span><span style="font-family:monospace;color:rgb(102,102,102)">1</span><span style="font-family:monospace">)) </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">is</span><span style="font-family:monospace"> vtkCommonDataModelPython</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">vtkUnstructuredGrid </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">and</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(0,128,0)">type</span><span style="font-family:monospace">(</span><span style="font-family:monospace;color:rgb(0,128,0)">self</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">GetInputDataObject(</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">,</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">)) </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">is</span><span style="font-family:monospace"> vtkCommonDataModelPython</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">vtkPolyData:</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> g </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">1</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> p </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">0</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">else</span><span style="font-family:monospace">:</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">print</span><span style="font-family:monospace">(</span><span style="font-family:monospace;color:rgb(186,33,33)">'ERROR'</span><span style="font-family:monospace">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">return</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace;font-weight:600;color:rgb(0,128,0)"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-style:italic;color:rgb(64,128,128)"># import the grid</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">Vs </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> inputs[g]</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData[</span><span style="font-family:monospace;color:rgb(186,33,33)">'Vs'</span><span style="font-family:monospace">]</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">depth </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> inputs[g]</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData[</span><span style="font-family:monospace;color:rgb(186,33,33)">'depth'</span><span style="font-family:monospace">]</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">z </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> inputs[</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">]</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData[</span><span style="font-family:monospace;color:rgb(186,33,33)">'z'</span><span style="font-family:monospace">]</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-style:italic;color:rgb(64,128,128)"># setup output</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">output</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">append(Vs, </span><span style="font-family:monospace;color:rgb(186,33,33)">'Vs'</span><span style="font-family:monospace">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">output</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">append(depth, </span><span style="font-family:monospace;color:rgb(186,33,33)">'depth'</span><span style="font-family:monospace">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">output</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">append(z, </span><span style="font-family:monospace;color:rgb(186,33,33)">'z'</span><span style="font-family:monospace">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-style:italic;color:rgb(64,128,128)"># import the profile</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">Vs_profile </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> inputs[p]</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData[</span><span style="font-family:monospace;color:rgb(186,33,33)">'Vs'</span><span style="font-family:monospace">]</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">depth_profile </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> inputs[p]</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData[</span><span style="font-family:monospace;color:rgb(186,33,33)">'depth'</span><span style="font-family:monospace">]</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">print</span><span style="font-family:monospace">(depth_profile)</span></pre></div><div><br></div><div><br></div><div>I get;</div><div><br></div><div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7fd02b9ea910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7f8971cd5910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7f010353c910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7fc5e2d60910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7f0370faa910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7fd571637910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7fc5165c1910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7fba0f9a2910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7f37ce82a910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7f11e08e9910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7efd695c2910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7f34e17c5910></div><div><vtk.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7faed557c910></div><div>[ nan nan nan nan</div><div> nan nan nan -236.76765442</div><div> -674.57861328 -1112.38952637 -1550.20043945 -1988.04382324</div><div> -2425.89160156 -2863.73901367 -3301.58666992 -3739.43408203</div><div> -4177.28173828 -4615.12939453 -5053.00439453 -5491.04589844</div><div> -5929.25048828 -6367.58935547 -6806.04101562 -7244.6015625</div><div> -7683.24755859 -8121.96826172 -8560.76660156 -8999.62597656</div><div> -9438.54199219 -9877.5078125 -10316.52050781 -10755.57617188</div><div> -11194.66992188 -11633.79199219 -12072.91308594 -12512.03515625</div><div> -12951.15722656 -13390.27832031 -13829.40039062 -14268.52246094</div><div> -14707.64355469 -15146.765625 -15585.88769531 -16025.00878906</div><div> -16464.13085938 -16903.25195312 -17342.375 -17781.49609375</div><div> -18220.6171875 -18659.74023438 -19098.86132812 -19537.98242188</div><div> -19977.10546875 -20416.2265625 -20855.34765625 -21294.47070312</div><div> -21733.59179688 -22172.71289062 -22611.8359375 -23050.95703125</div><div> -23490.078125 -23929.20117188 -24368.32226562 -24807.44335938</div><div> -25246.56640625 -25685.6875 -26124.80859375 -26563.93164062</div><div> -27003.05273438 -27442.17382812 -27881.296875 -28320.41796875</div><div> -28759.5390625 -29198.66210938 -29637.78320312 -30076.90429688</div><div> -30516.02734375 -30955.1484375 -31394.26953125 -31833.39257812</div><div> -32272.51367188 -32711.63476562 -33150.7578125 -33589.87890625 -34029.</div><div> -34468.12109375 -34907.24609375 -35346.3671875 -35785.48828125</div><div> -36224.609375 -36663.73046875 -37102.8515625 -37541.9765625</div><div> -37981.09765625 -38420.21875 -38859.33984375 -39298.4609375</div><div> -39737.58203125 -40176.70703125 -40615.828125 nan]</div></div><div><br></div><div><br></div><div>When I try and run subsequent operations on the variable (like np.isnan(depth_profile)) it returns errors for the first 13 empty threads and vaild results for the 14th thread, but then pseudo-crashes.</div><div><br></div><div>E.g. (same code as above but now with)</div><div><br></div><div>
<p style="margin:0px"><span style="font-family:monospace">nanx </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> np</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">argwhere(np</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">isnan(depth_profile))</span></p><p style="margin:0px"><span style="font-family:monospace"><br></span></p><p style="margin:0px"><span style="font-family:monospace">output;</span></p><p style="margin:0px">
</p><p style="margin:0px"><font face="monospace">TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''</font></p><p style="margin:0px"><font face="monospace">TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''</font></p><p style="margin:0px"><font face="monospace">TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''</font></p><p style="margin:0px"><font face="monospace">TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''</font></p><p style="margin:0px"><font face="monospace">TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''</font></p><p style="margin:0px"><font face="monospace">TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''</font></p><p style="margin:0px"><font face="monospace">TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''</font></p><p style="margin:0px"><font face="monospace">TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''</font></p><p style="margin:0px"><font face="monospace"><br></font></p><p style="margin:0px"><font face="monospace"><br></font></p><p style="margin:0px"><font face="monospace">So any idea on how to explicitly only make it only consider the valid thread? Or any other idea how to fix this? Once again, it works perfectly on serial, so is just an issue with how PV, myself, and the programmable filter are interacting with MPI.</font></p><p style="margin:0px"><font face="monospace"><br></font></p><p style="margin:0px"><font face="monospace"><br></font></p></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 11, 2017 at 12:37 PM, Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">So instead of using the auto MPI stuff, try running the server manually. Turn off auto MPI and then run the server on the command line with something like:<div><br></div><div>> <span style="font-size:12.8px"> /usr/bin/mpiexec -np 14 /home/ashton/Treetop/</span><span style="font-size:12.8px">CHANGELIN<wbr>GS/installs/ParaView-</span><span style="font-size:12.8px">05.08.<wbr>2017/bin/pvserver</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Then start the client using something like:</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">> </span><span style="font-size:12.8px">/home/ashton/Treetop/</span><span style="font-size:12.8px">CHANGEL<wbr>INGS/installs/ParaView-</span><span style="font-size:12.8px">05.08.<wbr>2017/bin/paraview -url=cs://localhost:11111</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Now the output on the server side should show up in the terminal where you ran mpiexec.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Best,</span></div><div><span style="font-size:12.8px">-berk<br></span><div><br></div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 11, 2017 at 2:53 PM, A <span dir="ltr"><<a href="mailto:andrealphus@gmail.com" target="_blank">andrealphus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yup, compiled myself. MPI version, open mpi 1.10.2;<div><br></div><div><div>ParaView-05.08.2017/bin/paravi<wbr>ew</div><div>AutoMPI: SUCCESS: command is:</div><div> "/usr/bin/mpiexec" "-np" "14" "/home/ashton/Treetop/CHANGELI<wbr>NGS/installs/ParaView-05.08.<wbr>2017/bin/pvserver" "--server-port=35817"</div><div>AutoMPI: starting process server</div><div>-------------- server output --------------</div><div>Waiting for client...</div><div>AutoMPI: server successfully started.</div><div>AutoMPI: SUCCESS: command is:</div><div> "/usr/bin/mpiexec" "-np" "14" "/home/ashton/Treetop/CHANGELI<wbr>NGS/installs/ParaView-05.08.<wbr>2017/bin/pvserver" "--server-port=43284"</div><div>AutoMPI: starting process server</div><div>Waiting for client...</div><div>AutoMPI: server successfully started.</div></div><div><br></div><div><div>/usr/bin/mpiexec --version</div><div>mpiexec (OpenRTE) 1.10.2</div></div><div><br></div><div><br></div><div>I figured the print statements are getting lost somewhere along the way. I do a decent bit of multiprocessing in python, but unsure of the backend of how its done in Paraview when you set it up to use mpi and are using a programmable filter. I assume Paraview takes care of it itself, but not sure if this is correct.</div><div><br></div><div><br></div></div><div class="m_-1778996199344442439HOEnZb"><div class="m_-1778996199344442439h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 11, 2017 at 10:56 AM, Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hmmm that's weird. Did you compile yourself? Which MPI are you using? Most MPI versions print out standard output on the terminal... Also, you should probably print only from a single MPI rank to avoid clashes. You can do that by getting rank using mpi4py...<div><br></div><div>Best,</div><div>-berk</div></div><div class="m_-1778996199344442439m_2015165256461685001HOEnZb"><div class="m_-1778996199344442439m_2015165256461685001h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 11, 2017 at 1:34 PM, A <span dir="ltr"><<a href="mailto:andrealphus@gmail.com" target="_blank">andrealphus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hi Berk!<div dir="auto"><br></div><div dir="auto">Yup when in mpi it's running from pvserver in a terminal. Sometimes errors print to that terminal window sometimes not. Print outputs never print to the terminal.</div><div dir="auto"><br></div><div dir="auto">The data sources are some home rolled netcdfs, and the filter in a middle step in a long processing chain. These files are several gbs</div><div dir="auto"><br></div></div><div class="m_-1778996199344442439m_2015165256461685001m_2368396092812633998HOEnZb"><div class="m_-1778996199344442439m_2015165256461685001m_2368396092812633998h5"><div class="gmail_extra"><br><div class="gmail_quote">On Oct 11, 2017 10:23 AM, "Berk Geveci" <<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>> wrote:<br type="attribution"><blockquote class="m_-1778996199344442439m_2015165256461685001m_2368396092812633998m_5546886104737602009quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Andre,<div><br></div><div>Are you running pvserver explicitly? If you run it explicitly and connect with the GUI to it, the output of print statements should show up on the terminal you ran mpiexec/mpirun on. Once you do that and we know what the error is, I should be able to help more.</div><div><br></div><div>PS: What is your data source? (file format?)</div><div><br></div><div>Best,</div><div>-berk</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div class="m_-1778996199344442439m_2015165256461685001m_2368396092812633998m_5546886104737602009elided-text">On Tue, Oct 10, 2017 at 6:59 PM, A <span dir="ltr"><<a href="mailto:andrealphus@gmail.com" target="_blank">andrealphus@gmail.com</a>></span> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-1778996199344442439m_2015165256461685001m_2368396092812633998m_5546886104737602009elided-text"><div dir="ltr">I normally run Paraview on my workstation with mpi support (14 cores). It's been working fine like this for a year.<div><br></div><div>For some reason however, the debug/output messages windows dont work when running in mpi (e.g. print "hello", returns nothing). But they do work when I turn mpi off.</div><div><br></div><div>I recently wrote a few new programmable filters, and while they work perfectly with mpi off, the hand and dont do anything with mpi on.</div><div><br></div><div>Any idea?</div><div><br></div><div>-ashton</div><div><br></div><div>p.s. heres one of the filters for example;</div><div>
<pre style="margin-top:12px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">from</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,0,255)">paraview.numpy_support</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">import</span><span style="font-family:monospace"> vtk_to_numpy</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">import</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,0,255)">vtkCommonDataModelPython</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">import</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,0,255)">numpy</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">as</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,0,255)">np</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">from</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,0,255)">scipy.optimize</span><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">import</span><span style="font-family:monospace"> curve_fit</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">if</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(0,128,0)">type</span><span style="font-family:monospace">(</span><span style="font-family:monospace;color:rgb(0,128,0)">self</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">GetInputDataObject(</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace"><wbr>,</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">)) </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">is</span><span style="font-family:monospace"> vtkCommonDataModelPython</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">vtkUn<wbr>structuredGrid </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">and</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(0,128,0)">type</span><span style="font-family:monospace">(</span><span style="font-family:monospace;color:rgb(0,128,0)">self</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">GetInputDataObject(</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace"><wbr>,</span><span style="font-family:monospace;color:rgb(102,102,102)">1</span><span style="font-family:monospace">)) </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">is</span><span style="font-family:monospace"> vtkCommonDataModelPython</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">vtkPo<wbr>lyData:</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> g </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">0</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> p </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">1</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">elif</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(0,128,0)">type</span><span style="font-family:monospace">(</span><span style="font-family:monospace;color:rgb(0,128,0)">self</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">GetInputDataObject(</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace"><wbr>,</span><span style="font-family:monospace;color:rgb(102,102,102)">1</span><span style="font-family:monospace">)) </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">is</span><span style="font-family:monospace"> vtkCommonDataModelPython</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">vtkUn<wbr>structuredGrid </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">and</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(0,128,0)">type</span><span style="font-family:monospace">(</span><span style="font-family:monospace;color:rgb(0,128,0)">self</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">GetInputDataObject(</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace"><wbr>,</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">)) </span><span style="font-family:monospace;font-weight:600;color:rgb(170,34,255)">is</span><span style="font-family:monospace"> vtkCommonDataModelPython</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">vtkPo<wbr>lyData:</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> g </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">1</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> p </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">0</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">else</span><span style="font-family:monospace">:</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">print</span><span style="font-family:monospace">(</span><span style="font-family:monospace;color:rgb(186,33,33)">'ERROR'</span><span style="font-family:monospace">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">return</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace;font-weight:600;color:rgb(0,128,0)"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-style:italic;color:rgb(64,128,128)"># import the grid</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">Vs </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> inputs[g]</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData[</span><span style="font-family:monospace;color:rgb(186,33,33)">'Vs'</span><span style="font-family:monospace">]</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">depth </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> inputs[g]</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData[</span><span style="font-family:monospace;color:rgb(186,33,33)">'depth'</span><span style="font-family:monospace">]</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">z </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> inputs[</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">]</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData[</span><span style="font-family:monospace;color:rgb(186,33,33)">'z'</span><span style="font-family:monospace">]</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-style:italic;color:rgb(64,128,128)"># setup output</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">output</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">append(Vs, </span><span style="font-family:monospace;color:rgb(186,33,33)">'Vs'</span><span style="font-family:monospace">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">output</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">append(depth, </span><span style="font-family:monospace;color:rgb(186,33,33)">'depth'</span><span style="font-family:monospace">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">output</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">append(z, </span><span style="font-family:monospace;color:rgb(186,33,33)">'z'</span><span style="font-family:monospace">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-style:italic;color:rgb(64,128,128)"># import the profile</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">Vs_profile </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> inputs[p]</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData[</span><span style="font-family:monospace;color:rgb(186,33,33)">'Vs'</span><span style="font-family:monospace">]</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">depth_profile </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> inputs[p]</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData[</span><span style="font-family:monospace;color:rgb(186,33,33)">'depth'</span><span style="font-family:monospace">]</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">def</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(0,0,255)">func</span><span style="font-family:monospace">(x, a, b, c, d,e):</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace"> </span><span style="font-family:monospace;font-weight:600;color:rgb(0,128,0)">return</span><span style="font-family:monospace"> a </span><span style="font-family:monospace;color:rgb(102,102,102)">+</span><span style="font-family:monospace"> b</span><span style="font-family:monospace;color:rgb(102,102,102)">*</span><span style="font-family:monospace">x </span><span style="font-family:monospace;color:rgb(102,102,102)">+</span><span style="font-family:monospace"> c</span><span style="font-family:monospace;color:rgb(102,102,102)">*</span><span style="font-family:monospace">x</span><span style="font-family:monospace;color:rgb(102,102,102)">**2</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">+</span><span style="font-family:monospace"> d</span><span style="font-family:monospace;color:rgb(102,102,102)">*</span><span style="font-family:monospace">x</span><span style="font-family:monospace;color:rgb(102,102,102)">**3</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">+</span><span style="font-family:monospace"> e</span><span style="font-family:monospace;color:rgb(102,102,102)">*</span><span style="font-family:monospace">x</span><span style="font-family:monospace;color:rgb(102,102,102)">**4</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace;color:rgb(102,102,102)"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">nanx </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> np</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">argwhere(np</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">isnan(depth_pro<wbr>file))</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">nany </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> np</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">argwhere(np</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">isnan(Vs_profil<wbr>e))</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">nani </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> np</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">unique(np</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">append(nanx,nany)<wbr>)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">xdata </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> numpy</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">delete(depth_profile, nani)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">ydata </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> numpy</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">delete(Vs_profile, nani)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">popt, pcov1 </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> curve_fit(func, xdata, ydata)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">Vs_theory </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> popt[</span><span style="font-family:monospace;color:rgb(102,102,102)">0</span><span style="font-family:monospace">] </span><span style="font-family:monospace;color:rgb(102,102,102)">+</span><span style="font-family:monospace"> popt[</span><span style="font-family:monospace;color:rgb(102,102,102)">1</span><span style="font-family:monospace">]</span><span style="font-family:monospace;color:rgb(102,102,102)">*</span><span style="font-family:monospace">depth </span><span style="font-family:monospace;color:rgb(102,102,102)">+</span><span style="font-family:monospace"> popt[</span><span style="font-family:monospace;color:rgb(102,102,102)">2</span><span style="font-family:monospace">]</span><span style="font-family:monospace;color:rgb(102,102,102)">*</span><span style="font-family:monospace">depth</span><span style="font-family:monospace;color:rgb(102,102,102)">**2</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">+</span><span style="font-family:monospace"> popt[</span><span style="font-family:monospace;color:rgb(102,102,102)">3</span><span style="font-family:monospace">]</span><span style="font-family:monospace;color:rgb(102,102,102)">*</span><span style="font-family:monospace">depth</span><span style="font-family:monospace;color:rgb(102,102,102)">**3</span><span style="font-family:monospace"> </span><span style="font-family:monospace;color:rgb(102,102,102)">+</span><span style="font-family:monospace"> popt[</span><span style="font-family:monospace;color:rgb(102,102,102)">4</span><span style="font-family:monospace">]</span><span style="font-family:monospace;color:rgb(102,102,102)">*</span><span style="font-family:monospace">depth</span><span style="font-family:monospace;color:rgb(102,102,102)">**4</span></pre>
<pre style="margin-top:0px;margin-bottom:0px;font-family:monospace;color:rgb(102,102,102)"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">diff </span><span style="font-family:monospace;color:rgb(102,102,102)">=</span><span style="font-family:monospace"> Vs </span><span style="font-family:monospace;color:rgb(102,102,102)">-</span><span style="font-family:monospace"> Vs_theory </span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">per_diff</span><span style="font-family:monospace;color:rgb(102,102,102)">=100*</span><span style="font-family:monospace">diff</span><span style="font-family:monospace;color:rgb(102,102,102)">/</span><span style="font-family:monospace">Vs_theory</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:monospace">output</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">PointData</span><span style="font-family:monospace;color:rgb(102,102,102)">.</span><span style="font-family:monospace">append(per_di<wbr>ff, </span><span style="font-family:monospace;color:rgb(186,33,33)">'perturbation'</span><span style="font-family:monospace">)</span></pre>
<pre style="margin-top:0px;margin-bottom:12px;font-family:monospace"><br></pre></div></div>
<br></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaV<wbr>iew</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/paraview</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>