[prev in list] [next in list] [prev in thread] [next in thread] 

List:       paraview
Subject:    Re: [Paraview] ParaView thinks that it does not have a wind blade reader
From:       Andy Bauer <andy.bauer () kitware ! com>
Date:       2012-08-31 18:49:31
Message-ID: CAMaOp+GtzDY8NGCE8CAOLsP9h3NcATarNTVXpMZazDpW3QDq+A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks for the files. I think the best place to put the reader files would
be for VTK/IO/Geometry for vtkWindBladeReader and make a new directory
ParallelMPI to put the vtkPWindBladeReader in. If you want to get this into
VTK and ParaView faster I would suggest that you push your VTK branch to
gerrit and then I can do a review. Otherwise it will probably have to wait
2 or 3 weeks before I can get to it. If you do push it to gerrit for review
you can add me as a reviewer.

Andy

On Fri, Aug 31, 2012 at 2:09 PM, Sohail Shafii <ssshafii@ucdavis.edu> wrote:

> Ok, attached is the newest Wind blade reader.  It makes no calls to MPI in
> the constructor; only in request data or functions related to the parallel
> version of wind blade reader.
>
> I also have the change related to the vtkObjectFactory in there.  Like the
> vtkPNrrdReader, the object factory code is in the base (serial) class --
> the parallel class just has the standard new macro. As  I said below, I
> think the problem with the gradient filter might be related with the
> gradient filter I'm using (which is from the master repo from late July).
>
> It reads in serial and parallel. If it works for your tests we'll have to
> modify the xml file so that it is enabled for serial.  There are also some
> commented (old) code sections; once you guys approve of the class I can
> delete the pieces of commented code.
>
> In regards to locations of the classes: I have the vtkPWind* sitting in
> VTK/Parallel/MPI and vtkWind* files sitting in VTK/IO/Geometry.  I realize
> that the parallel version should be elsewhere; I just placed it in inside
> of VTK/Parallel/MPI for testing purposes.
>
> For the parallel version, I added vtkPWindBladeReader.cxx to the
> corresponding CMakeLists.txt file (Module_SRCS section) in the
> VTK/Parallel/MPI directory.  I also added these lines to the file:
> # Now to generate our object factory.
> set( vtk_module_overrides
>   WindBladeReader
>   )
>
> I did something similar for the vtkWindBladeReader for its corresponding
> CMakeLists.txt file in VTK/IO/Geometry but did not added any lines related
> to vtk_module_overrides.
>
>
>
> On Tue, Aug 28, 2012 at 12:42 PM, Sohail Shafii <ssshafii@ucdavis.edu>wrote:
>
>> As far as the gradient filter is concerned: I pick the UVW array in the
>> GUI.  It does compute a gradient, but only for one array -- "A-Scale
>> turbulence" (all variables are loaded).  So picking a different array in
>> the GUI doesn't seem to make a difference as it keeps computing gradient
>> for that one input (point data) array.  That's why it can't compute
>> vorticity or q-criterion because a-scale turbulence is a 1-component array.
>>
>> Might be because I'm using an older version of the repo from late July.
>>
>> Sohail
>>
>>
>> On Tue, Aug 28, 2012 at 11:51 AM, Sohail Shafii <ssshafii@ucdavis.edu>wrote:
>>
>>> Well I guess it's not a problem in the derived functions if I check to
>>> see if MPI is available; if not, call the superclass's version of the
>>> virtual function.
>>>
>>>
>>> On Tue, Aug 28, 2012 at 11:32 AM, Sohail Shafii <ssshafii@ucdavis.edu>wrote:
>>>
>>>> MPI is only used if it's available. It tries to see if there is a
>>>> MPIController available.  If not, then the number of ranks is 1, which
>>>> means that the parallel class calls the super class's requestdata (super
>>>> class is the serial wind blade reader).
>>>>
>>>> However, the parallel class overrides certain functions to make use of
>>>> MPI. So even the parallel instantiation will call the superclass's
>>>> requestdata, the overriden functions that are called from that point on
>>>> assume that MPI is available...this is a problem when the MPI controller is
>>>> not available.
>>>>
>>>> On another note, it appears that the rectilinear grid that I am reading
>>>> (VTK file, structured points I think) is read by the vtkFileSeriesReader,
>>>> which makes use of the vtkPDataSetReader class.  Strange that if I use
>>>> vtkPDataSetReader myself in C++ code that uses VTK and not paraview,
>>>> bounds/cell information is not generated. So I think that ParaView does
>>>> something else besides using that reader...hmmm.
>>>>
>>>>
>>>> On Mon, Aug 27, 2012 at 7:32 PM, Andy Bauer <andy.bauer@kitware.com>wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Aug 27, 2012 at 6:53 PM, Sohail Shafii <ssshafii@ucdavis.edu>wrote:
>>>>>
>>>>>> I see...so if MPI is running then it will create a parallel version
>>>>>> of the class. Otherwise, it will create the normal reader.
>>>>>>
>>>>>
>>>>> Technically, if ParaView is built with MPI enabled it will create the
>>>>> parallel version of the class every time whether or not the client, server,
>>>>> or python scripts are actually run with mpiexec, mpirun, or whatever is
>>>>> used to start the executable. So you can't rely on MPI being initialized
>>>>> and should not initialize it yourself in your class as that can cause
>>>>> problems as well. I think that's what you meant but wanted to be as clear
>>>>> as possible for the implications for the classes.
>>>>>
>>>>>
>>>>>>
>>>>>> As far as the check goes for a multiprocess controller; while it does
>>>>>> call the parent request data in the serial case, the inherited parallel
>>>>>> class overrides some of the methods.  Which is a problem because it refers
>>>>>> to its own file pointer in those methods (it uses MPI_File instead of a
>>>>>> FILE*). Hmm.
>>>>>>
>>>>>> Sohail
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 23, 2012 at 3:20 PM, Andy Bauer <andy.bauer@kitware.com>wrote:
>>>>>>
>>>>>>> Hi Sohail,
>>>>>>>
>>>>>>> Sorry for the slow reply but I wanted to make sure how things should
>>>>>>> work first and that took a bit to figure out. Anyways, this is closer to
>>>>>>> what's needed but the way it is supposed to work in VTK is that we use
>>>>>>> vtkObjectFactory to determine which one should be created when
>>>>>>> vtkWindBladeReader::New() is called. This is done at build time based on
>>>>>>> whether or not VTK is built with MPI. So if VTK and ParaView are built in
>>>>>>> parallel then there is code added that creates a vtkPWindBladeReader when
>>>>>>> vtkWindBladeReader::New() is called. This is regardless of whether or not
>>>>>>> the executable is run with mpi initialized or not. Because of this, the
>>>>>>> parallel version of the reader is responsible for checking whether mpi is
>>>>>>> initialized, ideally by doing
>>>>>>> vtkMultiProcessController::GetGlobalController()->IsA("vtkMPIController")
>>>>>>> is true, and if it isn't it should just call the parent class's methods for
>>>>>>> reading in the files. You may want to look at vtkPNrrdReader and the
>>>>>>> CMakeLists.txt file in that directory to see how they did things. Note
>>>>>>> though that if it's a single process running that it doesn't do any MPI
>>>>>>> calls even in the parallel version so your code will be slightly different
>>>>>>> than theirs.
>>>>>>>
>>>>>>> As for other parts of the email below:
>>>>>>>
>>>>>>> 1) yes, please keep cc'ing the list as there are some details in
>>>>>>> here that will be helpful to other people trying to implement their own
>>>>>>> parallel readers or filters
>>>>>>>
>>>>>>> 2) I'm not sure what's going on with the gradient filter but am
>>>>>>> guessing that it has to do with the multiblock data set and that there
>>>>>>> probably isn't that same array in each block. But that's just a guess. Did
>>>>>>> you try extracting the "air" block and do the vorticity and/or q criterion
>>>>>>> computation on that?
>>>>>>>
>>>>>>> 3) vtkSMReaderFactory may be the class you're looking for to
>>>>>>> determine which reader is getting used. ParaViewReaders.xml has a list of
>>>>>>> readers that it will try to read in a file.
>>>>>>>
>>>>>>> Andy
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Aug 21, 2012 at 7:11 PM, Sohail Shafii <ssshafii@ucdavis.edu
>>>>>>> > wrote:
>>>>>>>
>>>>>>>>  <sent via another e-mail address; yahoo prevents me from
>>>>>>>> uploading stuff because it's stupid>
>>>>>>>>
>>>>>>>> Here's the first version.  Do you want me to keep ccing the list?
>>>>>>>> Not sure if that's necessary at this point because this is related to the
>>>>>>>> development of ParaView and not help.
>>>>>>>>
>>>>>>>> I've run it with an older version of the master, and it seems to
>>>>>>>> read in a test .wind file just fine.  For now I had to store the
>>>>>>>> vtkPWindBladeReader* files into VTK/Parallel/MPI since I don't have
>>>>>>>> VTK/IO/MPIParallel module yet.  Now when I run the gradient filter after
>>>>>>>> the field, the gradient filter thinks that the input array does not have
>>>>>>>> the appropriate number of components for Q criterion or vorticity...but it
>>>>>>>> should (UVW does have three components per tuple).  Might be my outdated
>>>>>>>> copy of the git repo.  Haven't debugged that gradient code yet.
>>>>>>>>
>>>>>>>> *I was wondering if this is the type of code that you want?  Or
>>>>>>>> should the classes be designed differently?*  Also, I have only
>>>>>>>> run it parallel because if I try to instantiate it inside of the python
>>>>>>>> shell in serial it tries to run RequestInformation (which assumes that the
>>>>>>>> file path exists but does not).  It's a work-in-progress but it's a start.
>>>>>>>>
>>>>>>>> A random question: if ParaView reads a file, where would I put a
>>>>>>>> breakpoint that tells me which reader it ends up picking??  I have some
>>>>>>>> separate VTK code that reads in a rectilinear grid, but does not generate
>>>>>>>> cell/bounds information. ParaView does generate information about the
>>>>>>>> bounds though.
>>>>>>>>
>>>>>>>> Sohail
>>>>>>>>
>>>>>>>>   ------------------------------
>>>>>>>> *From:* David E DeMarle <dave.demarle@kitware.com>
>>>>>>>> *To:* Sohail Shafii <sohailshafii@yahoo.com>
>>>>>>>> *Cc:* Andy Bauer <andy.bauer@kitware.com>; "migichen@gmail.com" <
>>>>>>>> migichen@gmail.com>; "paraview@paraview.org" <paraview@paraview.org>;
>>>>>>>> "Woodring, Jonathan L" <woodring@lanl.gov>
>>>>>>>> *Sent:* Friday, July 20, 2012 10:02 AM
>>>>>>>> *Subject:* Re: [Paraview] ParaView thinks that it does not have a
>>>>>>>> wind blade reader
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>> In today's git master it now sits in
>>>>>>>> VTK/IO/Parallel/vtkWindbladeReader.
>>>>>>>>
>>>>>>>> The serial version should go in VTK/IO/Geometry.
>>>>>>>>
>>>>>>>> The MPI version should go in a new module VTK/IO/MPIParallel.
>>>>>>>> (VTK/IO/Parallel depends only on vtkSocketController now and should
>>>>>>>> not depend on vtkMPIController).
>>>>>>>>
>>>>>>>> Finally when that is done we can remove the flag in paraview's xml
>>>>>>>> that prevents it from being used in serial.
>>>>>>>>
>>>>>>>> David E DeMarle
>>>>>>>> Kitware, Inc.
>>>>>>>> R&D Engineer
>>>>>>>> 21 Corporate Drive
>>>>>>>> Clifton Park, NY 12065-8662
>>>>>>>> Phone: 518-881-4909
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Jul 19, 2012 at 7:08 PM, Sohail Shafii <
>>>>>>>> sohailshafii@yahoo.com> wrote:
>>>>>>>> > Well it seems like #1 and #2 can be solved by writing a new
>>>>>>>> parallel wind
>>>>>>>> > blade reader class. I had similar experience by creating
>>>>>>>> distributed
>>>>>>>> > versions of class that I created in other vtk directories. The
>>>>>>>> normal wind
>>>>>>>> > blade reader would have no parallel calls, which would address #1.
>>>>>>>> >
>>>>>>>> > What I find interesting is that in your directories, the wind
>>>>>>>> blade reader
>>>>>>>> > is located in VTK/IO/Parallel. For the ParaView snapshot that I
>>>>>>>> downloaded,
>>>>>>>> > as well as the 3.14 source, it's still in VTK/Parallel.  No
>>>>>>>> Parallel folder
>>>>>>>> > in VTK/IO. Is this a recent change?
>>>>>>>> >
>>>>>>>> > So maybe the ideal folder layout would be:
>>>>>>>> >
>>>>>>>> > VTK/IO/WindBladeReader.*
>>>>>>>> >
>>>>>>>> > VTK/IO/Parallel/DistributedWindBladeReader.*
>>>>>>>> >
>>>>>>>> > I can make changes to the WindBladeReader to remove the MPI-IO
>>>>>>>> calls and
>>>>>>>> > make a distributed wind blade reader class in case you want to
>>>>>>>> add them to
>>>>>>>> > the repository. The one template I have for the parallel/serial
>>>>>>>> split is the
>>>>>>>> > vtkStreamTracer and its distributed counterparts so I can use
>>>>>>>> those as a
>>>>>>>> > guide.  If you have better recommendations please let me know.
>>>>>>>> >
>>>>>>>> > Sohail
>>>>>>>> >
>>>>>>>> > ________________________________
>>>>>>>> > From: David E DeMarle <dave.demarle@kitware.com>
>>>>>>>> > To: Sohail Shafii <sohailshafii@yahoo.com>
>>>>>>>> > Cc: Andy Bauer <andy.bauer@kitware.com>; "migichen@gmail.com"
>>>>>>>> > <migichen@gmail.com>; "paraview@paraview.org" <
>>>>>>>> paraview@paraview.org>;
>>>>>>>> > "Woodring, Jonathan L" <woodring@lanl.gov>
>>>>>>>> > Sent: Thursday, July 19, 2012 3:20 PM
>>>>>>>> >
>>>>>>>> > Subject: Re: [Paraview] ParaView thinks that it does not have a
>>>>>>>> wind blade
>>>>>>>> > reader
>>>>>>>> >
>>>>>>>> > Two issues need to be fixed.
>>>>>>>> > 1) that behavior in 3.14 is there because of this fix which we
>>>>>>>> had to
>>>>>>>> > rush in just before the 3.14 release.
>>>>>>>> >
>>>>>>>> > Committer: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
>>>>>>>> 2012-02-08
>>>>>>>> > 17:12:18
>>>>>>>> > Parent: e401d569f6e54c49c3497852463f6b13a01da8b6 (Update version
>>>>>>>> after
>>>>>>>> > 3.14.0-RC1 tag.)
>>>>>>>> > Child:  99fdb1aeb5997c29b43393f45a478c4b53a23109 (Merge topic
>>>>>>>> > 'fix_windblade_segfault')
>>>>>>>> > Branches: many (31)
>>>>>>>> > Follows: v3.14.0-RC1
>>>>>>>> > Precedes: v3.14.0-RC2
>>>>>>>> >
>>>>>>>> >    Fix segfault with ParaView built with MPI when opening *.vtr
>>>>>>>> files.
>>>>>>>> >
>>>>>>>> >    The problem was that vtkWindBlade reader was getting created
>>>>>>>> to test
>>>>>>>> >    "CanReadFile" and that would cause segfault unless MPI was
>>>>>>>> initialized.
>>>>>>>> >
>>>>>>>> >    Solved the problem by added support to vtkSMReaderFactory to
>>>>>>>> respect the
>>>>>>>> >    ProcessSupport flag on SourceProxy and change windblade reader
>>>>>>>> XML
>>>>>>>> > to say that
>>>>>>>> >    it only works in parallel.
>>>>>>>> >
>>>>>>>> > In other words, Windblade reader's Constructor should not take it
>>>>>>>> upon
>>>>>>>> > itself to initialize MPI.
>>>>>>>> >
>>>>>>>> > Once that is fixed, we get to issue 2 before paraview 4.0
>>>>>>>> >
>>>>>>>> > 2) VTK's new modularization has the rule that no module can behave
>>>>>>>> > differently with parallel (or most other cmake config options)
>>>>>>>> turned
>>>>>>>> > configured on or off. This is so because it makes it very hard to
>>>>>>>> > package VTK when the libs behave differently in different
>>>>>>>> situations.
>>>>>>>> >
>>>>>>>> > Ie, we can't have any more
>>>>>>>> > #ifdef VTK_USE_MPI
>>>>>>>> > do something
>>>>>>>> > #else
>>>>>>>> > do something different
>>>>>>>> > #endif
>>>>>>>> > in VTK classes.
>>>>>>>> >
>>>>>>>> > Now if we want a class to behave differently when MPI is turned
>>>>>>>> on or
>>>>>>>> > off we have to make a serial only version in a non MPI dependent
>>>>>>>> > module and a subclass of that in an MPI dependent module.
>>>>>>>> >
>>>>>>>> > David E DeMarle
>>>>>>>> > Kitware, Inc.
>>>>>>>> > R&D Engineer
>>>>>>>> > 21 Corporate Drive
>>>>>>>> > Clifton Park, NY 12065-8662
>>>>>>>> > Phone: 518-881-4909
>>>>>>>> >
>>>>>>>> >
>>>>>>>> > On Thu, Jul 19, 2012 at 3:52 PM, Sohail Shafii <
>>>>>>>> sohailshafii@yahoo.com>
>>>>>>>> > wrote:
>>>>>>>> >> When running serially, vtkSMReaderFactory::CanReadFile sees that
>>>>>>>> the
>>>>>>>> >> session
>>>>>>>> >> has a single process.  As such, on line 660 it realizes that the
>>>>>>>> source
>>>>>>>> >> proxy's process support (in this case the source is a
>>>>>>>> vtkWindBladeReader
>>>>>>>> >> proxy) is multiple processes, which causes a return of "false"
>>>>>>>> from that
>>>>>>>> >> function.  This makes ParaView think that the wind blade reader
>>>>>>>> can't read
>>>>>>>> >> a
>>>>>>>> >> .wind file in serial.  According to Andy, the reader works find
>>>>>>>> in
>>>>>>>> >> parallel.
>>>>>>>> >>
>>>>>>>> >> I assume that a fix for this is pretty trivial? It never did
>>>>>>>> this before
>>>>>>>> >> in
>>>>>>>> >> previous versions of ParaView and I think that the wind blade
>>>>>>>> reader code
>>>>>>>> >> has remained mostly the same. Andy mentioned some details in
>>>>>>>> person when
>>>>>>>> >> he
>>>>>>>> >> was talking with Jon but at that time I didn't know as much as I
>>>>>>>> do now.
>>>>>>>> >> There is a mention below about enabling the filter in serial and
>>>>>>>> parallel
>>>>>>>> >> --
>>>>>>>> >> is this done in a xml file?
>>>>>>>> >>
>>>>>>>> >> Sohail
>>>>>>>> >>
>>>>>>>> >> ________________________________
>>>>>>>> >> From: David E DeMarle <dave.demarle@kitware.com>
>>>>>>>> >> To: Sohail Shafii <sohailshafii@yahoo.com>
>>>>>>>> >> Cc: Andy Bauer <andy.bauer@kitware.com>; "migichen@gmail.com"
>>>>>>>> >> <migichen@gmail.com>; "paraview@paraview.org" <
>>>>>>>> paraview@paraview.org>;
>>>>>>>> >> "Woodring, Jonathan L" <woodring@lanl.gov>
>>>>>>>> >> Sent: Tuesday, July 17, 2012 7:00 PM
>>>>>>>> >>
>>>>>>>> >> Subject: Re: [Paraview] ParaView thinks that it does not have a
>>>>>>>> wind blade
>>>>>>>> >> reader
>>>>>>>> >>
>>>>>>>> >> Each file that has an association with that file extension, made
>>>>>>>> via the
>>>>>>>> >> XML, has its CanReadFile method called. Put a breakpoint there to
>>>>>>>> >> determine
>>>>>>>> >> if ParaView even knows about that reader.
>>>>>>>> >>
>>>>>>>> >> On Tuesday, July 17, 2012, Sohail Shafii wrote:
>>>>>>>> >>
>>>>>>>> >> Sorry, but I meant to ask a different question.  Here's what
>>>>>>>> Andy said
>>>>>>>> >> before, which relates to my concern:
>>>>>>>> >> ">
>>>>>>>> >>> I went through the code and it jogged my memory about previous
>>>>>>>> problems
>>>>>>>> >>> with
>>>>>>>> >>> it. It had an explicit MPI call in the constructor that would
>>>>>>>> cause
>>>>>>>> >>> problems
>>>>>>>> >>> when paraview wasn't getting built with MPI. Any time a user
>>>>>>>> tried to
>>>>>>>> >>> open
>>>>>>>> >>> an unknown file it would try to create a windblade reader to
>>>>>>>> see if the
>>>>>>>> >>> reader could handle the file and this would cause a crash. If
>>>>>>>> you launch
>>>>>>>> >>> a
>>>>>>>> >>> separate pvserver the wind blade reader will be available in
>>>>>>>> the gui."
>>>>>>>> >>
>>>>>>>> >> What I meant was; which ParaView class "creates" or "tests" a
>>>>>>>> reader to
>>>>>>>> >> see
>>>>>>>> >> if it can handle a file? The test code you specified has a
>>>>>>>> predefined data
>>>>>>>> >> set that is loaded in, and I think is more of an example to your
>>>>>>>> average
>>>>>>>> >> user. Correct me if I'm wrong.
>>>>>>>> >>
>>>>>>>> >> So basically ParaView will recognize the file extension, tries
>>>>>>>> to load it,
>>>>>>>> >> crashes somewhere, then asks you specify the data format from a
>>>>>>>> dialog.
>>>>>>>> >> I'm
>>>>>>>> >> trying to figure out where it crashes so that I can see how that
>>>>>>>> relates
>>>>>>>> >> to
>>>>>>>> >> the wind blade reader class and any MPI calls that are in there.
>>>>>>>> >>
>>>>>>>> >> Sohail
>>>>>>>> >>
>>>>>>>> >> Subject: Re: [Paraview] ParaView thinks that it does not have a
>>>>>>>> wind blade
>>>>>>>> >> reader
>>>>>>>> >>
>>>>>>>> >> kargad:ParaView demarle$ find . -name "*WindBlade*" -print
>>>>>>>> >> ---> ./VTK/IO/Parallel/Testing/Cxx/TestWindBladeReader.cxx
>>>>>>>> >> ./VTK/IO/Parallel/vtkWindBladeReader.cxx
>>>>>>>> >> ./VTK/IO/Parallel/vtkWindBladeReader.h
>>>>>>>> >>
>>>>>>>> >> David E DeMarle
>>>>>>>> >> Kitware, Inc.
>>>>>>>> >> R&D Engineer
>>>>>>>> >> 21 Corporate Drive
>>>>>>>> >> Clifton Park, NY 12065-8662
>>>>>>>> >> Phone: 518-881-4909
>>>>>>>> >>
>>>>>>>> >>
>>>>>>>> >> On Tue, Jul 17, 2012 at 2:09 PM, Sohail Shafii <
>>>>>>>> sohailshafii@yahoo.com>
>>>>>>>> >> wrote:
>>>>>>>> >>> What is the class that is responsible for testing to reader to
>>>>>>>> see if it
>>>>>>>> >>> can
>>>>>>>> >>> open the .wind file?
>>>>>>>> >>>
>>>>>>>> >>> Sohail
>>>>>>>> >>>
>>>>>>>> >>> ________________________________
>>>>>>>> >>> From: Andy Bauer <andy.bauer@kitware.com>
>>>>>>>> >>> To: Sohail Shafii <sohailshafii@yahoo.com>
>>>>>>>> >>> Cc: "Woodring, Jonathan L" <woodring@lanl.gov>; Sebastien
>>>>>>>> Jourdain
>>>>>>>> >>> <sebastien.jourdain@kitware.com>; "migichen@gmail.com"
>>>>>>>> >>> <migichen@gmail.com>;
>>>>>>>> >>> "paraview@paraview.org" <paraview@paraview.org>
>>>>>>>> >>> Sent: Wednesday, July 11, 2012 10:53 AM
>>>>>>>> >>>
>>>>>>>> >>> Subject: Re: [Paraview] ParaView thinks that it does not have a
>>>>>>>> wind
>>>>>>>> >>> blade
>>>>>>>> >>> reader
>>>>>>>> >>>
>>>>>>>> >>> I was reluctant to enable the reader in serial (i.e. not using
>>>>>>>> MPI IO
>>>>>>>> >>> which
>>>>>>>> >>> I think is getting done by default with the parallel build)
>>>>>>>> because of
>>>>>>>> >>> the
>>>>>>>> >>> following warnings that I got:
>>>>>>>> >>>
>>>>>>>> >>> Warning: In /home/acbauer/CODE/ParaView/
>>>>>>>> >>> ParaView/VTK/IO/Parallel/vtkWindBladeReader.cxx, line 942
>>>>>>>> >>> vtkWindBladeReader (0x3a0c800): WindBladeReader error reading
>>>>>>>> file:
>>>>>>>> >>>
>>>>>>>> /home/acbauer/DATA/VTKLargeData/Data/WindBladeReader/test1_topo.wind
>>>>>>>> >>> Premature EOF while reading block of data. Expected 896000 but
>>>>>>>> got 0
>>>>>>>> >>>
>>>>>>>> >>> I just assumed that it was getting bad results so I didn't
>>>>>>>> check the
>>>>>>>> >>> serial
>>>>>>>> >>> output with the parallel output. In either case the code should
>>>>>>>> be
>>>>>>>> >>> changed
>>>>>>>> >>> before enabling it in serial so that it reads the files
>>>>>>>> correctly and
>>>>>>>> >>> doesn't produce any warning messages.
>>>>>>>> >>>
>>>>>>>> >>> Andy
>>>>>>>> >>>
>>>>>>>> >>> On Wed, Jul 11, 2012 at 12:04 PM, Sohail Shafii <
>>>>>>>> sohailshafii@yahoo.com>
>>>>>>>> >>> wrote:
>>>>>>>> >>>
>>>>>>>> >>> I'm not aware of any option to build/link against mpi-io.  This
>>>>>>>> is just a
>>>>>>>> >>> standard build with mpi support that suffers from this issue.
>>>>>>>> >>>
>>>>>>>> >>> The ParaView website's builds also have the same bug.
>>>>>>>> >>>
>>>>>>>> >>> ________________________________
>>>>>>>> >>> From: "Woodring, Jonathan L" <woodring@lanl.gov>
>>>>>>>> >>> To: Sohail Shafii <sohailshafii@yahoo.com>; Andy Bauer
>>>>>>>> >>> <andy.bauer@kitware.com>; Sebastien Jourdain
>>>>>>>> >>> <sebastien.jourdain@kitware.com>
>>>>>>>> >>> Cc: "migichen@gmail.com" <migichen@gmail.com>; "
>>>>>>>> paraview@paraview.org"
>>>>>>>> >>> <paraview@paraview.org>
>>>>>>>> >>> Sent: Tuesday, July 10, 2012 10:06 AM
>>>>>>>> >>>
>>>>>>>> >>> Subject: Re: [Paraview] ParaView thinks that it does not have a
>>>>>>>> wind
>>>>>>>> >>> blade
>>>>>>>> >>> reader
>>>>>>>> >>>
>>>>>>>> >>> I added the MPI calls to be in sync with what was being added
>>>>>>>> in the
>>>>>>>> >>> simulation.
>>>>>>>> >>>
>>>>>>>> >>> In the SuperComputing demo last year, we updated both the
>>>>>>>> HiGrad FireTec
>>>>>>>> >>> to
>>>>>>>> >>> use MPI-IO and likewise ParaView to do the same thing.
>>>>>>>> >>>
>>>>>>>> >>> It w
>>>>>>>> >>
>>>>>>>> >>
>>>>>>>> >>
>>>>>>>> >> --
>>>>>>>> >> David E DeMarle
>>>>>>>> >> Kitware, Inc.
>>>>>>>> >> R&D Engineer
>>>>>>>> >> 21 Corporate Drive
>>>>>>>> >> Clifton Park, NY 12065-8662
>>>>>>>> >> Phone: 518-881-4909
>>>>>>>> >>
>>>>>>>> >>
>>>>>>>> >
>>>>>>>> >
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

