← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/trunk] Rev 7592: Misc format fixes and compile fixes for TAO interface.

 

That patch does not compile...

/home/hake/bzr/fenics/dolfin/work-trunk/dolfin/nls/TAOLinearBoundSolver.cpp:166:15:
error: base operand of ‘->’ has non-pointer type ‘const
dolfin::PETScBaseMatrix’
/home/hake/bzr/fenics/dolfin/work-trunk/dolfin/nls/TAOLinearBoundSolver.cpp:166:29:
error: base operand of ‘->’ has non-pointer type ‘const
dolfin::PETScBaseMatrix’
/home/hake/bzr/fenics/dolfin/work-trunk/dolfin/nls/TAOLinearBoundSolver.cpp:167:15:
error: base operand of ‘->’ has non-pointer type ‘const
dolfin::PETScBaseMatrix’
/home/hake/bzr/fenics/dolfin/work-trunk/dolfin/nls/TAOLinearBoundSolver.cpp:167:29:
error: base operand of ‘->’ has non-pointer type ‘const dolfin::PETScVector’
/home/hake/bzr/fenics/dolfin/work-trunk/dolfin/nls/TAOLinearBoundSolver.cpp:168:16:
error: base operand of ‘->’ has non-pointer type ‘const dolfin::PETScVector’
/home/hake/bzr/fenics/dolfin/work-trunk/dolfin/nls/TAOLinearBoundSolver.cpp:168:31:
error: base operand of ‘->’ has non-pointer type ‘const dolfin::PETScVector’
/home/hake/bzr/fenics/dolfin/work-trunk/dolfin/nls/TAOLinearBoundSolver.cpp:169:16:
error: base operand of ‘->’ has non-pointer type ‘const dolfin::PETScVector’
/home/hake/bzr/fenics/dolfin/work-trunk/dolfin/nls/TAOLinearBoundSolver.cpp:169:30:
error: base operand of ‘->’ has non-pointer type ‘const dolfin::PETScVector’
make[2]: ***
[dolfin/CMakeFiles/dolfin.dir/nls/TAOLinearBoundSolver.cpp.o] Error 1
make[1]: *** [dolfin/CMakeFiles/dolfin.dir/all] Error 2

Johan

