Hi Bill & Lucas,<br><br>I was on vacation the last several days and am now finally catching up. <br><br>Thanks for the info on the examples not working with the 4.0 release candidates. I haven't tested them in a while so it's possible that something is out of sync. As Lucas mentioned, Catalyst had quite a bit of changes recently but it should have calmed down by now. I'll try and get the examples updated as well in the next couple of days. Once ParaView 4.0 comes out I'll tag the examples as well and hopefully in the not too distant future put up a dashboard with the examples running against ParaView master to help keep things in sync.<br>
<br>I think Lucas answered your questions well but let us know if there's still something that isn't quite clear.<br><br>Regards,<br>Andy<br><br><div class="gmail_quote">On Wed, May 29, 2013 at 12:09 PM, Pettey . Lucas <span dir="ltr"><<a href="mailto:LPettey@drc.com" target="_blank">LPettey@drc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Bill,<br>
<br>
Good news! You now get the same error that I do when you try to run the examples scripts. This means that everything is installed correctly. Notice that the trace back error is related to 'vtkCPPythonHelper' in the sample script. This would indicate that the script you are using is incompatible with ParaView 4.0.<br>
<br>
With ParaView 4.0, you should get the same results (or in this case error) in serial and parallel. It seems that Catalyst based on ParaView 4.0 is better at determining whether or not to use parallel functions. There is probably a more detailed explanation, but from my observations it is "smarter".<br>
<br>
To get this example working with 4.0, we need a sample pipeline from which we can export the state. If you look in FEDataStructures.c, you will see what the code is doing.<br>
The code creates a 3D CoRectilinear grid in the "grid" struc. A second struc called "Attributes" assigns Velocities as point data and Pressure as cell data. As written, the velocity varies in time and the y direction only, while pressure is constant at zero.<br>
<br>
A good exercise is to write the data to a file using your favorite method to get it into ParaView. For small data like this, I like to run it on a single processor and use the RAW (binary) data format. I would recommend just working with the velocity since it is point based and is the only variable doing anything interesting. Once you have done that, create whatever filter you like in the pipeline. The example script contains a Slice filter. If you want to be able to manipulate the data after co-processing, make sure you attach a writer to the end of the pipeline. If you don't have a writer, you can ask ParaView to output images or set up live visualization. This is done through the Co-Processing -> Export State option.<br>
<br>
If you don't want to go through all of this, you have 2 options. The first is to wait until Andy updates the examples to work with ParaView 4.0. The second would be to checkout the version from 5-14: <a href="http://paraview.org/gitweb?p=ParaView.git;a=commit;h=6720c3dc175bea3e0098c27695111137d174d989" target="_blank">http://paraview.org/gitweb?p=ParaView.git;a=commit;h=6720c3dc175bea3e0098c27695111137d174d989</a>. I THINK this version aligned Catalyst with the VTK changes and was a working version. I did a lot of rebuilding around this time, so I can't be sure. I have been working with Catalyst and Fortran and use my own scripts exclusively.<br>
<br>
This is a learning process, so if you are learning, you are marching towards the finish line. The code was in flux for a while, but seems to be stable now. I hope this helps you continue to move forward.<br>
<br>
Lucas<br>
<br>
<br>
________________________________________<br>
From: Bill Sherman [<a href="mailto:shermanw@indiana.edu">shermanw@indiana.edu</a>]<br>
Sent: Wednesday, May 29, 2013 10:36 AM<br>
To: Pettey . Lucas; ParaView list<br>
Cc: Bill Sherman<br>
<div class="HOEnZb"><div class="h5">Subject: Re: [Paraview] Attempting to run Catalyst CFullExample<br>
<br>
Hello again Lucas (and ParaView community),<br>
<br>
> I just wanted to explain why the program runs for a moment and then returns<br>
> the prompt if you did not provide the script as an argument like you described<br>
> in your first email. Providing the script as an argument is the correct way to<br>
> execute the program. Since you didn't get any errors running the program without<br>
> the script, the C portion of the program is OK.<br>
<br>
Okay.<br>
<br>
>> I'm not quite sure what you mean by "ParaView versions of the python<br>
>> script".<br>
><br>
> What I mean is that the version of ParaView which generated the script must be<br>
> the same as the version of ParaView that you are running and using in your compiler.<br>
> I think Andy was using the latest git version of ParaView in generating his scripts.<br>
> So, if his examples are dated May 13, a version of ParaView around that date would<br>
> be better to use. Yours is a clone in April and a lot of work was being done around<br>
> then for Catalyst. I have been working on Fortran versions and I know I had to<br>
> download and rebuild ParaView quite frequently.<br>
<br>
Make sense.<br>
<br>
> I do know the latest git clone does not work with those scripts because the<br>
> repository has been updated to 4.0, as that is what I have and I tried it.<br>
<br>
Okay, yesterday I downloaded and compiled a git clone (which calls itself<br>
4.0.0 RC-2.<br>
<br>
> I would first try to export a script from your version of ParaView. Make sure<br>
> the CoProcessing plugin is loaded and then you should be able to export the state.<br>
> You will need to modify the code to write the data to an output file and then open<br>
> that in ParaView and create a pipeline that you want the CoProcessor to generate.<br>
> You can then export the state through the plugin. This will generate a python script<br>
> that you can use in place of the sample provided.<br>
<br>
That would be good if there were a step-by-step tutorial that goes with the<br>
examples, but I know that time (especially with the 4.0 release<br>
preparations)<br>
is tight. But w/o step-by-step, or at least a picture of what the pipeline<br>
is supposed to look like, I'm not ready to be able to figure out how<br>
to build the pipeline to match the example code.<br>
<br>
> If that doesn't work, then you may might to rebuild to the latest ParaView and try<br>
> exporting a script from that version. It is critical that the ParaView version used<br>
> to generate the script is the same as the ParaView version used to compile the program.<br>
<br>
So I'm hoping that the 4.0.0 RC-2 version will work with his examples.<br>
<br>
> Andy will probably have some good suggestions as he is the primary Catalyst developer.<br>
> He may even update those examples to ParaView 4.0 soon.<br>
<br>
It looks like the examples on his github page haven't changed since I last<br>
got them, so that's a good sign that things have stabilized:<br>
- <a href="https://github.com/acbauer/CatalystExampleCode" target="_blank">https://github.com/acbauer/CatalystExampleCode</a><br>
<br>
> Also, these are all parallel examples so make sure you are using the correct mpiexec<br>
> syntax. I know that was something I didn't realize the first time I tried these examples.<br>
<br>
Hmmm, okay, so I'm not actually running in parallel, so that could also<br>
be my problem. But I can report that with the current version of ParaView,<br>
things now break in a different way -- no segfault, but I get some<br>
python errors:<br>
% ./FEDriver SampleScripts/feslicescript.py >& output<br>
<br>
And now that you mention that this should be done in parallel:<br>
% mpirun -np 2 ./FEDriver SampleScripts/feslicescript.py >& output<br>
<br>
But that gives the same output!<br>
<br>
% head output<br>
Traceback (most recent call last):<br>
File "<string>", line 2, in <module><br>
File "SampleScripts/feslicescript.py", line 12, in <module><br>
exec<br>
vtkPVPythonCatalystPython.vtkCPPythonHelper.GetPythonHelperScript()<br>
AttributeError: 'module' object has no attribute 'vtkCPPythonHelper'<br>
Traceback (most recent call last):<br>
File "<string>", line 2, in <module><br>
NameError: name 'feslicescript' is not defined<br>
Traceback (most recent call last):<br>
File "<string>", line 2, in <module><br>
NameError: name 'feslicescript' is not defined<br>
<br>
And here's the beginning of that Python script:<br>
% head -15 SampleScripts/feslicescript.py<br>
# sample Python script for CxxFullExample. Run with:<br>
# <FEDriver path>/FEDriver <path to this script>/feslicescript.py<br>
<br>
try: paraview.simple<br>
except: from paraview.simple import *<br>
<br>
# Make sure the helper methods are loaded<br>
try:<br>
__cp_helper_script_loaded__<br>
except:<br>
import vtkPVPythonCatalystPython<br>
exec vtkPVPythonCatalystPython.vtkCPPythonHelper.GetPythonHelperScript()<br>
<br>
# Global variables that will hold the pipeline for each timestep<br>
pipeline = None<br>
<br>
<br>
> Hope this clarifies some thing,<br>
<br>
Well, I definitely feel like I'm learning things. But I'm not quite<br>
all the way there yet.<br>
<br>
> Lucas<br>
<br>
Thanks for moving me forward,<br>
Bill<br>
<br>
><br>
> ________________________________________<br>
> From: William Sherman [<a href="mailto:shermanw@indiana.edu">shermanw@indiana.edu</a>]<br>
> Sent: Monday, May 27, 2013 12:34 AM<br>
> To: Pettey . Lucas<br>
> Cc: ParaView list; William Sherman<br>
> Subject: Re: [Paraview] Attempting to run Catalyst CFullExample<br>
><br>
> Hello again,<br>
><br>
>> The Catalyst C and C++ examples all require the python script<br>
>> as an argument at run time. The Fortran example requires that<br>
>> the script be in the same directory. So when you aren't giving<br>
>> the script as an argument, the code is running but doesn't have<br>
>> any information about what to co-process, and it exits doing nothing.<br>
><br>
> I did provide the script as an argument (following the instructions<br>
> at the top of the python script).<br>
><br>
>> As for the seg fault, my guess is that the ParaView versions of<br>
>> the python script and the one against which you are compiling<br>
>> are different. I know they are different on mine and while I don't<br>
>> get a seg fault, I get some errors about the VTK class structures.<br>
><br>
> I'm not quite sure what you mean by "ParaView versions of the python<br>
> script". I do know that when I compiled the simulation with the<br>
> Catalyst code, I am pointing to the same version of ParaView that<br>
> I'm running. I don't know how that correlates to python versions.<br>
><br>
>> I would recommend also checking out the latest versions of the examples.<br>
>> Andy has done a lot of work on them recently, so if they are even a few<br>
>> weeks old, they might not work as expected. Also, you could just export<br>
>> a new script with the PV version built on your system.<br>
><br>
> Well, thought I was downloading his latest examples by grabbing<br>
> them directly from his github page. Is there somewhere else to<br>
> look for them? Most of the files are dated May 13, 2013.<br>
><br>
>> I hope this points you in the right direction.<br>
><br>
> Not yet, but if you could explain what you mean by the ParaView<br>
> python version, that might shed some light. I know I'm using the<br>
> same version of ParaView.<br>
><br>
>> Lucas Pettey<br>
><br>
> Thanks for the suggestions,<br>
> Bill<br>
><br>
>> ________________________________________<br>
>> From: <a href="mailto:paraview-bounces@paraview.org">paraview-bounces@paraview.org</a> [<a href="mailto:paraview-bounces@paraview.org">paraview-bounces@paraview.org</a>] on behalf of Bill Sherman [<a href="mailto:shermanw@indiana.edu">shermanw@indiana.edu</a>]<br>
>> Sent: Friday, May 24, 2013 6:56 PM<br>
>> To: ParaView list<br>
>> Cc: Bill Sherman<br>
>> Subject: [Paraview] Attempting to run Catalyst CFullExample<br>
>><br>
>> Hello,<br>
>><br>
>> I'm in the process of attempting to learn how to use the Catalyst<br>
>> feature of ParaView, and I have a problem.<br>
>><br>
>> I found the sample code on github:<br>
>> - <a href="https://github.com/acbauer/CatalystExampleCode" target="_blank">https://github.com/acbauer/CatalystExampleCode</a><br>
>><br>
>> and I began by compiling the "CFullExample" application.<br>
>><br>
>> There is some weirdness when trying to compile the application<br>
>> as a non-Catalyst simulation, but since I'm trying to learn<br>
>> Catalyst, that's just an aside to the code maintainers.<br>
>><br>
>> So I have the application (FEDriver) compiled, and there is<br>
>> a sample python script. I ran ParaView (same version as I<br>
>> used when compiling FEDriver -- a git clone from April),<br>
>> and I start the Catalyst connection:<br>
>> -> Tools -> Connect to Catalyst<br>
>><br>
>> (which I had to find by poking around, the SC'12 Catalyst<br>
>> tutorial doesn't seem to mention this -- or not that I noticed.<br>
>> An aside to the code documenters.)<br>
>><br>
>> So I followed the instructions in the python script, and<br>
>> with ParaView accepting Catalyst connections on port 22222,<br>
>> this is what happens:<br>
>> % ./FEDriver SampleScripts/feslicescript.py<br>
>> Segmentation fault (core dumped)<br>
>><br>
>> Actually, that happens regardless of whether ParaView is running<br>
>> or not, but it only happens when I give the python script as an<br>
>> argument -- w/o the script, it runs for a moment and then returns<br>
>> to the prompt.<br>
>><br>
>> So what am I missing?<br>
>><br>
>> Thanks,<br>
>> Bill<br>
>><br>
>> --<br>
>> Bill Sherman<br>
>> Sr. Technology Advisor<br>
>> Advanced Visualization Lab<br>
>> Pervasive Technology Inst<br>
>> Indiana University<br>
>> <a href="mailto:shermanw@indiana.edu">shermanw@indiana.edu</a><br>
>><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><br>
>> ________________________________<br>
>><br>
>> This electronic message transmission and any attachments that accompany it contain information from DRC® (Dynamics Research Corporation) or its subsidiaries, or the intended recipient, which is privileged, proprietary, business confidential, or otherwise protected from disclosure and is the exclusive property of DRC and/or the intended recipient. The information in this email is solely intended for the use of the individual or entity that is the intended recipient. If you are not the intended recipient, any use, dissemination, distribution, retention, or copying of this communication, attachments, or substance is prohibited. If you have received this electronic transmission in error, please immediately reply to the author via email that you received the message by mistake and also promptly and permanently delete this message and all copies of this email and any attachments. We thank you for your assistance and apologize for any inconvenience.<br>
><br>
<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><br>
</div></div></blockquote></div><br>