Re: [eigen] Problem with g++-4.4 -O2 and Eigen3 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Problem with g++-4.4 -O2 and Eigen3
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Sun, 29 May 2011 17:08:30 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=1fD/hnJtAT9GQuQnTPIc91XuMhgkZClItSk2GXEZhTQ=; b=rN+U9BJ1U6XQg8fKcWggJtWKLzN9YS2O/1WQmPgpRYWU4wMpqPcHvmsGGz1mzPfVho JOfZU96VGl9XRQ7YWGXRVgE1Sqcw9wqXQV0Hyqqw3cMcii2sQOD5uCMuvRHAr9Ds1cUR uxKU1nfMaWvgssu4nVQ1uxCJkmg/YdGMOOLGM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=hXf0z66mQwtwhqhf6dvsHeOZbdrXrWKoNUKbq32Bg6BrIhV6LczeGcFO9KhAFng+8P ErR5XJYG3FB5NuEB0CSkajZD2HVxpILDgoATNzArEPQijUg42T/tfn4i/ySAz9JUnqlV GEnR7c8Q5JmOVBLVzwYyduruNRb5wwjfLQQ4k=
ok, so just like before, the default value of the multiplicative
factor alpha gets transformed into a -1.... that's really crasy.
Does that change anything if explicitly put a multiplicative factor, e.g.:
C.noalias() = 1 * A * B;
Regarding the matrix size, this is because for matrices smaller than 8
we use another product implementation.
gael
On Sun, May 29, 2011 at 2:45 PM, Boris Lau
<lau@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi folks,
>
> after updating Eigen to the newest version in the repository, I now compile
> my code with Eigen including the "no inlining of the GEBP product kernel"
> change by Gael.
>
> However, still a simple matrix multiplication goes awfully wrong when using
> -O2 in g++-4.4:
>
> // a code snipped
> Eigen::Matrix<double,3,9> J;
> J.fill(1.0);
> Eigen::Matrix<double,3,9> Jprime = Eigen::Matrix3d::Identity() * J;
> std::cout << "J\n" << J << std::endl;
> std::cout << "Jprime\n" << Jprime << std::endl;
>
> // output
> J
> 1 1 1 1 1 1 1 1 1
> 1 1 1 1 1 1 1 1 1
> 1 1 1 1 1 1 1 1 1
> Jprime
> -1 -1 -1 -1 -1 -1 -1 -1 -1
> -1 -1 -1 -1 -1 -1 -1 -1 -1
> -1 -1 -1 -1 -1 -1 -1 -1 -1
>
> As for Hauke, this only occurs only when used deeper inside a project, in
> the main function it works alright. The problem also occurs for a matrix
> size of 3x8, and disappears for 3x7 and smaller. Using dynamic sizes does
> not help.
> I also could not find a working order of .o files during linking.
>
> Maybe the no onlining fix didn't go far enough?
>
> Boris
>
> --
> Boris Lau
>
> Albert-Ludwigs-University Freiburg
> Institute of Computer Science, Autonomous Intelligent Systems Group
> Georges-Koehler-Allee 079, D-79110 Freiburg, Germany
>
> Building 079, Room 1005
> Phone: +49 761 203-8012 | Mobile: +49 174 9436758
> http://www.informatik.uni-freiburg.de/~lau
>
>
>