[Paraview] Attempting to run Catalyst CFullExample

Andy Bauer andy.bauer at kitware.com
Wed May 29 12:42:47 EDT 2013


Hi Bill & Lucas,

I was on vacation the last several days and am now finally catching up.

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.

I think Lucas answered your questions well but let us know if there's still
something that isn't quite clear.

Regards,
Andy

On Wed, May 29, 2013 at 12:09 PM, Pettey . Lucas <LPettey at drc.com> wrote:

> Hi Bill,
>
> 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.
>
> 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".
>
> 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.
> 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.
>
> 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.
>
> 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:
> http://paraview.org/gitweb?p=ParaView.git;a=commit;h=6720c3dc175bea3e0098c27695111137d174d989.
> 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.
>
> 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.
>
> Lucas
>
>
> ________________________________________
> From: Bill Sherman [shermanw at indiana.edu]
> Sent: Wednesday, May 29, 2013 10:36 AM
> To: Pettey . Lucas; ParaView list
> Cc: Bill Sherman
> Subject: Re: [Paraview] Attempting to run Catalyst CFullExample
>
> Hello again Lucas (and ParaView community),
>
> > I just wanted to explain why the program runs for a moment and then
> returns
> > the prompt if you did not provide the script as an argument like you
> described
> > in your first email. Providing the script as an argument is the correct
> way to
> > execute the program. Since you didn't get any errors running the program
> without
> > the script, the C portion of the program is OK.
>
> Okay.
>
> >> I'm not quite sure what you mean by "ParaView versions of the python
> >> script".
> >
> > What I mean is that the version of ParaView which generated the script
> must be
> > the same as the version of ParaView that you are running and using in
> your compiler.
> > I think Andy was using the latest git version of ParaView in generating
> his scripts.
> > So, if his examples are dated May 13, a version of ParaView around that
> date would
> > be better to use. Yours is a clone in April and a lot of work was being
> done around
> > then for Catalyst. I have been working on Fortran versions and I know I
> had to
> > download and rebuild ParaView quite frequently.
>
> Make sense.
>
> > I do know the latest git clone does not work with those scripts because
> the
> > repository has been updated to 4.0, as that is what I have and I tried
> it.
>
> Okay, yesterday I downloaded and compiled a git clone (which calls itself
> 4.0.0 RC-2.
>
> > I would first try to export a script from your version of ParaView. Make
> sure
> > the CoProcessing plugin is loaded and then you should be able to export
> the state.
> > You will need to modify the code to write the data to an output file and
> then open
> > that in ParaView and create a pipeline that you want the CoProcessor to
> generate.
> > You can then export the state through the plugin. This will generate a
> python script
> > that you can use in place of the sample provided.
>
> That would be good if there were a step-by-step tutorial that goes with the
> examples, but I know that time (especially with the 4.0 release
> preparations)
> is tight.  But w/o step-by-step, or at least a picture of what the pipeline
> is supposed to look like, I'm not ready to be able to figure out how
> to build the pipeline to match the example code.
>
> > If that doesn't work, then you may might to rebuild to the latest
> ParaView and try
> > exporting a script from that version. It is critical that the ParaView
> version used
> > to generate the script is the same as the ParaView version used to
> compile the program.
>
> So I'm hoping that the 4.0.0 RC-2 version will work with his examples.
>
> > Andy will probably have some good suggestions as he is the primary
> Catalyst developer.
> > He may even update those examples to ParaView 4.0 soon.
>
> It looks like the examples on his github page haven't changed since I last
> got them, so that's a good sign that things have stabilized:
>         - https://github.com/acbauer/CatalystExampleCode
>
> > Also, these are all parallel examples so make sure you are using the
> correct mpiexec
> > syntax. I know that was something I didn't realize the first time I
> tried these examples.
>
> Hmmm, okay, so I'm not actually running in parallel, so that could also
> be my problem.  But I can report that with the current version of ParaView,
> things now break in a different way -- no segfault, but I get some
> python errors:
>         % ./FEDriver SampleScripts/feslicescript.py >& output
>
> And now that you mention that this should be done in parallel:
>         % mpirun -np 2 ./FEDriver SampleScripts/feslicescript.py >& output
>
> But that gives the same output!
>
>         % head output
>         Traceback (most recent call last):
>           File "<string>", line 2, in <module>
>           File "SampleScripts/feslicescript.py", line 12, in <module>
>             exec
> vtkPVPythonCatalystPython.vtkCPPythonHelper.GetPythonHelperScript()
>         AttributeError: 'module' object has no attribute
> 'vtkCPPythonHelper'
>         Traceback (most recent call last):
>           File "<string>", line 2, in <module>
>         NameError: name 'feslicescript' is not defined
>         Traceback (most recent call last):
>           File "<string>", line 2, in <module>
>         NameError: name 'feslicescript' is not defined
>
> And here's the beginning of that Python script:
>         % head -15 SampleScripts/feslicescript.py
>         # sample Python script for CxxFullExample. Run with:
>         # <FEDriver path>/FEDriver <path to this script>/feslicescript.py
>
>         try: paraview.simple
>         except: from paraview.simple import *
>
>         # Make sure the helper methods are loaded
>         try:
>           __cp_helper_script_loaded__
>         except:
>           import vtkPVPythonCatalystPython
>           exec
> vtkPVPythonCatalystPython.vtkCPPythonHelper.GetPythonHelperScript()
>
>         # Global variables that will hold the pipeline for each timestep
>         pipeline = None
>
>
> > Hope this clarifies some thing,
>
> Well, I definitely feel like I'm learning things.  But I'm not quite
> all the way there yet.
>
> > Lucas
>
>         Thanks for moving me forward,
>         Bill
>
> >
> > ________________________________________
> > From: William Sherman [shermanw at indiana.edu]
> > Sent: Monday, May 27, 2013 12:34 AM
> > To: Pettey . Lucas
> > Cc: ParaView list; William Sherman
> > Subject: Re: [Paraview] Attempting to run Catalyst CFullExample
> >
> > Hello again,
> >
> >> The Catalyst C and C++ examples all require the python script
> >> as an argument at run time. The Fortran example requires that
> >> the script be in the same directory. So when you aren't giving
> >> the script as an argument, the code is running but doesn't have
> >> any information about what to co-process, and it exits doing nothing.
> >
> > I did provide the script as an argument (following the instructions
> > at the top of the python script).
> >
> >> As for the seg fault, my guess is that the ParaView versions of
> >> the python script and the one against which you are compiling
> >> are different. I know they are different on mine and while I don't
> >> get a seg fault, I get some errors about the VTK class structures.
> >
> > I'm not quite sure what you mean by "ParaView versions of the python
> > script".  I do know that when I compiled the simulation with the
> > Catalyst code, I am pointing to the same version of ParaView that
> > I'm running.  I don't know how that correlates to python versions.
> >
> >> I would recommend also checking out the latest versions of the examples.
> >> Andy has done a lot of work on them recently, so if they are even a few
> >> weeks old, they might not work as expected. Also, you could just export
> >> a new script with the PV version built on your system.
> >
> > Well, thought I was downloading his latest examples by grabbing
> > them directly from his github page.  Is there somewhere else to
> > look for them?  Most of the files are dated May 13, 2013.
> >
> >> I hope this points you in the right direction.
> >
> > Not yet, but if you could explain what you mean by the ParaView
> > python version, that might shed some light.  I know I'm using the
> > same version of ParaView.
> >
> >> Lucas Pettey
> >
> >          Thanks for the suggestions,
> >          Bill
> >
> >> ________________________________________
> >> From: paraview-bounces at paraview.org [paraview-bounces at paraview.org] on
> behalf of Bill Sherman [shermanw at indiana.edu]
> >> Sent: Friday, May 24, 2013 6:56 PM
> >> To: ParaView list
> >> Cc: Bill Sherman
> >> Subject: [Paraview] Attempting to run Catalyst CFullExample
> >>
> >> Hello,
> >>
> >> I'm in the process of attempting to learn how to use the Catalyst
> >> feature of ParaView, and I have a problem.
> >>
> >> I found the sample code on github:
> >>           - https://github.com/acbauer/CatalystExampleCode
> >>
> >> and I began by compiling the "CFullExample" application.
> >>
> >> There is some weirdness when trying to compile the application
> >> as a non-Catalyst simulation, but since I'm trying to learn
> >> Catalyst, that's just an aside to the code maintainers.
> >>
> >> So I have the application (FEDriver) compiled, and there is
> >> a sample python script.  I ran ParaView (same version as I
> >> used when compiling FEDriver -- a git clone from April),
> >> and I start the Catalyst connection:
> >>           ->   Tools ->   Connect to Catalyst
> >>
> >> (which I had to find by poking around, the SC'12 Catalyst
> >> tutorial doesn't seem to mention this -- or not that I noticed.
> >> An aside to the code documenters.)
> >>
> >> So I followed the instructions in the python script, and
> >> with ParaView accepting Catalyst connections on port 22222,
> >> this is what happens:
> >>           % ./FEDriver SampleScripts/feslicescript.py
> >>           Segmentation fault (core dumped)
> >>
> >> Actually, that happens regardless of whether ParaView is running
> >> or not, but it only happens when I give the python script as an
> >> argument -- w/o the script, it runs for a moment and then returns
> >> to the prompt.
> >>
> >> So what am I missing?
> >>
> >>           Thanks,
> >>           Bill
> >>
> >> --
> >> Bill Sherman
> >> Sr. Technology Advisor
> >> Advanced Visualization Lab
> >> Pervasive Technology Inst
> >> Indiana University
> >> shermanw at indiana.edu
> >>
> >> _______________________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >>
> >> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.paraview.org/mailman/listinfo/paraview
> >> ________________________________
> >>
> >> 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.
> >
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130529/549caa76/attachment-0001.htm>


More information about the ParaView mailing list