On 04/04/2013 12:37 PM, Corrado Maurini wrote:
> I cannot reproduce the problem neither on a fresh installed version of dolfin on quantal using gcc4.7 and boost 1.51 or 1.49.
> 
> Not being able to test is difficult to fix. I tried to generally cleanup the code. May you try with the attached patch? 
> 
> Best,
> 
> Corrado
> 
> 
> 
> 
> 
> 
> Le 2 avr. 2013 à 13:26, Johan Hake a écrit :
> 
>> On 04/02/2013 12:06 PM, Corrado Maurini wrote:
>>> I confirm that trunk is working for me on gcc 4.2 (macosx lion) and 4.4 (rhel). 
>>> Unitest and example work fine for me, without any error message, both with TAO installed or not. 
>>>
>>> I need to install a quantal distribution to test on gcc 4.7. I need some more time for this. Not sure to be able to do it before thursday, but I will try.
>>
>> That is probably fine. Not many have TAO installed and I do not think we
>> have it on the buildbot yet.
>>
>>> Thanks for fixinfg the tab, I should change my test editor ... 
>>
>> :)
>>
>>> For the assertion in the unittest do you refer to this? 
>>> self.assertAlmostEqual(assemble(F), Ly, 5)
>>> or 
>>> try:
>>>  parameters["linear_algebra_backend"] = "PETSc"
>>> except RuntimeError:
>>>  import sys; sys.exit(0)
>>>
>>> The first is taken form KrylovSolver unittest, the second from PETScSnesSolver.
>>
>> The assertion that fail is in shared_ptr. It looks like the call to
>> b->vec() at line 173 in TAOLinearBoundSolver.cpp triggers it.
>>
>> Here is the backtrace:
>>
>> #0  0x00007ffff6f1a425 in __GI_raise (sig=<optimized out>) at
>> ../nptl/sysdeps/unix/sysv/linux/raise.c:64
>> #1  0x00007ffff6f1db8b in __GI_abort () at abort.c:91
>> #2  0x00007ffff6f130ee in __assert_fail_base (fmt=<optimized out>,
>> assertion=0x7fffeb9da24f "px != 0", file=
>>    0x7fffebaa14a0
>> "/home/hake/local/include/boost/smart_ptr/shared_ptr.hpp",
>> line=<optimized out>, function=<optimized out>) at assert.c:94
>> #3  0x00007ffff6f13192 in __GI___assert_fail (assertion=0x7fffeb9da24f
>> "px != 0", file=0x7fffebaa14a0
>> "/home/hake/local/include/boost/smart_ptr/shared_ptr.hpp", line=424,
>>    function=
>>    0x7fffebaa1a60
>> <_ZZNK5boost10shared_ptrIKN6dolfin11PETScMatrixEEptEvE19__PRETTY_FUNCTION__>
>> "T* boost::shared_ptr<T>::operator->() const [with T = const
>> dolfin::PETScMatrix]") at assert.c:103
>> #4  0x00007fffeb425aae in boost::shared_ptr<dolfin::PETScMatrix
>> const>::operator-> (this=<optimized out>) at
>> /home/hake/local/include/boost/smart_ptr/shared_ptr.hpp:424
>> #5  0x00007fffeb424995 in _M_dispose (__a=..., this=<optimized out>) at
>> /usr/include/c++/4.7/bits/basic_string.h:246
>> #6  ~basic_string (this=<optimized out>, __in_chrg=<optimized out>) at
>> /usr/include/c++/4.7/bits/basic_string.h:536
>> #7  dolfin::TAOLinearBoundSolver::solve (this=this@entry=0x1e13890,
>> A1=..., x=..., b1=..., xl=..., xu=...)
>>    at
>> /home/hake/bzr/fenics/dolfin/work-trunk/dolfin/nls/TAOLinearBoundSolver.cpp:173
>> #8  0x00007fffeb425055 in dolfin::TAOLinearBoundSolver::solve
>> (this=0x1e13890, A1=..., x=..., b1=..., xl=..., xu=...)
>>    at
>> /home/hake/bzr/fenics/dolfin/work-trunk/dolfin/nls/TAOLinearBoundSolver.cpp:157
>>
>> J
>>
>>
>>> Corrado
>>>
>>> Le 2 avr. 2013 à 11:03, Johan Hake a écrit :
>>>
>>>> I gcc 4.7. I think recent gcc is more strict on things like missing
>>>> return statements.
>>>>
>>>> Johan
>>>>
>>>> On 04/02/2013 10:47 AM, Corrado Maurini wrote:
>>>>> I am having a look. It was working for me ... on macosx, and rhel5
>>>>>
>>>>> Le 2 avr. 2013 à 09:06, Johan Hake a écrit :
>>>>>
>>>>>> On 04/02/2013 09:03 AM, noreply@xxxxxxxxxxxxx
>>>>>> <mailto:noreply@xxxxxxxxxxxxx> wrote:
>>>>>>> ------------------------------------------------------------
>>>>>>> revno: 7592
>>>>>>> committer: Johan Hake <hake.dev@xxxxxxxxx <mailto:hake.dev@xxxxxxxxx>>
>>>>>>> branch nick: work-trunk
>>>>>>> timestamp: Tue 2013-04-02 08:57:33 +0200
>>>>>>> message:
>>>>>>> Misc format fixes and compile fixes for TAO interface.
>>>>>>>  -- The TAO unittest throws an assertion need to be fixed.
>>>>>>>  -- I have used TAO version 1.2
>>>>>>
>>>>>> That should be TAO 2.1.
>>>>>>
>>>>>> Johan
>>>>>>
>>>>>>> modified:
>>>>>>> dolfin/nls/TAOLinearBoundSolver.cpp
>>>>>>> dolfin/nls/TAOLinearBoundSolver.h
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> lp:dolfin
>>>>>>> https://code.launchpad.net/~dolfin-core/dolfin/trunk
>>>>>>>
>>>>>>> Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
>>>>>>> To unsubscribe from this branch go to
>>>>>>> https://code.launchpad.net/~dolfin-core/dolfin/trunk/+edit-subscription
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~dolfin
>>>>>> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
>>>>>> <mailto:dolfin@xxxxxxxxxxxxxxxxxxx>
>>>>>> Unsubscribe : https://launchpad.net/~dolfin
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>
>>>>
>>>
>>
> 



References