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