[Attachment #5 (text/html)]

Thanks for the files. I think the best place to put the reader files would be for \
VTK/IO/Geometry for vtkWindBladeReader and make a new directory ParallelMPI to put \
the vtkPWindBladeReader in. If you want to get this into VTK and ParaView faster I \
would suggest that you push your VTK branch to gerrit and then I can do a review. \
Otherwise it will probably have to wait 2 or 3 weeks before I can get to it. If you \
do push it to gerrit for review you can add me as a reviewer.<br> \
<br>Andy<br><br><div class="gmail_quote">On Fri, Aug 31, 2012 at 2:09 PM, Sohail \
Shafii <span dir="ltr">&lt;<a href="mailto:ssshafii@ucdavis.edu" \
target="_blank">ssshafii@ucdavis.edu</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Ok, attached is the newest Wind blade reader.  It makes no \
calls to MPI in the constructor; only in request data or functions related to the \
parallel version of wind blade reader.<br><br>I also have the change related to the \
vtkObjectFactory in there.  Like the vtkPNrrdReader, the object factory code is in \
the base (serial) class -- the parallel class just has the standard new macro. As  I \
said below, I think the problem with the gradient filter might be related with the \
gradient filter I&#39;m using (which is from the master repo from late July).<br>

<br>It reads in serial and parallel. If it works for your tests we&#39;ll have to \
modify the xml file so that it is enabled for serial.  There are also some commented \
(old) code sections; once you guys approve of the class I can delete the pieces of \
commented code.<br>

<br>In regards to locations of the classes: I have the vtkPWind* sitting in \
VTK/Parallel/MPI and vtkWind* files sitting in VTK/IO/Geometry.  I realize that the \
parallel version should be elsewhere; I just placed it in inside of VTK/Parallel/MPI \
for testing purposes.<br>

<br>For the parallel version, I added vtkPWindBladeReader.cxx to the corresponding \
CMakeLists.txt file (Module_SRCS section) in the VTK/Parallel/MPI directory.  I also \
added these lines to the file:<br># Now to generate our object factory.<br>

set( vtk_module_overrides<br>  WindBladeReader<br>  )<br><br>I did something similar \
for the vtkWindBladeReader for its corresponding CMakeLists.txt file in \
VTK/IO/Geometry but did not added any lines related to vtk_module_overrides.<div \
class="HOEnZb"> <div class="h5"><br>
<br><br><div class="gmail_quote">On Tue, Aug 28, 2012 at 12:42 PM, Sohail Shafii \
<span dir="ltr">&lt;<a href="mailto:ssshafii@ucdavis.edu" \
target="_blank">ssshafii@ucdavis.edu</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">

As far as the gradient filter is concerned: I pick the UVW array in the GUI.  It does \
compute a gradient, but only for one array -- &quot;A-Scale turbulence&quot; (all \
variables are loaded).  So picking a different array in the GUI doesn&#39;t seem to \
make a difference as it keeps computing gradient for that one input (point data) \
array.  That&#39;s why it can&#39;t compute vorticity or q-criterion because a-scale \
turbulence is a 1-component array.<br>


<br>Might be because I&#39;m using an older version of the repo from late \
July.<span><font color="#888888"><br><br>Sohail</font></span><div><div><br><br><div \
class="gmail_quote">On Tue, Aug 28, 2012 at 11:51 AM, Sohail Shafii <span \
dir="ltr">&lt;<a href="mailto:ssshafii@ucdavis.edu" \
target="_blank">ssshafii@ucdavis.edu</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Well I guess it&#39;s not a problem in the derived functions \
if I check to see if MPI is available; if not, call the superclass&#39;s version of \
the virtual function.<div>


<div><br><br><div class="gmail_quote">On Tue, Aug 28, 2012 at 11:32 AM, Sohail Shafii \
<span dir="ltr">&lt;<a href="mailto:ssshafii@ucdavis.edu" \
target="_blank">ssshafii@ucdavis.edu</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">MPI is only used if it&#39;s available. It tries to see if \
there is a MPIController available.  If not, then the number of ranks is 1, which \
means that the parallel class calls the super class&#39;s requestdata (super class is \
the serial wind blade reader).<br>




<br>However, the parallel class overrides certain functions to make use of MPI. So \
even the parallel instantiation will call the superclass&#39;s requestdata, the \
overriden functions that are called from that point on assume that MPI is \
available...this is a problem when the MPI controller is not available.<br>




<br>On another note, it appears that the rectilinear grid that I am reading (VTK \
file, structured points I think) is read by the vtkFileSeriesReader, which makes use \
of the vtkPDataSetReader class.  Strange that if I use vtkPDataSetReader myself in \
C++ code that uses VTK and not paraview, bounds/cell information is not generated. So \
I think that ParaView does something else besides using that reader...hmmm.<div>



<div><br>
<br><div class="gmail_quote">On Mon, Aug 27, 2012 at 7:32 PM, Andy Bauer <span \
dir="ltr">&lt;<a href="mailto:andy.bauer@kitware.com" \
target="_blank">andy.bauer@kitware.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><br><br><div class="gmail_quote"><div>On Mon, Aug 27, 2012 at \
6:53 PM, Sohail Shafii <span dir="ltr">&lt;<a href="mailto:ssshafii@ucdavis.edu" \
target="_blank">ssshafii@ucdavis.edu</a>&gt;</span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> I see...so if MPI is running then it will create a parallel \
version of the class. Otherwise, it will create the normal reader.  \
<br></blockquote></div><div><br>Technically, if ParaView is built with MPI enabled it \
will create the parallel version of the class every time whether or not the client, \
server, or python scripts are actually run with mpiexec, mpirun, or whatever is used \
to start the executable. So you can&#39;t rely on MPI being initialized and should \
not initialize it yourself in your class as that can cause problems as well. I think \
that&#39;s what you meant but wanted to be as clear as possible for the implications \
for the classes.<br>






 </div><div><div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>As far as the \
check goes for a multiprocess controller; while it does call the parent request data \
in the serial case, the inherited parallel class overrides some of the methods.  \
Which is a problem because it refers to its own file pointer in those methods (it \
uses MPI_File instead of a FILE*). Hmm.<span><font color="#888888"><br>







<br>Sohail</font></span><div><div><br><br><div class="gmail_quote">On Thu, Aug 23, \
2012 at 3:20 PM, Andy Bauer <span dir="ltr">&lt;<a \
href="mailto:andy.bauer@kitware.com" \
target="_blank">andy.bauer@kitware.com</a>&gt;</span> wrote:<br>






<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Hi Sohail,<br><br>Sorry for the slow reply but I wanted to \
make sure how things should work first and that took a bit to figure out. Anyways, \
this is closer to what&#39;s needed but the way it is supposed to work in VTK is that \
we use vtkObjectFactory to determine which one should be created when \
vtkWindBladeReader::New() is called. This is done at build time based on whether or \
not VTK is built with MPI. So if VTK and ParaView are built in parallel then there is \
code added that creates a vtkPWindBladeReader when vtkWindBladeReader::New() is \
called. This is regardless of whether or not the executable is run with mpi \
initialized or not. Because of this, the parallel version of the reader is \
responsible for checking whether mpi is initialized, ideally by doing \
vtkMultiProcessController::GetGlobalController()-&gt;IsA(&quot;vtkMPIController&quot;) \
is true, and if it isn&#39;t it should just call the parent class&#39;s methods for \
reading in the files. You may want to look at vtkPNrrdReader and the CMakeLists.txt \
file in that directory to see how they did things. Note though that if it&#39;s a \
single process running that it doesn&#39;t do any MPI calls even in the parallel \
version so your code will be slightly different than theirs.<br>








<br>As for other parts of the email below:<br><br>1) yes, please keep cc&#39;ing the \
list as there are some details in here that will be helpful to other people trying to \
implement their own parallel readers or filters<br>








