[Paraview] problem with parallel filter, segfault after last process returns
Moreland, Kenneth
kmorel at sandia.gov
Mon Nov 9 12:36:30 EST 2009
Christine,
I'm glad you figured that out. This is probably unrelated, but I noticed in your original post that you said the Controller was initialized with
this->SetController(vtkMultiProcessController::GetGlobalController());
This is mostly correct, but you need to make sure that you first set the Controller ivar to NULL in your constructor so that the SetController method understands that there is nothing set currently and that it does not attempt to unreference a non-existent controller.
this->Controller = NULL;
this->SetController(vtkMultiProcessController::GetGlobalController());
-Ken
On 11/6/09 3:53 PM, "Christine Corbett Moran" <corbett at physik.uzh.ch> wrote:
Berk, Burlen,
Yes this was exactly what was happening. I had allocated too small of
a buffer to receive a piece of data, which corrupted memory and was
only a problem on returning the function. Doh!; I was looking for
bigger issues when it was basic.
Cheers,
Christine
On Fri, Nov 6, 2009 at 10:35 PM, Berk Geveci <berk.geveci at kitware.com> wrote:
> This makes me think that something is writing beyond the bounds of an
> array corrupting memory. Any chance you can run this within valgrind?
>
> On Fri, Nov 6, 2009 at 12:34 PM, Christine Corbett Moran
> <corbett at physik.uzh.ch> wrote:
>> Hi,
>>
>> I'm converting my serial filters to work in parallel. In this process,
>> I'm run into trouble at the very last stage, after verifying that at
>> every stage, on every processor, that correct data was being
>> sent/received, and that the final output was identical to the
>> algorithm as run in serial.
>>
>> The entire method runs as planned, but immediately after returning
>> from the RequestData method on processes 0 (the last one to return as
>> I have process 0 receiving data sent by other processes, and perform a
>> final computation). I get a segfault:
>> "*** Process received signal ***
>> Signal: Segmentation fault (11)
>> Signal code: (128)
>> Failing at address: (nil)"
>>
>> I initially thought this had something to do with the way I am using
>> the output vector. So as a test, I simply copy the input to the output
>> before doing all my computations taking into account the controller,
>> check these computations at every step, but actually ignore their
>> output in the end
>>
>> pseudocode for my test
>> RequstData:
>> 1. copy input to output
>> 2. if there's a controller specified and number of processors>1,
>> perform parallel computation using controller, otherwise perform
>> serial computation. I don't actually store the result
>> 3. Return
>>
>> The segfault is not present on returning if I comment out all code in
>> step 2, or if the algorithm is run in serial. I know the segfault
>> happens after RequestData returns on process Since in this test case,
>> all computations in 2. are local with no results written to output, I
>> am not sure what is going on. Do I need to do something special to
>> "shutdown" the controller? My destructor uses
>> vtkCxxSetObjectMacro(vtkCenterOfMassFilter,Controller,
>> vtkMultiProcessController);
>> via
>> this->SetController(0);
>> but the segfault is still present if I comment this out. My controller
>> was set in the constructor via
>> this->SetController(vtkMultiProcessController::GetGlobalController());
>>
>> Christine
>> _______________________________________________
>> 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
**** Kenneth Moreland
*** Sandia National Laboratories
***********
*** *** *** email: kmorel at sandia.gov
** *** ** phone: (505) 844-8919
*** web: http://www.cs.unm.edu/~kmorel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20091109/9e37c387/attachment.htm>
More information about the ParaView
mailing list