[Paraview] PV 3.12.0 coprocessing problem when using multiple filters
Andy Bauer
andy.bauer at kitware.com
Tue Dec 20 15:45:10 EST 2011
Hi Takuya,
This issue has been fixed. We did a slightly different fix than yours so
that we could avoid the MPI communication. The commit SHA is
135ed11151e547ff54fbb373d686898e40cc3dec.
Thanks for the bug report.
Andy
On Tue, Dec 6, 2011 at 4:05 PM, Andy Bauer <andy.bauer at kitware.com> wrote:
> Hi Takuya,
>
> Sorry for the slow response but I finally did verify this problem. Your
> change also fixes it. I'm not that familiar with vtkPVSessionCore so I'll
> need to talk to some other people to make sure that it's the proper fix and
> if not, what is the proper fix. I'll email again when it's been fixed.
>
> Thanks,
> Andy
>
>
> On Mon, Nov 14, 2011 at 9:32 AM, Takuya OSHIMA <oshima at eng.niigata-u.ac.jp
> > wrote:
>
>> Hi Andy,
>>
>> I may be wrong but I have a feeling that the collected data
>> information in process 0 should be redistributed to other processes
>> since adding a print statement for
>> Slice1.GetDataInformation().GetNumberOfPoints() prints for each
>> process the number of points expected from the hierarchical collection
>> mechanism of vtkPVSessionCore::CollectInformation().
>>
>> I am not sure if this is the right place and thing but if I add the
>> following code to vtkPVSessionCore::CollectInformation() the slice
>> filter works exactly as you stated ("it just needs to go through one
>> of the process's grid domain such that the global number of points and
>> cells is greater than 0").
>>
>> Takuya OSHIMA, Ph.D.
>> Faculty of Engineering, Niigata University
>> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>>
>> ---
>> ParaView-3.12.0/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx
>> 2011-11-09 05:56:18.000000000 +0900
>> +++
>> ParaView-3.12.0.new/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx
>> 2011-11-14 23:17:32.000000000 +0900
>> @@ -825,6 +825,33 @@
>> controller->Send(&len, 1, parent, ROOT_SATELLITE_INFO_TAG);
>> }
>> }
>> +
>> + if (this->SymmetricMPIMode)
>> + {
>> + if (myid == 0)
>> + {
>> + vtkClientServerStream css;
>> + info->CopyToStream(&css);
>> + const unsigned char* data;
>> + size_t length;
>> + css.GetData(&data, &length);
>> + int len = static_cast<int>(length);
>> + controller->Broadcast(&len, 1, 0);
>> + controller->Broadcast(const_cast<unsigned char *>(data), len, 0);
>> + }
>> + else
>> + {
>> + int len;
>> + controller->Broadcast(&len, 1, 0);
>> + unsigned char *data = new unsigned char[len];
>> + controller->Broadcast(data, len, 0);
>> + vtkClientServerStream stream;
>> + stream.SetData(data, len);
>> + info->CopyFromStream(&stream);
>> + delete [] data;
>> + }
>> + }
>> +
>> return true;
>> }
>>
>> //----------------------------------------------------------------------------
>>
>> From: Andy Bauer <andy.bauer at kitware.com>
>> Subject: Re: [Paraview] PV 3.12.0 coprocessing problem when using
>> multiple filters
>> Date: Sun, 13 Nov 2011 14:18:14 -0500
>>
>> > I hope that's not the case that the slice has to go through each
>> process's
>> > grid domain. I think it just needs to go through one of the process's
>> grid
>> > domain such that the global number of points and cells is greater than
>> 0.
>> > I will check on this though.
>> >
>> > Andy
>> >
>> > On Sat, Nov 12, 2011 at 3:57 AM, Takuya OSHIMA
>> > <oshima at eng.niigata-u.ac.jp>wrote:
>> >
>> >> Thanks for all the input guys. Indeed Pat's tip did the trick, in my
>> case:
>> >>
>> >> if Slice1.GetDataInformation().GetNumberOfPoints():
>> >> DataRepresentation2.ColorArrayName = 'p'
>> >>
>> >> I am still new to coprocessing so I am not getting things right but
>> >> here is my deduction: I am running my simulation code in parallel with
>> >> 8 processes with one cell thickness of ghost layers. Slice1 does
>> >> intersect the domain, but not all of parallel decomposed
>> >> subdomains. Hence the error is issued for the processes that have no
>> >> slice data.
>> >>
>> >> Meanwhile I noticed that the slice in oneSlice.py just have happened
>> >> to locate exactly on interprocessor boundaries and intersected all of
>> >> parallel decomposed subdomains at the ghost layers. That explains why
>> >> the script worked without error.
>> >>
>> >> Takuya OSHIMA, Ph.D.
>> >> Faculty of Engineering, Niigata University
>> >> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>> >>
>> >> From: pat marion <pat.marion at kitware.com>
>> >> Subject: Re: [Paraview] PV 3.12.0 coprocessing problem when using
>> multiple
>> >> filters
>> >> Date: Fri, 11 Nov 2011 20:08:54 -0500
>> >>
>> >> > That's right, if the output has no point or cell data, then
>> assigning the
>> >> > ColorArrayName property will throw an exception. It's kind of an
>> >> annoying
>> >> > behavior. So I'll work around this by writing code such as:
>> >> >
>> >> > if mySlice.GetDataInformation().GetNumberOfPoints():
>> >> > rep.ColorArrayName='p'
>> >> >
>> >> >
>> >> > Pat
>> >> >
>> >> > On Fri, Nov 11, 2011 at 12:39 PM, Andy Bauer <andy.bauer at kitware.com
>> >
>> >> wrote:
>> >> >
>> >> >> Another thing to check is if there are any cells in the output from
>> the
>> >> >> second slice filter. In the ParaView GUI, i started with the
>> mandelbrot
>> >> >> source and then created a slice filter that didn't intersect the
>> domain.
>> >> >> After that there wasn't any point or cell data in the output.
>> >> >>
>> >> >> Andy
>> >> >>
>> >> >>
>> >> >> 2011/11/11 Takuya OSHIMA <oshima at eng.niigata-u.ac.jp>
>> >> >>
>> >> >>> I'm not in a place where I can test the line 323 modification right
>> >> >>> now but the cell array p is present. Please note that oneSlice.py
>> >> >>> which also colors by cell p works.
>> >> >>>
>> >> >>> Takuya OSHIMA, Ph.D.
>> >> >>> Faculty of Engineering, Niigata University
>> >> >>> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>> >> >>>
>> >> >>> From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
>> >> >>> Subject: Re: [Paraview] PV 3.12.0 coprocessing problem when using
>> >> >>> multiple filters
>> >> >>> Date: Fri, 11 Nov 2011 09:16:18 -0500
>> >> >>>
>> >> >>> > Is the array "p" not present when you're coprocessnig? Try
>> taking out
>> >> >>> > line 323 which sets the array "p" as the array to color with.
>> >> >>> >
>> >> >>> > Utkarsh
>> >> >>> >
>> >> >>> > On Fri, Nov 11, 2011 at 9:08 AM, Takuya OSHIMA
>> >> >>> > <oshima at eng.niigata-u.ac.jp> wrote:
>> >> >>> > > Hi,
>> >> >>> > >
>> >> >>> > > I am trying to explore the coprocessing capability of PV
>> 3.12.0.
>> >> When
>> >> >>> > > I create a pipeline with a single slice filter within the PV
>> GUI,
>> >> >>> > > export the Python state file by the coprocessing plugin and
>> run the
>> >> >>> > > script as the coprocessing pipleline in my simulation code, it
>> >> works
>> >> >>> > > fine.
>> >> >>> > >
>> >> >>> > > However if I create a pipeline with two or more filters my
>> >> simulation
>> >> >>> > > code issues an error from the coprocessing library (the error
>> >> message
>> >> >>> > > is for the case of two slice filters):
>> >> >>> > >
>> >> >>> > > Traceback (most recent call last):
>> >> >>> > > File "<string>", line 2, in <module>
>> >> >>> > > File "/Users/ohshima/shindoriTest/twoSlices.py", line 323, in
>> >> >>> DoCoProcessing
>> >> >>> > > DataRepresentation2.ColorArrayName = 'p'
>> >> >>> > > File
>> >> >>>
>> >>
>> "/Volumes/RAID0data/paraview/3.12/build/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py",
>> >> >>> line 212, in __setattr__
>> >> >>> > > setter(self, value)
>> >> >>> > > File
>> >> >>>
>> >>
>> "/Volumes/RAID0data/paraview/3.12/build/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py",
>> >> >>> line 2276, in setProperty
>> >> >>> > > return self.SetPropertyWithName(propName, value)
>> >> >>> > > File
>> >> >>>
>> >>
>> "/Volumes/RAID0data/paraview/3.12/build/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py",
>> >> >>> line 267, in SetPropertyWithName
>> >> >>> > > prop.SetData(arg)
>> >> >>> > > File
>> >> >>>
>> >>
>> "/Volumes/RAID0data/paraview/3.12/build/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py",
>> >> >>> line 695, in SetData
>> >> >>> > > raise ValueError("Could not locate array %s in the input." %
>> >> arr)
>> >> >>> > > ValueError: Could not locate array p in the input.
>> >> >>> > >
>> >> >>> > > The problem is same for Mac OS X 10.6 and RHEL 5.1 64bit. I
>> attach
>> >> the
>> >> >>> > > scripts oneSlice.py (which works) and twoSlices.py (which does
>> not
>> >> >>> > > work). Can anybody shed light on the problem?
>> >> >>> > >
>> >> >>> > > Takuya
>> >> >>> > >
>> >> >>> > > Takuya OSHIMA, Ph.D.
>> >> >>> > > Faculty of Engineering, Niigata University
>> >> >>> > > 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>> >> >>> > >
>> >> >>> > > _______________________________________________
>> >> >>> > > 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
>> >> >>> > >
>> >> >>> > >
>> >> >>> _______________________________________________
>> >> >>> 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
>> >> >>>
>> >> >>
>> >> >>
>> >> >> _______________________________________________
>> >> >> 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
>> >> >>
>> >> >>
>> >> _______________________________________________
>> >> 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/20111220/8e1fa94d/attachment.htm>
More information about the ParaView
mailing list