<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Andy,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">That is exactly what I did, and I also modified CMakeLists.txt to link ${PARAVIEW_PLUGINLIST} to the target via target_link_libraries. However, the
</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">symbol “pv_plugin_instance_SMVorticity” is undefined in the built target static library, while following the same process to build pvbatch and pvpython executable works,
i.e., the same plugin symbol is defined in built pvpython executable. Since it is static linking, I know linking order matters, but have not got it to work by adjusting linking orders. Let me know if you have ideas on what I could try to figure out and resolve
this issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hong<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Andy Bauer [mailto:andy.bauer@kitware.com]
<br>
<b>Sent:</b> Thursday, October 03, 2013 10:19 AM<br>
<b>To:</b> Hong Yi<br>
<b>Cc:</b> David E DeMarle; paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] My own filter as part of pipeline for coprocessing raises "name not defined" error<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Hong,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">There won't be a separate library created for Python wrapping your plugin for doing ParaView. Did you add in the following to your adaptor:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">#ifndef BUILD_SHARED_LIBS<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">#include "pvStaticPluginsInit.h"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">#endif<o:p></o:p></p>
</div>
<div>
<table class="MsoNormalTable" border="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><br>
And then in the adaptor initialization step you should have something in it like:<o:p></o:p></p>
<div>
<p class="MsoNormal">#ifndef BUILD_SHARED_LIBS<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">paraview_static_plugins_init();<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">#endif<o:p></o:p></p>
</div>
<div>
<table class="MsoNormalTable" border="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal">If that doesn't work then it will probably take a bit of tinkering to figure out what's wrong.<br>
<br>
Regards,<br>
Andy<o:p></o:p></p>
</td>
</tr>
<tr>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt"></td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt"></td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt"></td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
<tr>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt"></td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt"></td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt"></td>
<td valign="top" style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Oct 2, 2013 at 12:28 PM, Hong Yi <<a href="mailto:hongyi@renci.org" target="_blank">hongyi@renci.org</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks for the helpful info, Andy. I looked at the link and followed the code change Burlen posted
to add the static linked plugin initialization into pvbatch and pvpython and that worked fine. Now pvbatch and pypthon all have my filter plugin statically loaded. I still got the “name not defined” error when coprocessing parses the pipeline though. I believe
the problem remains because there is still no python wrapped proxy to my filter since there is no change to lib\site-packages after I add the static linked plugin initialization into pybatch and pvpython. To make sure I am on the right track for my further
investigation, I am hoping to get answers to a couple of my further questions below:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">1.</span><span style="font-size:7.0pt;color:#1F497D">
</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">What is the right way to go to have the proxy to my filter Python wrapped? How can I verity I have the proxy to my filter Python wrapped? Is it true that the Python-wrapped
proxy to my filter should show up in some python file in lib\site-packages if the filter is indeed python-wrapped? </span><o:p></o:p></p>
<p><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">2.</span><span style="font-size:7.0pt;color:#1F497D">
</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I made similar changes to CPythonAdaptorAPI.cxx and CMakeLists.txt as I did to pvpthon and pvbatch to load and init static plugin in function coprocessorinitializewithpython()
hoping to have plugin loaded when doing coprocessing linked to simulation, however, I still have the symbol “pv_plugin_instance_SMVorticity” undefined in built PythonCatalyst static lib while the plugin symbol is indeed defined in pvpython with the same code
changes. Just to confirm, does the plugin need to be loaded in Catalyst initialization in order to use it in a coprocessing pipeline? In other words, to get my plugin working in catalyst linked to simulation, I need to resolve two problems: (1) get the plugin
statically loaded in Catalyst initialization; (2) get the proxy to the plugin Python wrapped and show up in some python file in lib\site-packages. Is this true?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Yes, I know the gradient of unstructured data set filter can compute vorticity, which I referenced
to write this custom vorticity filter to make it fit our needs better with better performance. I did try to use the genetic gradient filter to compute vorticity for coprocessing, but it raises a segmentation fault after outputting several images. Will have
to debug and investigate more to find out more on that.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hong</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Andy Bauer [mailto:<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>]
<br>
<b>Sent:</b> Tuesday, October 01, 2013 2:19 PM</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<b>To:</b> Hong Yi<br>
<b>Cc:</b> David E DeMarle; <a href="mailto:paraview@paraview.org" target="_blank">
paraview@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview] My own filter as part of pipeline for coprocessing raises "name not defined" error<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Hi Hong,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">I don't think you want to do VTK Python wrapping of your class. What you want is to have the proxy to the filter Python wrapped such that it's available when you import paraview.simple.
This is what's needed for Catalyst Python pipelines. I don't think you're properly initializing the plugins from the previous directions I sent. You may want to look at
<a href="http://public.kitware.com/pipermail/paraview-developers/2013-September/002499.html" target="_blank">
http://public.kitware.com/pipermail/paraview-developers/2013-September/002499.html</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">As a side note, the gradient of unstructured data set filter can compute vorticity as well. It does require a vtkDataArray with three components to use though.
<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Regards,<br>
Andy<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Mon, Sep 30, 2013 at 5:06 PM, Hong Yi <<a href="mailto:hongyi@renci.org" target="_blank">hongyi@renci.org</a>> wrote:<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Thanks, Andy. The CMakeLists.txt for my plugin is copied below with newly added lines for python wrapping in orange:<br>
<br>
-----------------------------<br>
if(NOT ParaView_SOURCE_DIR)<br>
find_package(ParaView)<br>
include("${PARAVIEW_USE_FILE}")<br>
include (ParaViewPlugins)<br>
else()<br>
# we're building from within ParaView Source.<br>
endif()<br>
<br>
include_directories(${VTK_INCLUDE_DIRS})<br>
<span style="color:#FF9900">include(wrap-python.cmake)</span><br>
<br>
# create a paraview plugin containing server manager xml and the server<br>
# manager classes to build<br>
# this plugin can be loaded on the server side<br>
<br>
ADD_PARAVIEW_PLUGIN(SMVorticity "1.0"<br>
SERVER_MANAGER_XML VorticityFilter.xml <br>
SERVER_MANAGER_SOURCES VorticityFilter.cxx)<br>
<br>
<span style="color:#FF9900">target_link_libraries(SMVorticity ${deps})</span><br>
<br>
<span style="color:#FF9900">if(VTK_WRAP_PYTHON)<br>
wrap_python(SMVorticity "${sources}")<br>
endif()</span><br>
-----------------------------<br>
<br>
The orange lines are added by following <a href="http://www.paraview.org/pipermail/paraview/2012-May/024855.html" target="_blank">
http://www.paraview.org/pipermail/paraview/2012-May/024855.html</a> which works well and builds my filter and also wraps it in Python (i.e., it generates libSMVorticity.a and libSMVorticityPythonD.a). I have also verified the plugin is indeed loaded into pvserver
and pvpython in paraview built bin directory.<br>
<br>
However, I still got "name not defined" error in coprocessing script when creating this filter by name "VorticityOfUnstructuredDataSet" in python script. I have a couple of specific questions I am currently investigating and hoping to get some inputs from experts
in the list:<br>
<br>
1. I am not sure where this name "VorticityOfUnstructuredDataSet" (exported by coprocessing script generator plugin) comes from, the only clue I can see is in plugin.cmake, where the plugin is specified with DESCRIPTION "Vorticity Of Unstructured DataSet" and
in VorticityFilter.xml, where the plugin is given a label of "Vorticity Of Unstructured DataSet." Should this name be defined somewhere such as in some python file in paraview python site-packages?
<br>
<br>
2. I did try to add PV_PLUGIN_IMPORT macros to the adaptor since I am using Catalyst, however, the plugin symbol "pv_plugin_instance_SMVorticity" is undefined in the adaptor static lib (the same plugin symbol is defined in pvserver), hence I got an undefined
error when linking simulation code to the adaptor. I did try to add my plugin static lib (in which the plugin symbol is defined) to the adaptor target via target_link_libraries before linking to vtkPVPythonCatalyst, but that does not seem to take any effect.
For some reason I am still investigating, my plugin lib does not get to link to the adaptor via target_link_libraries. What I did is to go to src directory in the cross target and modified CMakeLists.txt for PhastaAdaptor, then went to corresponding paraview-build
directory, and did "make clean" followed by "make" to rebuild PhastaAdaptor lib. Is there something obvious that I did not do correctly?<br>
<br>
Thanks for any inputs!<br>
<br>
Hong</span><o:p></o:p></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-family:"Tahoma","sans-serif""> Andy Bauer [<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>]<br>
<b>Sent:</b> Friday, September 27, 2013 3:00 PM<br>
<b>To:</b> Hong Yi<br>
<b>Cc:</b> David E DeMarle; <a href="mailto:paraview@paraview.org" target="_blank">
paraview@paraview.org</a></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Tahoma","sans-serif""><br>
<b>Subject:</b> Re: [Paraview] My own filter as part of pipeline for coprocessing raises "name not defined" error</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Can you share your plugin or at least the CMakeLists.txt for your plugin? Have you tried with any other plugins that get packaged with ParaView to see if they work?<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">If you're using Catalyst, I would suggest adding in the PV_PLUGIN_IMPORT_INIT macros to the adaptor.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Andy<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Thu, Sep 26, 2013 at 3:40 PM, Hong Yi <<a href="mailto:hongyi@renci.org" target="_blank">hongyi@renci.org</a>> wrote:<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks! I did put my plugin inside ParaView/Plugins in the same way as other Plugins, and enabled
it when building ParaView superbuild on Titan. I can see the static lib for the Plugin is built in paraview-build/lib directory. And yes, I did use a plugin and load it via Tools|Manage Plugins when creating python coprocessing script. However, it looks like
my plugin is not loaded automatically even though it is built by ParaView superbuild. Perhaps I should still follow the link
</span><a href="http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Plugins_in_Static_Applications" target="_blank">http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Plugins_in_Static_Applications</a>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">but I am having some difficulty in following the info in the link to do what is suggested. Specifically, to what file should I insert two macros? It does not sound right to insert
them into my custom plugin cxx file. Where should I add two macros to get my custom filter plugin to be loaded and wrapper into python module? I see "LoadPlugin" function defined in simple.py to call servermanager.LoadPlugin(filename, remote) which I am thinking
perhaps should be called to load my plugin before my python coprocessing script is executed, but not sure whether this is the case or not.
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks for any suggestions!
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hong</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a name="14179ffb3b009586_14170b156e21f8ea_1415bc"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b></a><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
David E DeMarle [mailto:<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>]
<br>
<b>Sent:</b> Thursday, September 26, 2013 1:28 PM<br>
<b>To:</b> Andy Bauer<br>
<b>Cc:</b> Hong Yi; <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview] My own filter as part of pipeline for coprocessing raises "name not defined" error</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Utkarsh pointed out that you still need to follow <a href="http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Plugins_in_Static_Applications" target="_blank">http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Plugins_in_Static_Applications</a><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">when the plugin is external to ParaView. If you put your plugin inside ParaView/Plugins, then it is done automatically.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">David E DeMarle<br>
Kitware, Inc.<br>
R&D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: <a href="tel:518-881-4909" target="_blank">518-881-4909</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Thu, Sep 26, 2013 at 12:23 PM, David E DeMarle <<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I think that information is out of date. I believe that is done automatically now.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Otherwise Andy is right. Putting the filter inside a plugin a good way to go. The plugin infrastructure will make it so that when you provide the XML that describes your vtk class,
ParaView's build system will automatically wrap it into a proxy and python class so that ParaView will be able to use it.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Also, I recommend trying it on a local static build first. That way the build time will be less and development will be quicker. Once you can load you plugin locally, then you should
only have to compile on titan once.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#888888"> </span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#888888"><br clear="all">
</span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#888888">David E DeMarle<br>
Kitware, Inc.<br>
R&D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: </span><a href="tel:518-881-4909" target="_blank">518-881-4909</a><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Wed, Sep 25, 2013 at 10:34 PM, Andy Bauer <<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Did you use a plugin to add in your custom filter when creating the Python co-processing script? I'm not sure how plugins are "loaded" for static builds but you may want to look at
<a href="http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Plugins_in_Static_Applications" target="_blank">
http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Plugins_in_Static_Applications</a>. If that doesn't work, we'll have to figure out some other way to do it.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Andy<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Wed, Sep 25, 2013 at 9:16 PM, Hong Yi <<a href="mailto:hongyi@renci.org" target="_blank">hongyi@renci.org</a>> wrote:<o:p></o:p></p>
</div>
</div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204,204,204)">
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Hello,<br>
<br>
I set up a pipeline that used a custom filter I developed and exported it as a python script for coprocessing. I have made sure the static library for my custom filter is built and available in paraview-build/lib directory, and I have also linked this custom
filter static library along with Catalyst libs to the simulation code for coprocessing. However, when I run the simulation linked with ParaView coprocessing for in-situ visualization, I got "NameError: name 'MyCustomizedFilterName' is not defined" error when
the line of my customized filter in my python coprocessing script is read in for pipeline coprocessing. What should I do to get my custom filter wrapped in python so that it can be recognized and used as part of the python pipeline script for coprocessing?
Any advice and suggestions are very much appreciated.<br>
<br>
Thanks,<br>
<br>
Hong</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>