Re: [eigen] PGI compilation error

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Sorry, for the delay, I was away.

Actually, the tests don't compile with EIGEN_DONT_ALIGN. I get
following messages:

/opt/cray/xt-asyncpe/3.5/bin/CC: INFO: linux target is being used
"/users/pmarti/tmp/eigen/Eigen/src/Core/DiagonalProduct.h", line 40: error:
          expression must be an lvalue or a function designator
            | (PacketAccessBit & (unsigned int)(MatrixType::Flags) &
(unsigned int)(DiagonalType::DiagonalVectorType::Flags)),
                                                                     ^

"/users/pmarti/tmp/eigen/Eigen/src/Core/Transpose.h", line 70: error: class
          member designated by a using-declaration must be visible in a direct
          base class
      EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Transpose)
      ^
          detected during:
            instantiation of class "Eigen::Transpose<MatrixType> [with
                      MatrixType=Eigen::Matrix<float, 1, 1, 0, 1, 1>]"
            instantiation of "Eigen::Transpose<Derived>
                      Eigen::DenseBase<Derived>::transpose() [with
                      Derived=Eigen::Matrix<float, 1, 1, 0, 1, 1>]"
            instantiation of "void homogeneous<Scalar,Size>() [with
                      Scalar=float, Size=1]"

Philippe