<br>2) I&#39;m not sure what&#39;s going on with the gradient filter but am guessing \
that it has to do with the multiblock data set and that there probably isn&#39;t that \
same array in each block. But that&#39;s just a guess. Did you try extracting the \
&quot;air&quot; block and do the vorticity and/or q criterion computation on \
that?<br>








<br>3) vtkSMReaderFactory may be the class you&#39;re looking for to determine which \
reader is getting used. ParaViewReaders.xml has a list of readers that it will try to \
read in a file.<span><font color="#888888"><br> \
<br>Andy</font></span><div><div><br><br><div class="gmail_quote"> On Tue, Aug 21, \
2012 at 7:11 PM, Sohail Shafii <span dir="ltr">&lt;<a \
href="mailto:ssshafii@ucdavis.edu" \
target="_blank">ssshafii@ucdavis.edu</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">








<div><div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif">
<div><span>&lt;sent via another e-mail address; yahoo prevents me from uploading \
stuff because it&#39;s stupid&gt;<br><br>Here&#39;s  the first version.  Do you want \
me to keep ccing the list? Not sure if  that&#39;s necessary at this point because \
this is related to the  development of ParaView and not help.<br></span></div><div \
style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
 <span><br></span></div><div \
style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
 <span>I&#39;ve
 run it with an older version of the master, and it seems to read in a 
