[petsc-users] possible error
Randall Mackie
rlmackie862 at gmail.com
Thu Mar 14 13:49:06 CDT 2013
Nachiket,
I've run into a similar situation before, where my code ran fine in debug mode, bombed out with segmentation violation
in optimize mode, and yet I couldn't find anything in valgrind. In my case, I eventually tracked it down to some variable
not being broadcast to all processors, and so that variable would often take some weird value on some processor.
I tracked it down by putting in a goto statement (that would go to the end of the code and PetscFinalize) early in my code,
and if it ran fine, then I'd move the goto statement down further in the code, and then keep moving it
until the program bombed, and this helped me track it down the issue. Also, if you run on just 1 processor do you see the same
behavior?
Randy M.
On Mar 14, 2013, at 11:39 AM, Nachiket Gokhale <gokhalen at gmail.com> wrote:
> On Thu, Mar 14, 2013 at 8:40 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>>
>> On Thu, Mar 14, 2013 at 7:35 AM, Nachiket Gokhale <gokhalen at gmail.com>
>> wrote:
>>>
>>> Let me see what I can do. I don't seem to get this error in debug
>>> mode; so I can't produce line numbers.
>>
>>
>> ./configure --with-debugging=0 COPTFLAGS='-O0 -g3' PETSC_ARCH=whatever-optg
>>
>> That'll make the stack trace useful.
>
> I compiled with --with-debugging=0 --COPTFLAGS='-O0 -g3'
> --CXXOPTFLAGS='-O0 -g3' and I do not get the error. Am I to infer
> that it is an error in the optimization levels? I am using gcc-4.4.5
> - perhaps I should try upgrading?
>
> -Nachiket
More information about the petsc-users
mailing list