On Tue, Feb 23, 2010 at 3:42 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> OK so it's looking like getting SSE support on PGI is going to require
> a bit of work.
>
> Meanwhile you can test Eigen without SSE and without any 16-byte
> alignment stuff by defining EIGEN_DONT_ALIGN before you #include
> Eigen.
>
> Another solution is to do the EIGEN_HAS_MM_MALLOC change and then
> compile with EIGEN_DONT_VECTORIZE.
>
> EIGEN_DONT_VECTORIZE disables the use of SSE intrinsics but still
> tries to do 16-byte aligned malloc's to preserve ABI compatibility.
> EIGEN_DONT_ALIGN breaks ABI compatibility.
>
> Benoit
>
>
> 2010/2/23 Philippe Marti <philippe.marti@xxxxxxxxx>:
>> Well changing the EIGEN_HAS_MM_MALLOC, removed the first error but
>> then fails on   _mm_cvtss_f32  and _mm_cvtsd_f64 :
>>
>> "/users/pmarti/tmp/ei3/eigen/Eigen/src/Core/arch/SSE/PacketMath.h",
>> line 247: error:
>>          identifier "_mm_cvtss_f32" is undefined
>>  template<> EIGEN_STRONG_INLINE float  ei_pfirst<Packet4f>(const
>> Packet4f& a) { return _mm_cvtss_f32(a); }
>>
>>                 ^
>>
>> "/users/pmarti/tmp/ei3/eigen/Eigen/src/Core/arch/SSE/PacketMath.h",
>> line 248: error:
>>          identifier "_mm_cvtsd_f64" is undefined
>>  template<> EIGEN_STRONG_INLINE double ei_pfirst<Packet2d>(const
>> Packet2d& a) { return _mm_cvtsd_f64(a); }
>>
>>                 ^
>>
>> "/users/pmarti/tmp/ei3/eigen/Eigen/src/Core/DiagonalProduct.h", line 40: error:
>>          expression must be an lvalue or a function designator
>>            | (PacketAccessBit & (unsigned int)(MatrixType::Flags) &
>> (unsigned int)(DiagonalType::DiagonalVectorType::Flags)),
>>
>>
>> As I'm concerned, I do not absolutely need this to work. I merely
>> wanted to compare code performance between different compilers.
>>  And as I've now been told, GCC compiled code seems to be faster anyway.
>>
>> So I'll be glad to provide some more information if required, but else
>> I'm sure you have many more important things to do ;)
>>
>> Regards,
>> Philippe
>>
>>
>> On Tue, Feb 23, 2010 at 3:07 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>>> Sorry, I'm not sure I'm following correctly.
>>>
>>> Is the current problem that _mm_malloc is not found?
>>>
>>> If yes, then the easy fix is to tell Eigen to not try using it. There
>>> are other solutions for the same need.
>>>
>>> Just edit Eigen/src/Core/util/Memory.h, find this:
>>>
>>> #ifdef EIGEN_VECTORIZE_SSE
>>>  #define EIGEN_HAS_MM_MALLOC 1
>>> #else
>>>  #define EIGEN_HAS_MM_MALLOC 0
>>> #endif
>>>
>>> and replace the '1' by '0' to tell Eigen not to use it.
>>>
>>> In the worst case Eigen can always use ei_handmade_aligned_malloc.
>>>
>>> Cheers,
>>> Benoit
>>>
>>> 2010/2/23 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
>>>> The revision number is correct - you are in the development branch
>>>> where I applied the fix.
>>>>
>>>> Regarding PGI, I don't have the compiler myself and right now I am
>>>> unable to find out on the web which methods are used for aligned
>>>> memory management (src\Core\util\Memory.h,
>>>> free/_mm_free/_aligned_free,...). As soon as you can provide us with
>>>> the information I can easily patch Eigen.
>>>>
>>>> Until then, the only chance to compile Eigen is disabling
>>>> vectorization by defining EIGEN_DONT_VECTORIZE. Well, assuming there
>>>> don't occur any other errors... ;)
>>>>
>>>> - Hauke
>>>>
>>>> On Tue, Feb 23, 2010 at 2:51 PM, Philippe Marti
>>>> <philippe.marti@xxxxxxxxx> wrote:
>>>>> Hello,
>>>>>
>>>>> I hope that's the right information, I'm not used to mercurial:
>>>>>
>>>>> hg identify:
>>>>>    a2598077ebca tip
>>>>>
>>>>>
>>>>> For the PGI compiler:
>>>>> pgCC 9.0-4 64-bit
>>>>>
>>>>> Regards,
>>>>> Philippe
>>>>> On Tue, Feb 23, 2010 at 1:49 PM, Aron Ahmadia <aja2111@xxxxxxxxxxxx> wrote:
>>>>>> Hi Philippe,
>>>>>>
>>>>>> Can you verify the hg version of Eigen that you are working from and
>>>>>> the error again?  I don't have access to a PGI compiler here but you
>>>>>> may as well note the version number of the compiler :)
>>>>>>
>>>>>> A
>>>>>>
>>>>>> On Tue, Feb 23, 2010 at 1:07 PM, Philippe Marti
>>>>>> <philippe.marti@xxxxxxxxx> wrote:
>>>>>>> Well ok, compiling the tests works fine with and the first tests
>>>>>>> passed (interrupted afterwards as I'm not supposed to run to heavy
>>>>>>> stuff on the login nodes)
>>>>>>>
>>>>>>> And I get the error posted previously for PGI.
>>>>>>>
>>>>>>> Oh and it also works for Pathscale. Just PGI is complaining.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Philippe
>>>>>>>
>>>>>>> On Tue, Feb 23, 2010 at 12:41 PM, Philippe Marti
>>>>>>> <philippe.marti@xxxxxxxxx> wrote:
>>>>>>>> Oh, Wait before you start digging to deep. It's a little bit messy
>>>>>>>> here to get to load the right compilers/library etc on the cluster.. I
>>>>>>>> might have forgotten something.
>>>>>>>>
>>>>>>>> I'll check that the gcc version is working
>>>>>>>>
>>>>>>>> regards,
>>>>>>>> Philippe
>>>>>>>>
>>>>>>>> On Tue, Feb 23, 2010 at 12:38 PM, Hauke Heibel
>>>>>>>> <hauke.heibel@xxxxxxxxxxxxxx> wrote:
>>>>>>>>> This error is a little bit odd. It means that you have defined
>>>>>>>>> EIGEN_VECTORIZE_SSE (see src/core/util/Memory.h) and thus you should
>>>>>>>>> have included 'xmmintrin.h' (see Core) where (at least AFAIK) _mm_free
>>>>>>>>> and _mm_malloc are declared as external or included via 'malloc.h'.
>>>>>>>>>
>>>>>>>>> As I said, I am a little bit at a loss...
>>>>>>>>>
>>>>>>>>> - Hauke
>>>>>>>>>
>>>>>>>>> On Tue, Feb 23, 2010 at 12:21 PM, Philippe Marti
>>>>>>>>> <philippe.marti@xxxxxxxxx> wrote:
>>>>>>>>>> The default branch is the 3.0 one right?
>>>>>>>>>>
>>>>>>>>>> I tried the to compile the tests with PGI, here are the first errors
>>>>>>>>>> (not sure about what you need):
>>>>>>>>>>
>>>>>>>>>> "/users/pmarti/tmp/ei3/eigen/Eigen/src/Core/util/Memory.h", line 94: error:
>>>>>>>>>>          identifier "_mm_malloc" is undefined
>>>>>>>>>>      result = _mm_malloc(size, 16);
>>>>>>>>>>               ^
>>>>>>>>>>
>>>>>>>>>> "/users/pmarti/tmp/ei3/eigen/Eigen/src/Core/util/Memory.h", line 165: error:
>>>>>>>>>>          identifier "_mm_free" is undefined
>>>>>>>>>>      _mm_free(ptr);
>>>>>>>>>>      ^
>>>>>>>>>>
>>>>>>>>>> "/users/pmarti/tmp/ei3/eigen/Eigen/src/Core/arch/SSE/PacketMath.h",
>>>>>>>>>> line 142: warning:
>>>>>>>>>>          controlling expression is constant
>>>>>>>>>>  { ei_assert(false && "packet integer division are not supported by SSE");
>>>>>>>>>>    ^
>>>>>>>>>>
>>>>>>>>>> "/users/pmarti/tmp/ei3/eigen/Eigen/src/Core/arch/SSE/PacketMath.h",
>>>>>>>>>> line 247: error:
>>>>>>>>>>          identifier "_mm_cvtss_f32" is undefined
>>>>>>>>>>  template<> EIGEN_STRONG_INLINE float  ei_pfirst<Packet4f>(const
>>>>>>>>>> Packet4f& a) { return _mm_cvtss_f32(a); }
>>>>>>>>>>
>>>>>>>>>>                 ^
>>>>>>>>>>
>>>>>>>>>> "/users/pmarti/tmp/ei3/eigen/Eigen/src/Core/arch/SSE/PacketMath.h",
>>>>>>>>>> line 248: error:
>>>>>>>>>>          identifier "_mm_cvtsd_f64" is undefined
>>>>>>>>>>  template<> EIGEN_STRONG_INLINE double ei_pfirst<Packet2d>(const
>>>>>>>>>> Packet2d& a) { return _mm_cvtsd_f64(a); }
>>>>>>>>>>
>>>>>>>>>> Philippe
>>>>>>>>>>
>>>>>>>>>> On Tue, Feb 23, 2010 at 11:38 AM, Hauke Heibel
>>>>>>>>>> <hauke.heibel@xxxxxxxxxxxxxx> wrote:
>>>>>>>>>>> I tried to fix the aligned issue in the default branch. You may try to
>>>>>>>>>>> grab that version and give it a shot.
>>>>>>>>>>>
>>>>>>>>>>> - Hauke
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Feb 23, 2010 at 11:23 AM, Philippe Marti
>>>>>>>>>>> <philippe.marti@xxxxxxxxx> wrote:
>>>>>>>>>>>> PGI: pgCC 9.0-4 64-bit target on x86-64 Linux
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> "/users/pmarti/Documents/Code/git/FSDynamoCode/External/eigen/Eigen/src/Core/util/Macros.h",
>>>>>>>>>>>> line 193: catastrophic error:
>>>>>>>>>>>>          #error directive: Please tell me what is the equivalent of
>>>>>>>>>>>>          __attribute__((aligned(16))) for your compiler
>>>>>>>>>>>>  #error Please tell me what is the equivalent of
>>>>>>>>>>>> __attribute__((aligned(16))) for your compiler
>>>>>>>>>>>>   ^
>>>>>>>>>>>>
>>>>>>>>>>>> 1 catastrophic error detected in the compilation of
>>>>>>>>>>>> "/users/pmarti/Documents/Code/git/FSDynamoCode/Programs/ThermalConvectionRun.cpp".
>>>>>>>>>>>> Compilation terminated.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/