test .wind
 file just fine.  For now I had to store the vtkPWindBladeReader* files 
into VTK/Parallel/MPI since I don&#39;t have VTK/IO/MPIParallel module yet. 
 Now when I run the gradient filter after the field, the gradient filter
 thinks that the input array does not have the appropriate number of 
components for Q criterion or vorticity...but it should (UVW does have 
three components per tuple).  Might be my outdated copy of the git 
repo.  Haven&#39;t debugged that gradient code yet.<br></span></div><div \
style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
 <br><span></span></div><div \
style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
 <span><b>I
 was wondering
 if this is the type of code that you want?  Or should the classes be 
designed differently?</b>  Also, I have only run it parallel because if I 
try to instantiate it inside of the python shell in serial it tries to 
run RequestInformation (which assumes that the file path exists but does
 not).  It&#39;s a work-in-progress but it&#39;s a start.</span></div><div \
style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
 <br><span></span></div><div \
style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
 <span>A
 random question: if ParaView reads a file, where would I put a 
breakpoint that tells me which reader it ends up picking??  I have some 
separate VTK
 code that reads in a rectilinear grid, but does not generate 
cell/bounds information. ParaView does generate information about the 
bounds though.<br></span></div><div \
style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
 <br><span></span></div><div \
style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial,helvetica,sans-serif">
 <span>Sohail<br></span></div><div><br></div>  <div \
