Re: [eigen] any remaining issues blocking beta1, speak up! |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] any remaining issues blocking beta1, speak up!
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Sat, 3 Jul 2010 15:07:04 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=W1llbpKBsE2oKgK5KFCdblfU6/MOKAMPHidNjmvbJFE=; b=bBICYeFM3C6Z0EuS+GghghYyP2tVPCMu66j+ogP1uo//k8PAJHpFJs86U5kop9FMHm Iqm5SqMhBc4h0c9fVwBuUikJPsLeJ7SgBVT6GuFRl/ABGMmr/MuKXwb9WI/zMu0VRfZo iRzmgJILOykhQz01kiLqP9gXWCp3Z121DQfB8=
- 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:content-transfer-encoding; b=wLurEwaaWDX2U2P07JhirM88WOHbkJUkhIqtxqQVIeM7JAZsJdNBY26OicvKL2gqcg v0ayZMI2+maMqTh83y8nRR+JPYbpY892XduxuQprfPNDtCZ5SdN+Jvc9hjDCJue+JLi1 KHVYgFcdwhIhlwbmMhR7M9kiAO22O0Lmc85QU=
here is a simplified version:
#include <iostream>
#include <Eigen/Dense>
template<typename A, typename B> EIGEN_DONT_INLINE int foo(const A& a,
const B& b)
{
return (a - b).sum() <= 0;
}
int main()
{
Eigen::Matrix<float,1,1> v;
v.setOnes();
return foo(v.colwise().maxCoeff(),v);
}
which, again, fails with gcc-4.3 + strict-aliasing only....
investigating to see if I can find a workaround.
gael
On Sat, Jul 3, 2010 at 1:03 PM, Jitse Niesen <jitse@xxxxxxxxxxxxxxxxx> wrote:
> On Sat, 3 Jul 2010, Benoit Jacob wrote:
>
>> All is in the title. Can we release beta1 this Saturday?
>
> There is also the stable_norm_1 test that is failing on gcc 4.3. This seems
> to be a mistake in Eigen itself.
>
> See the previous email I wrote:
>
> On Thu, 1 Jul 2010, Jitse Niesen wrote:
>>
>> Date: Thu, 1 Jul 2010 11:02:51 +0100 (BST)
>> From: Jitse Niesen <jitse@xxxxxxxxxxxxxxxxx>
>> To: Eigen mailinglist <eigen@xxxxxxxxxxxxxxxxxxx>
>> Subject: Failing stable_norm_1 test
>>
>> Hello,
>>
>> I just spent some time on the stable_norm_1 test, which fails on both my
>> computer and Gael's computer when using gcc 4.3. It looks similar to the
>> issue
>> which you solved by the empty struct magic (well done!).
>>
>> The details are as follows. I constructed the following (fairly) minimal
>> test
>> example:
>>
>> #include <iostream>
>> #include <Eigen/Dense>
>>
>> int main()
>> {
>> Eigen::Matrix<float,1,1> v;
>> v(0,0) = 0.1;
>> std::cerr << "blue norm = " << v.colwise().blueNorm() << "\n";
>> std::cerr << "status = " <<
>> v.colwise().hypotNorm().isApprox(v.colwise().norm(), 1e-4) << "\n";
>> }
>>
>> When compiling with g++ (version 4.3.3) -O2 -g and running under valgrind,
>> this
>> produces:
>>
>> Use of uninitialised value of size 4
>> at 0x8048F28: bool
>> Eigen::DenseBase<Eigen::PartialReduxExpr<Eigen::Matrix<float, 1, 1, 0, 1,
>> 1>,
>> Eigen::ei_member_hypotNorm<float>, 0>
>> >::isApprox<Eigen::PartialReduxExpr<Eigen::Matrix<float, 1, 1, 0, 1, 1>,
>> Eigen::ei_member_norm<float>, 0>
>> >(Eigen::DenseBase<Eigen::PartialReduxExpr<Eigen::Matrix<float, 1, 1, 0,
>> > 1, 1>,
>> Eigen::ei_member_norm<float>, 0> > const&, float) const (in
>> /scratch/1/users/jitse/work/c/eigen/eigenfoo)
>> by 0x8048AF5: main (in /scratch/1/users/jitse/work/c/eigen/eigenfoo)
>>
>> and the same error with the same stack trace a bit later, at 0x8048F2A.
>>
>> The result of the program is also wrong: it should print status = 1, but
>> it
>> says status = 0.
>>
>> The error goes away when compiling with -fno-strict-aliasing.
>> I tried compiling with -Wstrict-aliasing=2 but that does not produce any
>> warnings.
>>
>> Over to the gurus!
>>
>> Cheers,
>> Jitse
>>
>
>
>