[Insight-users] Error itk::Math::Detail::RoundHalfIntegerToEven_64(double)

Paolo Zaffino p.zaffino at yahoo.it
Wed Apr 4 12:12:23 EDT 2012


Dear Brad,

I tried to compile using gcc-4.4 but nothing changes.
I can't use ITKv4 because, unfortunately, my application doesn't support it.

I have two questions:

1) Why on my laptop (and on many other computers) with the same OS (and so with the same compiler) work all fine? Is it an hardware problem?

2) I'm using Ubuntu, not OSX...in your mail I read "we have opted not to use a compile test for this due to complication with universal binaries on apple". Is there a way to enable it since I'm not using an apple machine?

Thank you very much.
Paolo



________________________________
 Da: Bradley Lowekamp <blowekamp at mail.nih.gov>
A: Paolo Zaffino <p.zaffino at yahoo.it> 
Cc: "insight-users at itk.org" <insight-users at itk.org>; Andrea Cherubini <a.cherubini at isn.cnr.it>; Maria Francesca Spadea <mfspadea at unicz.it>; James Shackleford <james.a.shackleford at gmail.com> 
Inviato: Mercoledì 4 Aprile 2012 14:56
Oggetto: Re: [Insight-users] Error itk::Math::Detail::RoundHalfIntegerToEven_64(double)
 

Hello Palo,

I went back and gave a closer look at the 3.20.1 version of the MathDetail.h file and see the following:

#if VNL_CONFIG_ENABLE_SSE2_ROUNDING && defined(__SSE2__) && \
  ( defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)) && (!defined(__GCCXML__) )
// _mm_cvtsd_si64 and _mm_cvtss_si64 are not defined in gcc prior to 4.0                                                          
// of gcc, we have opted not to use a compile test for this due to                                                                
// complication with universal binaries on apple                                                                                  
#if (!defined(__GNUC__) || ( defined(__GNUC__) && (__GNUC__>=4 ) ))
# undef USE_SSE2_64IMPL
# define USE_SSE2_64IMPL 1
#endif
#endif

It looks like GCC was not too consistent with the including this intrinsic. However, it ITKv4 we have made this more robust in the detection of this intrinsic. We have added a try compile for this feature.

As the version of your compiler is a "prerelease" I would be suspect that it may be an issue with that. I would suggest trying ITKv4 or see if an officially released version of the compiler is available for your platform, that meets your requirements.

Brad



On Apr 3, 2012, at 12:49 PM, Paolo Zaffino wrote:

Dear Brad,
>
>First of all thanks for the reply.
>
>gcc --version returns me this:
>gcc (GCC) 4.1.3 20080704 (prerelease) (Ubuntu 4.1.2-27ubuntu1)
>
>The command
>$ grep ITK_COMPILER_SUPPORTS_SSE2 CMakeCache.txt
>dosen'nt give me any result...so I guess that this string is absent.
>
>I copied the C++ code that you sent me into a file (test_ITK.cxx) and I tried to compile it by
>$ gcc test_itk.cxx -o test_ITK
>it doesn't compile and I get this error:
>
>test_itk.cxx: In function ‘int main()’:
>test_itk.cxx:5: error: ‘_mm_cvtss_si64’ was not declared in this scope
>test_itk.cxx:6: error: ‘_mm_cvtsd_si64’ was not declared in this scope
>
>
>Thank you.
>
>Paolo
>
>
>
>
>
>________________________________
> Da: Bradley Lowekamp <blowekamp at mail.nih.gov>
>A: Paolo Zaffino <p.zaffino at yahoo.it> 
>Cc: "insight-users at itk.org" <insight-users at itk.org>; Andrea Cherubini <a.cherubini at isn.cnr.it>; Maria Francesca Spadea <mfspadea at unicz.it>; James Shackleford <james.a.shackleford at gmail.com> 
>Inviato: Martedì 3 Aprile 2012 17:57
>Oggetto: Re: [Insight-users] Error itk::Math::Detail::RoundHalfIntegerToEven_64(double)
> 
>
>Hello Paolo,
>
>
>What compiler are you using?
>
>
>I am curious if certain CMake variables are set. Could you run the following command in you build root:
>
>
>$ grep ITK_COMPILER_SUPPORTS_SSE2 CMakeCache.txt
>
>
>We should be running a try compile on the following bit of code to detect if you compiler supports this intrinsic.
>
>
>#include <emmintrin.h> // sse 2 intrinsics                                                                                        
>int main()                                                                                                                        
>{                                                                                                                                 
>float x = 0.5;                                                                                                                    
>_mm_cvtss_si64( _mm_set_ss(x) );                                                                                                  
>_mm_cvtsd_si64( _mm_set_sd(x) );                                                                                                  
>return 0;                                                                                                                         
>}
>
>
>I am wondering where things went wrong, and if you compiler actually supports this.
>
>
>Brad
>
>
>On Apr 3, 2012, at 11:09 AM, Paolo Zaffino wrote:
>
>Dear ITK community,
>>
>>I'm trying to compile ITK 3.20.1 on a pc with Ubuntu 10.04 64 bit setting these flags:
>>
>>CMAKE_BUILD_TYPE    Release
>>BUILD_EXAMPLES    OFF
>>BUILD_TESTING     OFF
>>ITK_USE_REVIEW    ON
>>ITK_USE_OPTIMIZED_REGITRATION_METHODS    ON
>>
>>The cmake
 step ends without problems but when I try to compile the code I get this error:
>>
>>Building CXX object
 Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed+double.3.12-.o
>>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed_ref+double.2.2-.o
>>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed_ref+double.2.3-.o
>>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed_ref+double.3.12-.o
>>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed_ref+double.4.3-.o
>>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_matrix_fixed_ref+double.4.4-.o
>>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_vector+short-.o
>>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_vector+ushort-.o
>>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_vector+char-.o
>>[ 79%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_vector+size_t-.o
>>[ 80%] Building
 CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_fft_base+double.3-.o
>>[ 80%] Building CXX object Code/Common/CMakeFiles/itkvnl_inst.dir/vnl_fft_base+float.3-.o
>>Linking CXX static library ../../bin/libitkvnl_inst.a
>>[ 80%] Built target itkvnl_inst
>>Scanning dependencies of target ITKCommon
>>[ 80%] [ 80%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkBarrier.o
>>Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkBloxItem.o
>>[ 80%] [ 80%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkChainCodePath2D.o
>>Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkCommand.o
>>[ 80%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkConditionVariable.o
>>[ 81%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkCovariantVector.o
>>[ 81%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkDataObject.o
>>/usr/local/lib/InsightToolkit-3.20.1/Code/Common/itkMathDetail.h: In
 function ‘itk::int64_t itk::Math::Detail::RoundHalfIntegerToEven_64(double)’:
>>/usr/local/lib/InsightToolkit-3.20.1/Code/Common/itkMathDetail.h:251: error: ‘_mm_cvtsd_si64’ was not declared in this scope
>>/usr/local/lib/InsightToolkit-3.20.1/Code/Common/itkMathDetail.h: In function ‘itk::int64_t itk::Math::Detail::RoundHalfIntegerToEven_64(float)’:
>>/usr/local/lib/InsightToolkit-3.20.1/Code/Common/itkMathDetail.h:258: error: ‘_mm_cvtss_si64’ was not declared in this scope
>>[ 81%] Building CXX object Code/Common/CMakeFiles/ITKCommon.dir/itkDecisionRuleBase.o
>>make[2]: *** [Code/Common/CMakeFiles/ITKCommon.dir/itkChainCodePath2D.o] Error 1
>>make[2]: *** Waiting for unfinished jobs....
>>make[1]: *** [Code/Common/CMakeFiles/ITKCommon.dir/all] Error 2
>>make: *** [all] Error 2
>>
>>
>>Do you have any idea about?
>>
>>Thank you very
 much.
>>Regards.
>>
>>Paolo_____________________________________
>>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
>>
>
>========================================================
>Bradley Lowekamp  
>Medical Science and Computing for
>Office of High Performance Computing and Communications
>National Library of Medicine 
>blowekamp at mail.nih.gov
>
>
>
>
>

========================================================
Bradley Lowekamp  
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120404/f2a11045/attachment.htm>


More information about the Insight-users mailing list