style="font-family:arial,helvetica,sans-serif;font-size:12pt">  <div \
style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div \
dir="ltr"> <font face="Arial"> <hr size="1">  <b><span \
style="font-weight:bold">From:</span></b> David E DeMarle &lt;<a \
href="mailto:dave.demarle@kitware.com" \
target="_blank">dave.demarle@kitware.com</a>&gt;<br>









 <b><span style="font-weight:bold">To:</span></b> Sohail Shafii &lt;<a \
href="mailto:sohailshafii@yahoo.com" target="_blank">sohailshafii@yahoo.com</a>&gt; \
<br><b><span style="font-weight:bold">Cc:</span></b>  Andy Bauer &lt;<a \
href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>&gt;; \
&quot;<a href="mailto:migichen@gmail.com" \
target="_blank">migichen@gmail.com</a>&quot;  &lt;<a href="mailto:migichen@gmail.com" \
target="_blank">migichen@gmail.com</a>&gt;; &quot;<a \
href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&quot;  \
&lt;<a href="mailto:paraview@paraview.org" \
target="_blank">paraview@paraview.org</a>&gt;; &quot;Woodring, Jonathan L&quot;  \
&lt;<a href="mailto:woodring@lanl.gov" target="_blank">woodring@lanl.gov</a>&gt; <br> \
<b><span style="font-weight:bold">Sent:</span></b> Friday, July 20, 2012 10:02 AM<br> \
<b><span style="font-weight:bold">Subject:</span></b> Re: [Paraview] ParaView thinks \
that it does not have a wind blade reader<br>









 </font> </div> <br>
