[Insight-users] LBFGSOptimizer bug (?)

Tim Allman dr.tim.allman at gmail.com
Thu Mar 7 15:09:51 EST 2013


Are you sure that ITK builds with clang? My attempt fails like this.

celia:tim-[itk-build]: make
[  0%] Built target ITKData
[  0%] Building CXX object 
Modules/ThirdParty/KWSys/src/KWSys/CMakeFiles/itksys.dir/SystemTools.cxx.o
In file included from 
/Users/tim/devel/InsightToolkit-4.3/Modules/ThirdParty/KWSys/src/KWSys/SystemTools.cxx:26:
/Users/tim/devel/itk-build/Modules/ThirdParty/KWSys/src/itksys/ios/sstream:176:29: 
error: cannot initialize a parameter of type
       'iostate' (aka 'std::_Ios_Iostate') with an lvalue of type 'int'
     this->IStrStream::clear(flags);
                             ^~~~~
/usr/include/c++/4.2.1/bits/basic_ios.h:133:21: note: passing argument 
to parameter '__state' here
       clear(iostate __state = goodbit);
                     ^
1 error generated.
make[2]: *** 
[Modules/ThirdParty/KWSys/src/KWSys/CMakeFiles/itksys.dir/SystemTools.cxx.o] 
Error 1
make[1]: *** 
[Modules/ThirdParty/KWSys/src/KWSys/CMakeFiles/itksys.dir/all] Error 2
make: *** [all] Error 2



On 13-03-07 02:26 PM, Bradley Lowekamp wrote:
> Try the clang compiler. Some have reported issues with the llvm-gcc thing apple has with Xcode 4.
>
> Brad
>
> On Mar 7, 2013, at 1:41 PM, Tim Allman <dr.tim.allman at gmail.com> wrote:
>
>> I'm working on an iMac (OSX Lion). The libraries were compiled using gcc with the default options. I built it with testing turned off but I can see what happens.
>>
>> Tim
>>
>>
>> On 13-03-07 01:02 PM, Bradley Lowekamp wrote:
>>> What compiler are you using?  When I use Intel's it's too aggressive with it floating point optimization. I believe the Vnl tests fail for this. Do these pass for you? I have to compile itk with -fprecise? to get the floating point  correct.
>>>
>>> On Mar 7, 2013, at 12:24 PM, Tim Allman <dr.tim.allman at gmail.com> wrote:
>>>
>>>> I have come across some odd behaviour with the LBFGSOptimizer.
>>>>
>>>> In my project I have been using ITK 4.3 debug build libraries with good results. The trace printout indicated normal convergence and a call to  GetStopConditionDescription() indicated "LBFGSOptimizer: Function tolerance reached".
>>>>
>>>> However, when I switched to the release build, GetStopConditionDescription()  returned "LBFGSOptimizer: Failure". I dug into the call with my debugger and the problem seems to lie in the vnl_lbfgs code.
>>>>
>>>> Is anyone aware of this behaviour? Is there a work around?
>>>>
>>>> Thanks,
>>>>
>>>> Tim
>>>>
>>>> -- 
>>>> Tim Allman, Ph.D.
>>>> 35 Margaret Street,
>>>> Guelph Ontario N1E 5R6
>>>> Canada
>>>>
>>>> <dr_tim_allman.vcf>
>>>> _____________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://www.kitware.com/products/protraining.php
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-users
>> -- 
>> Tim Allman, Ph.D.
>> 35 Margaret Street,
>> Guelph Ontario N1E 5R6
>> Canada
>>
>> <dr_tim_allman.vcf>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users

-- 
Tim Allman, Ph.D.
35 Margaret Street,
Guelph Ontario N1E 5R6
Canada

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dr_tim_allman.vcf
Type: text/x-vcard
Size: 159 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130307/0c99cf45/attachment.vcf>


More information about the Insight-users mailing list