getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Conflict between GMM and LAPACKE


From: Yves Renard
Subject: Re: [Getfem-users] Conflict between GMM and LAPACKE
Date: Tue, 15 Oct 2013 08:46:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Ok. I tried with g++ 4.7 and I cannot even load the two header <complex>
and <complex.h>.
It would be interesting if you can submit a patch of gmm_matrix.h.


Yves.




Le 15/10/2013 00:33, Torquil Macdonald Sørensen a écrit :
> Hi!
>
> On my system, I can simultaneously include "complex.h" and "complex"
> without problems, in any order, when compiling with G++ 4.8.1.
>
> However, I did some more testing. It seems that "complex.h" defines
> the symbol "I". E.g., the following compiles and runs:
>
> #include "complex.h"
> int main() { std::cout << I << std::endl; }
>
> If complex.h is included before gmm_matrix.h, this causes problems in
> gmm_matrix.h at a point in the code where "I" is used as the name of a
> function argument:
>
> void add(const identity_matrix &I, const M &v1)
>
> (on line 67 in gmm_matrix.h)
>
> I copied some of that code out to a small test program, and solved the
> compilation problem (just for that little piece of code) by just
> changing the name of that function argument.
>
> However, I have asked on the LAPACK forum if it is possible to stop it
> from including "complex.h".
>
> Best regards
> Torquil Sørensen
>
> On 14/10/13 21:06, Yves Renard wrote:
>>
>> Dear Torquil,
>>
>> I just tried to include complex.h but it turns out that
>> #include<complex.h>
>> and
>> #include<complex>
>> are not compatible !
>> It seems that it is not possible to include both. And since gmm
>> includes <complex> it seems that this implies that it is incompatible
>> with <complex.h>.
>>
>> I don't know how you can circumvent this. May be by using some
>> namespaces ...
>>
>> Yves.
>>
>> ----- Original Message -----
>> From: "Torquil Macdonald Sørensen" <address@hidden>
>> To: address@hidden
>> Sent: Friday, October 11, 2013 5:28:40 PM
>> Subject: [Getfem-users] Conflict between GMM and LAPACKE
>>
>>
>>
>>
>>
>>
>>
>> Hi!
>>
>> There seems to be a conflict between GMM and LAPACKE. The following
>> test program does not compile with g++ 4.8.2 20131010 (prerelease):
>>
>> #include "lapacke.h"
>> #include "gmm/gmm_matrix.h"
>>
>> int main()
>> {
>> return(0);
>> }
>>
>>
>> The compiler output is:
>>
>> ********************************************************
>> In file included from
>> /mn/anatu/cma-u3/tmac/usr/stow/gcc/include/c++/4.8.2/complex.h:36:0,
>> from /mn/anatu/cma-u3/tmac/usr/include/lapacke.h:77,
>> from conflict_gmm_lapacke.cpp:1:
>> /mn/anatu/cma-u3/tmac/usr/include/gmm/gmm_matrix.h:67:35: error:
>> expected ‘,’ or ‘...’ before ‘(’ token
>> void add(const identity_matrix &I, const M &v1)
>> ^
>> In file included from conflict_gmm_lapacke.cpp:2:0:
>> /mn/anatu/cma-u3/tmac/usr/include/gmm/gmm_matrix.h: In function ‘void
>> gmm::add(const gmm::identity_matrix&)’:
>> /mn/anatu/cma-u3/tmac/usr/include/gmm/gmm_matrix.h:68:30: error: ‘v1’
>> was not declared in this scope
>> { add(I, linalg_const_cast(v1)); }
>> **********************************************************
>>
>>
>> If I reverse the header file order, it compiles. lapacke.h seems to
>> include "complex.h", which causes problems with gmm_matrix.h.
>>
>> Is this a bug in GMM, LAPACKE, or neither?
>>
>> Best regards
>> Torquil Sørensen
>>
>>
>> _______________________________________________
>> Getfem-users mailing list
>> address@hidden
>> https://mail.gna.org/listinfo/getfem-users
>


-- 

  Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
  Pole de Mathematiques, INSA-Lyon             fax : (33) 04.72.43.85.29
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard

---------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]