Thanks.<br><br>In today&#39;s git master it now sits in \
VTK/IO/Parallel/vtkWindbladeReader.<br><br>The serial version should go in \
VTK/IO/Geometry.<br><br>The MPI version should go in a new module \
VTK/IO/MPIParallel.<br>









(VTK/IO/Parallel depends only on vtkSocketController now and should<br>not depend on \
vtkMPIController).<br><br>Finally when that is done we can remove the flag in \
paraview&#39;s xml<br>that prevents it from being used in serial.<br>









<br>David E DeMarle<br>Kitware, Inc.<br>R&amp;D Engineer<br>21 Corporate \
Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:518-881-4909" \
value="+15188814909" target="_blank">518-881-4909</a><br><br><br>On Thu, Jul 19, 2012 \
at 7:08 PM, Sohail Shafii &lt;<a rel="nofollow" href="mailto:sohailshafii@yahoo.com" \
target="_blank">sohailshafii@yahoo.com</a>&gt; wrote:<br>









&gt; Well it seems like #1 and #2 can be solved by writing a new parallel \
wind<br>&gt; blade reader class. I had similar experience by creating \
distributed<br>&gt; versions of class that I created in other  vtk directories. The \
normal wind<br>&gt; blade reader would have no parallel calls, which would address \
#1.<br>&gt;<br>&gt; What I find interesting is that in your directories, the wind \
blade reader<br>&gt; is located in VTK/IO/Parallel. For the ParaView snapshot that I \
downloaded,<br>









&gt; as well as the 3.14 source, it&#39;s still in VTK/Parallel.  No Parallel \
folder<br>&gt; in VTK/IO. Is this a recent change?<br>&gt;<br>&gt; So maybe the ideal \
folder layout would be:<br>&gt;<br>&gt; VTK/IO/WindBladeReader.*<br>









&gt;<br>&gt; VTK/IO/Parallel/DistributedWindBladeReader.*<br>&gt;<br>&gt; I can make \
changes to the WindBladeReader to remove the MPI-IO calls and<br>&gt; make a \
distributed wind blade reader class in case you want to add them to<br>









&gt; the repository. The one template I have for the parallel/serial split is \
the<br>&gt; vtkStreamTracer and its distributed counterparts so I can use those as \
a<br>&gt; guide.  If you have better  recommendations please let me \
know.<br>&gt;<br>&gt; Sohail<br>&gt;<br>&gt; ________________________________<br>&gt; \
From: David E DeMarle &lt;<a rel="nofollow" href="mailto:dave.demarle@kitware.com" \
target="_blank">dave.demarle@kitware.com</a>&gt;<br>









&gt; To: Sohail Shafii &lt;<a rel="nofollow" href="mailto:sohailshafii@yahoo.com" \
target="_blank">sohailshafii@yahoo.com</a>&gt;<br>&gt; Cc: Andy Bauer &lt;<a \
rel="nofollow" href="mailto:andy.bauer@kitware.com" \
target="_blank">andy.bauer@kitware.com</a>&gt;; &quot;<a rel="nofollow" \
href="mailto:migichen@gmail.com" target="_blank">migichen@gmail.com</a>&quot;<br>









&gt; &lt;<a rel="nofollow" href="mailto:migichen@gmail.com" \
target="_blank">migichen@gmail.com</a>&gt;; &quot;<a rel="nofollow" \
href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&quot; \
&lt;<a rel="nofollow" href="mailto:paraview@paraview.org" \
target="_blank">paraview@paraview.org</a>&gt;;<br>









&gt; &quot;Woodring, Jonathan L&quot; &lt;<a rel="nofollow" \
href="mailto:woodring@lanl.gov" target="_blank">woodring@lanl.gov</a>&gt;<br>&gt; \
Sent: Thursday, July 19, 2012 3:20 PM<br>&gt;<br>&gt; Subject: Re: [Paraview] \
ParaView thinks that it does not have a wind blade<br>









&gt; reader<br>&gt;<br>&gt; Two issues need to be fixed.<br>&gt; 1) that behavior in \
3.14 is there because of this fix which we had to<br>&gt; rush in just before the \
3.14 release.<br>&gt;<br>&gt; Committer: Utkarsh Ayachit &lt;<a rel="nofollow" \
href="mailto:utkarsh.ayachit@kitware.com" \
target="_blank">utkarsh.ayachit@kitware.com</a>&gt;  2012-02-08<br>









