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.<br>
<br>Andy<br><br><div class="gmail_quote">On Sat, Nov 12, 2011 at 3:57 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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>
<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>From: pat marion <<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>><br>
<div class="im">Subject: Re: [Paraview] PV 3.12.0 coprocessing problem when using multiple filters<br>
</div>Date: Fri, 11 Nov 2011 20:08:54 -0500<br>
<div><div></div><div class="h5"><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 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>> 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. 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 works<br>
>>> > > fine.<br>
>>> > ><br>
>>> > > However if I create a pipeline with two or more filters my simulation<br>
>>> > > code issues an error from the coprocessing library (the error 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>
>>> "/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>
>>> "/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>
>>> "/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>
>>> "/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." % 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 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 <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div></div></blockquote></div><br>