&gt; 17:12:18<br>&gt; Parent: e401d569f6e54c49c3497852463f6b13a01da8b6 (Update \
version after<br>&gt; 3.14.0-RC1 tag.)<br>&gt; Child:  \
99fdb1aeb5997c29b43393f45a478c4b53a23109 (Merge topic<br>&gt; \
&#39;fix_windblade_segfault&#39;)<br>









&gt; Branches: many
 (31)<br>&gt; Follows: v3.14.0-RC1<br>&gt; Precedes: v3.14.0-RC2<br>&gt;<br>&gt;     \
Fix segfault with ParaView built with MPI when opening *.vtr files.<br>&gt;<br>&gt;   \
The problem was that vtkWindBlade reader was getting created to test<br>









&gt;     &quot;CanReadFile&quot; and that would cause segfault unless MPI was \
initialized.<br>&gt;<br>&gt;     Solved the problem by added support to \
vtkSMReaderFactory to respect the<br>&gt;     ProcessSupport flag on SourceProxy and \
change windblade reader XML<br>









&gt; to say that<br>&gt;     it only works in parallel.<br>&gt;<br>&gt; In other \
words, Windblade reader&#39;s Constructor should not take it upon<br>&gt; itself to \
initialize MPI.<br>&gt;<br>&gt; Once that is fixed, we get to issue 2 before paraview \
4.0<br>









&gt;<br>&gt; 2) VTK&#39;s new modularization has the rule that no module can \
behave<br>&gt; differently with parallel (or most other cmake config options)  \
turned<br>&gt; configured on or off. This is so because it makes it very hard \
to<br>&gt; package VTK when the libs behave differently in different \
situations.<br>&gt;<br>&gt; Ie, we can&#39;t have any more<br>&gt; #ifdef \
VTK_USE_MPI<br>









&gt; do something<br>&gt; #else<br>&gt; do something different<br>&gt; #endif<br>&gt; \
in VTK classes.<br>&gt;<br>&gt; Now if we want a class to behave differently when MPI \
is turned on or<br>&gt; off we have to make a serial only version in a non MPI \
dependent<br>









&gt; module and a subclass of that in an MPI dependent module.<br>&gt;<br>&gt; David \
E DeMarle<br>&gt; Kitware, Inc.<br>&gt; R&amp;D Engineer<br>&gt; 21 Corporate \
Drive<br>&gt; Clifton Park, NY 12065-8662<br>&gt; Phone: <a href="tel:518-881-4909" \
value="+15188814909" target="_blank">518-881-4909</a><br>









&gt;<br>&gt;<br>&gt; On Thu, Jul 19, 2012 at 3:52 PM, Sohail Shafii &lt;<a \
rel="nofollow" href="mailto:sohailshafii@yahoo.com" \
target="_blank">sohailshafii@yahoo.com</a>&gt;<br>&gt; wrote:<br>&gt;&gt; When \
running serially,  vtkSMReaderFactory::CanReadFile sees that the<br>&gt;&gt; \
session<br>&gt;&gt; has a single process.  As such, on line 660 it realizes that the \
source<br>&gt;&gt; proxy&#39;s process support (in this case the source is a \
vtkWindBladeReader<br>









&gt;&gt; proxy) is multiple processes, which causes a return of &quot;false&quot; \
from that<br>&gt;&gt; function.  This makes ParaView think that the wind blade reader \
can&#39;t read<br>&gt;&gt; a<br>&gt;&gt; .wind file in serial.  According to Andy, \
the reader works find in<br>









&gt;&gt; parallel.<br>&gt;&gt;<br>&gt;&gt; I assume that a fix for this is pretty \
trivial? It never did this before<br>&gt;&gt; in<br>&gt;&gt; previous versions of \
ParaView and I think that the wind blade reader code<br>








&gt;&gt; has remained mostly the same. Andy mentioned some details in person when<br>
&gt;&gt; he<br>&gt;&gt; was talking with Jon but at that time I didn&#39;t know as \
much as I do now.<br>&gt;&gt; There is a mention below about  enabling the filter in \
serial and parallel<br>&gt;&gt; --<br>&gt;&gt; is this done in a xml \
file?<br>&gt;&gt;<br>&gt;&gt; Sohail<br>&gt;&gt;<br>&gt;&gt; \
________________________________<br>&gt;&gt; From: David E DeMarle &lt;<a \
rel="nofollow" href="mailto:dave.demarle@kitware.com" \
target="_blank">dave.demarle@kitware.com</a>&gt;<br>









&gt;&gt; To: Sohail Shafii &lt;<a rel="nofollow" href="mailto:sohailshafii@yahoo.com" \
target="_blank">sohailshafii@yahoo.com</a>&gt;<br>&gt;&gt; Cc: Andy Bauer &lt;<a \
rel="nofollow" href="mailto:andy.bauer@kitware.com" \
target="_blank">andy.bauer@kitware.com</a>&gt;; &quot;<a rel="nofollow" \
href="mailto:migichen@gmail.com" target="_blank">migichen@gmail.com</a>&quot;<br>









&gt;&gt; &lt;<a rel="nofollow" href="mailto:migichen@gmail.com" \
target="_blank">migichen@gmail.com</a>&gt;; &quot;<a rel="nofollow" \
href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&quot; \
&lt;<a rel="nofollow" href="mailto:paraview@paraview.org" \
target="_blank">paraview@paraview.org</a>&gt;;<br>









&gt;&gt; &quot;Woodring, Jonathan L&quot; &lt;<a rel="nofollow" \
href="mailto:woodring@lanl.gov" target="_blank">woodring@lanl.gov</a>&gt;<br>&gt;&gt; \
Sent: Tuesday, July 17, 2012 7:00 PM<br>&gt;&gt;<br>&gt;&gt; Subject: Re: [Paraview] \
ParaView thinks that it does not have a wind blade<br>









&gt;&gt; reader<br>&gt;&gt;<br>&gt;&gt; Each file that has an association with that \
file extension, made via the<br>&gt;&gt; XML, has its CanReadFile method called. Put \
a breakpoint there to<br>&gt;&gt; determine<br>&gt;&gt; if ParaView even knows about \
that reader.<br>









&gt;&gt;<br>&gt;&gt; On Tuesday, July 17, 2012, Sohail Shafii \
wrote:<br>&gt;&gt;<br>&gt;&gt; Sorry, but I meant to ask a different question.  \
Here&#39;s what Andy said<br>&gt;&gt; before, which relates to my concern:<br>








&gt;&gt; &quot;&gt;<br>
&gt;&gt;&gt; I went through the code and it jogged my memory about
 previous problems<br>&gt;&gt;&gt; with<br>&gt;&gt;&gt; it. It had an explicit MPI \
call in the constructor that would cause<br>&gt;&gt;&gt; problems<br>&gt;&gt;&gt; \
when paraview wasn&#39;t getting built with MPI. Any time a user tried to<br>









&gt;&gt;&gt; open<br>&gt;&gt;&gt; an unknown file it would try to create a windblade \
reader to see if the<br>&gt;&gt;&gt; reader could handle the file and this would \
cause a crash. If you launch<br>&gt;&gt;&gt; a<br>&gt;&gt;&gt; separate pvserver the \
wind blade reader will be available in the gui.&quot;<br>









&gt;&gt;<br>&gt;&gt; What I meant was; which ParaView class &quot;creates&quot; or \
&quot;tests&quot; a reader to<br>&gt;&gt; see<br>&gt;&gt; if it can handle a file? \
The test code you specified has a predefined data<br>&gt;&gt; set that is loaded in, \
and I think is more of an example to your average<br>









&gt;&gt; user. Correct me if I&#39;m wrong.<br>&gt;&gt;<br>&gt;&gt; So basically \
ParaView will recognize the file extension, tries to load  it,<br>&gt;&gt; crashes \
somewhere, then asks you specify the data format from a dialog.<br>&gt;&gt; \
I&#39;m<br>&gt;&gt; trying to figure out where it crashes so that I can see how that \
relates<br>&gt;&gt; to<br>&gt;&gt; the wind blade reader class and any MPI calls that \
are in there.<br>









&gt;&gt;<br>&gt;&gt; Sohail<br>&gt;&gt;<br>&gt;&gt; Subject: Re: [Paraview] ParaView \
thinks that it does not have a wind blade<br>&gt;&gt; reader<br>&gt;&gt;<br>&gt;&gt; \
kargad:ParaView demarle$ find . -name &quot;*WindBlade*&quot; -print<br>









&gt;&gt; ---&gt; ./VTK/IO/Parallel/Testing/Cxx/TestWindBladeReader.cxx<br>&gt;&gt; \
./VTK/IO/Parallel/vtkWindBladeReader.cxx<br>&gt;&gt; \
./VTK/IO/Parallel/vtkWindBladeReader.h<br>&gt;&gt;<br>&gt;&gt; David E \
DeMarle<br>&gt;&gt; Kitware, Inc.<br>









&gt;&gt; R&amp;D Engineer<br>&gt;&gt; 21 Corporate Drive<br>&gt;&gt; Clifton Park, NY \
12065-8662<br>&gt;&gt; Phone: <a href="tel:518-881-4909" value="+15188814909" \
target="_blank">518-881-4909</a><br>&gt;&gt;<br>&gt;&gt;<br>








&gt;&gt; On Tue, Jul 17, 2012 at 2:09 PM, Sohail
 Shafii &lt;<a rel="nofollow" href="mailto:sohailshafii@yahoo.com" \
target="_blank">sohailshafii@yahoo.com</a>&gt;<br>&gt;&gt; wrote:<br>&gt;&gt;&gt; \
What is the class that is responsible for testing to reader to see if it<br>









&gt;&gt;&gt; can<br>&gt;&gt;&gt; open the .wind file?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; \
Sohail<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; \
________________________________<br>&gt;&gt;&gt; From: Andy Bauer &lt;<a \
rel="nofollow" href="mailto:andy.bauer@kitware.com" \
target="_blank">andy.bauer@kitware.com</a>&gt;<br>









&gt;&gt;&gt; To: Sohail Shafii &lt;<a rel="nofollow" \
href="mailto:sohailshafii@yahoo.com" \
target="_blank">sohailshafii@yahoo.com</a>&gt;<br>&gt;&gt;&gt; Cc: &quot;Woodring, \
Jonathan L&quot; &lt;<a rel="nofollow" href="mailto:woodring@lanl.gov" \
target="_blank">woodring@lanl.gov</a>&gt;; Sebastien Jourdain<br>









&gt;&gt;&gt; &lt;<a rel="nofollow" href="mailto:sebastien.jourdain@kitware.com" \
target="_blank">sebastien.jourdain@kitware.com</a>&gt;; &quot;<a rel="nofollow" \
href="mailto:migichen@gmail.com" target="_blank">migichen@gmail.com</a>&quot;<br>









&gt;&gt;&gt; &lt;<a rel="nofollow" href="mailto:migichen@gmail.com" \
target="_blank">migichen@gmail.com</a>&gt;;<br>&gt;&gt;&gt; &quot;<a rel="nofollow" \
href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&quot; \
&lt;<a rel="nofollow" href="mailto:paraview@paraview.org" \
target="_blank">paraview@paraview.org</a>&gt;<br>









&gt;&gt;&gt; Sent: Wednesday, July 11, 2012 10:53 AM<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; \
Subject: Re: [Paraview] ParaView thinks that it does not have a wind<br>&gt;&gt;&gt; \
blade<br>&gt;&gt;&gt; reader<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; I was reluctant to \
enable the reader in serial (i.e. not using MPI IO<br>









&gt;&gt;&gt; which<br>&gt;&gt;&gt; I think is getting done by default with the \
parallel build) because of<br>&gt;&gt;&gt;  the<br>&gt;&gt;&gt; following warnings \
that I got:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Warning: In \
/home/acbauer/CODE/ParaView/<br>&gt;&gt;&gt; \
ParaView/VTK/IO/Parallel/vtkWindBladeReader.cxx, line 942<br>&gt;&gt;&gt; \
vtkWindBladeReader (0x3a0c800): WindBladeReader error reading file:<br>









&gt;&gt;&gt; /home/acbauer/DATA/VTKLargeData/Data/WindBladeReader/test1_topo.wind<br>&gt;&gt;&gt; \
Premature EOF while reading block of data. Expected 896000 but got \
0<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; I just assumed that it was getting bad results so I \
didn&#39;t check the<br>









&gt;&gt;&gt; serial<br>&gt;&gt;&gt; output with the parallel output. In either case \
the code should be<br>&gt;&gt;&gt; changed<br>&gt;&gt;&gt; before enabling it in \
serial so that it reads the files correctly and<br>&gt;&gt;&gt; doesn&#39;t produce \
any warning messages.<br>









&gt;&gt;&gt;<br>&gt;&gt;&gt; Andy<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; On Wed, Jul 11, \
2012 at 12:04 PM, Sohail Shafii &lt;<a rel="nofollow" \
href="mailto:sohailshafii@yahoo.com" \
target="_blank">sohailshafii@yahoo.com</a>&gt;<br>









&gt;&gt;&gt; wrote:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; I&#39;m not aware of any option \
to build/link against mpi-io.  This is just a<br>&gt;&gt;&gt; standard build with mpi \
support that suffers from this issue.<br>&gt;&gt;&gt;<br>









&gt;&gt;&gt; The ParaView website&#39;s builds also have the same \
bug.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; ________________________________<br>&gt;&gt;&gt; \
From: &quot;Woodring, Jonathan L&quot; &lt;<a rel="nofollow" \
href="mailto:woodring@lanl.gov" target="_blank">woodring@lanl.gov</a>&gt;<br>









&gt;&gt;&gt; To: Sohail Shafii &lt;<a rel="nofollow" \
href="mailto:sohailshafii@yahoo.com" target="_blank">sohailshafii@yahoo.com</a>&gt;; \
Andy Bauer<br>&gt;&gt;&gt; &lt;<a rel="nofollow" href="mailto:andy.bauer@kitware.com" \
target="_blank">andy.bauer@kitware.com</a>&gt;; Sebastien Jourdain<br>









&gt;&gt;&gt; &lt;<a rel="nofollow" href="mailto:sebastien.jourdain@kitware.com" \
target="_blank">sebastien.jourdain@kitware.com</a>&gt;<br>&gt;&gt;&gt; Cc: &quot;<a \
rel="nofollow" href="mailto:migichen@gmail.com" \
target="_blank">migichen@gmail.com</a>&quot; &lt;<a rel="nofollow" \
href="mailto:migichen@gmail.com" target="_blank">migichen@gmail.com</a>&gt;; &quot;<a \
rel="nofollow" href="mailto:paraview@paraview.org" \
target="_blank">paraview@paraview.org</a>&quot;<br>









&gt;&gt;&gt; &lt;<a rel="nofollow" href="mailto:paraview@paraview.org" \
target="_blank">paraview@paraview.org</a>&gt;<br>&gt;&gt;&gt; Sent: Tuesday, July 10, \
2012 10:06 AM<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Subject: Re: [Paraview] ParaView thinks \
that it does not have a wind<br>









&gt;&gt;&gt; blade<br>&gt;&gt;&gt; reader<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; I added the \
MPI calls to be in sync with what was being added in the<br>&gt;&gt;&gt; \
simulation.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; In the  SuperComputing demo last year, we \
updated both the HiGrad FireTec<br>&gt;&gt;&gt; to<br>&gt;&gt;&gt; use MPI-IO and \
likewise ParaView to do the same thing.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; It \
w<br>&gt;&gt;<br>&gt;&gt;<span><font color="#888888"><br>









&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; David E DeMarle<br>&gt;&gt; Kitware, \
Inc.<br>&gt;&gt; R&amp;D Engineer<br>&gt;&gt; 21 Corporate Drive<br>&gt;&gt; Clifton \
Park, NY 12065-8662<br>&gt;&gt; Phone: <a href="tel:518-881-4909" \
value="+15188814909" target="_blank">518-881-4909</a><br>








&gt;&gt;<br>
&gt;&gt;<br>&gt;<br>&gt;<br><br><br> </font></span></div> </div>  </div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>



_______________________________________________
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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic