Bug#836844: eigen3: autopkgtests fail on ppc64el - solution

2016-12-06 Thread TFAUCK
Hello,
I found the missing information in POWER ISA

/To use a multiply-add to perform an IEEE or Java//
//compliant multiply, the addend must be -0.0. This//
//is necessary to insure that the sign of a zero result//
//will be correct when the product is -0.0 (+0.0 + -0.0//
//t +0.0, and -0.0 + -0.0t -0.0). When the sign of a//
//resulting 0.0 is not important, then +0.0 can be//
//used as an addend which may, in some cases,//
//avoid the need for a second register to hold a -0.0//
//in addition to the integer 0/floating-point +0.0 that//
//may already be available./

so the example shows it:

$ cat t2.c
#include "stdio.h"
#include "altivec.h"
int main() {
vector float X={ -1, 0, 0, 0 };
vector float Y={ -1, -1, -1, -2 };
vector float Z, V;
*vector float p4f_ZERO={ 0, 0, 0, 0 };**
**vector float p4f_mZERO={ -0.0, -0.0, -0.0, -0.0 };*
Z = vec_madd(X, Y, p4f_ZERO);
V = vec_madd(X, Y, p4f_mZERO);
printf("%f %f %f %f \n",Z[0], Z[1], Z[2], Z[3]);
printf("%f %f %f %f \n",V[0], V[1], V[2], V[3]);
vector float U;
U= X * Y ;
printf("%f %f %f %f \n",U[0], U[1], U[2], U[3]);
return(0);
}

$ gcc t2.c
debian@vm18:~$ ./a.out
1.00 0.00 0.00 0.00
*1.00 -0.00 -0.00 -0.00 *
1.00 -0.00 -0.00 -0.00

So the vector p4f_ZERO must be modified with a signed value of -0.0 in
order to have that function to work.

-- 

__
thf - Thierry Fauck - tfa...@free.fr>
/pubkey: 4096R/FCC181CE/
/fingerprint: 5CCF 6B82 DE4E E72A A40B B63E A153 BF4F FCC1 81CE/
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#836844: eigen3: autopkgtests fail on ppc64el

2016-12-02 Thread TFAUCK
On Thu, 1 Dec 2016 16:15:50 +0100 Roger  wrote:
> On Sun, 13 Nov 2016 18:04:28 +0200 Graham Inggs  wrote:
> > Control: reopen -1
> > 
> > I've just checked eigen3 3.3.0-1 on plummer.debian.org, and it still outputs
> > 
> > forceMatrix*axisMatrix: -1  0  0
> >  0 -2  0
> >  0  0 -3
> > 
> > 
> I have checked with current dev. tree and problem remains
> I have tried compiler g++-4.9 and g++-5 and g++-6 and all are providing
> same error on ppc64le
> On x86_64 using g++-5 there is no error.
> 
> 
Digging through the code, I found the difference
src/Core/functors/BinaryFunctors.h:89
{ return internal::pmul(a,b); }

on x86_64 it calls at line 192
extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__,
__artificial__))  _mm_mul_ps (__m128 __A, __m128 __B)
  │{
return (__m128) ((__v4sf)__A *
(__v4sf)__B);
}


when on ppc64le pmul() calls
/usr/include/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h:361
return vec_madd(a,b, p4f_ZERO);

so I suspect there is something there


-- 

__
thf - Thierry Fauck - tfa...@free.fr>
/pubkey: 4096R/FCC181CE/
/fingerprint: 5CCF 6B82 DE4E E72A A40B B63E A153 BF4F FCC1 81CE/

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#836844: eigen3: autopkgtests fail on ppc64el

2016-12-01 Thread Roger
On Sun, 13 Nov 2016 18:04:28 +0200 Graham Inggs  wrote:
> Control: reopen -1
> 
> I've just checked eigen3 3.3.0-1 on plummer.debian.org, and it still outputs
> 
> forceMatrix*axisMatrix: -1  0  0
>  0 -2  0
>  0  0 -3
> 
> 
I have checked with current dev. tree and problem remains
I have tried compiler g++-4.9 and g++-5 and g++-6 and all are providing
same error on ppc64le
On x86_64 using g++-5 there is no error.

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Processed: Re: Bug#836844: eigen3: autopkgtests fail on ppc64el

2016-11-13 Thread Debian Bug Tracking System
Processing control commands:

> reopen -1
Bug #836844 {Done: Anton Gladky } [src:eigen3] eigen3: 
autopkgtests fail on ppc64el
'reopen' may be inappropriate when a bug has been closed with a version;
all fixed versions will be cleared, and you may need to re-add them.
Bug reopened
No longer marked as fixed in versions eigen3/3.3.0-1.

-- 
836844: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836844
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#836844: eigen3: autopkgtests fail on ppc64el

2016-11-13 Thread Graham Inggs
Control: reopen -1

I've just checked eigen3 3.3.0-1 on plummer.debian.org, and it still outputs

forceMatrix*axisMatrix: -1  0  0
 0 -2  0
 0  0 -3

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#836844: eigen3: autopkgtests fail on ppc64el

2016-09-30 Thread Steve Langasek
On Fri, Sep 30, 2016 at 12:35:10PM +0200, Graham Inggs wrote:
> Hi Steve

> On 27 September 2016 at 18:45, Steve Langasek
>  wrote:
> > The attached patch has been applied in Ubuntu.  Please consider including it
> > in Debian as well.

> The tests still fail on ppc64el with that patch in place.  There might
> be other commits from upstream that need to be included.

Oh indeed, thanks for catching this.  I've re-pinged IBM about it now.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org


signature.asc
Description: PGP signature
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#836844: eigen3: autopkgtests fail on ppc64el

2016-09-27 Thread Anton Gladky
Hi Steve,

thanks for the bugreport and the patch. AFAIK upstream is
planning the new stable upstream release within the next
few weeks. I will upload it, if it happens. Otherwise your
patch will be applied.

Best regards

Anton


2016-09-27 18:45 GMT+02:00 Steve Langasek :
> Package: eigen3
> Version: 3.3~beta2-2
> Followup-For: Bug #836844
> User: ubuntu-de...@lists.ubuntu.com
> Usertags: origin-ubuntu yakkety ubuntu-patch
>
> This issue has been fixed upstream with a change to the code; we should not
> patch out the test, but instead take this upstream fix.
>
> The attached patch has been applied in Ubuntu.  Please consider including it
> in Debian as well.
>
> Thanks,
> --
> Steve Langasek   Give me a lever long enough and a Free OS
> Debian Developer   to set it on, and I can move the world.
> Ubuntu Developerhttp://www.debian.org/
> slanga...@ubuntu.com vor...@debian.org
>
> --
> debian-science-maintainers mailing list
> debian-science-maintainers@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#836844: eigen3: autopkgtests fail on ppc64el

2016-09-27 Thread Steve Langasek
Package: eigen3
Version: 3.3~beta2-2
Followup-For: Bug #836844
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu yakkety ubuntu-patch

This issue has been fixed upstream with a change to the code; we should not
patch out the test, but instead take this upstream fix.

The attached patch has been applied in Ubuntu.  Please consider including it
in Debian as well.

Thanks,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
diff -Nru eigen3-3.3~beta2/debian/patches/fix-ppc64el-signed-output.patch eigen3-3.3~beta2/debian/patches/fix-ppc64el-signed-output.patch
--- eigen3-3.3~beta2/debian/patches/fix-ppc64el-signed-output.patch	1969-12-31 16:00:00.0 -0800
+++ eigen3-3.3~beta2/debian/patches/fix-ppc64el-signed-output.patch	2016-09-27 00:28:12.0 -0700
@@ -0,0 +1,31 @@
+# HG changeset patch
+# User Gael Guennebaud 
+# Date 1473746319 -7200
+# Node ID 3806ea6d2b5d09fb28e0a248ec914317a25ec9f7
+# Parent  799e3315e2b00e598e0b9900bab37d6d17d5bfa1
+Bug 1285: fix regression introduced in changeset 6c00c9378f16
+
+diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h
+--- a/Eigen/src/LU/FullPivLU.h
 b/Eigen/src/LU/FullPivLU.h
+@@ -436,7 +436,7 @@
+ Index m_nonzero_pivots;
+ RealScalar m_l1_norm;
+ RealScalar m_maxpivot, m_prescribedThreshold;
+-char m_det_pq;
++signed char m_det_pq;
+ bool m_isInitialized, m_usePrescribedThreshold;
+ };
+ 
+diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h
+--- a/Eigen/src/LU/PartialPivLU.h
 b/Eigen/src/LU/PartialPivLU.h
+@@ -284,7 +284,7 @@
+ PermutationType m_p;
+ TranspositionType m_rowsTranspositions;
+ RealScalar m_l1_norm;
+-char m_det_p;
++signed char m_det_p;
+ bool m_isInitialized;
+ };
+ 
diff -Nru eigen3-3.3~beta2/debian/patches/series eigen3-3.3~beta2/debian/patches/series
--- eigen3-3.3~beta2/debian/patches/series	2016-09-03 13:06:42.0 -0700
+++ eigen3-3.3~beta2/debian/patches/series	2016-09-27 09:42:25.0 -0700
@@ -7,3 +7,4 @@
 10_vectorization.patch
 12_grammer_tweak.patch
 20_fix_FTBFS_in_check_for_aliasing.patch
+fix-ppc64el-signed-output.patch
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Bug#836844: eigen3: autopkgtests fail on ppc64el

2016-09-07 Thread Graham Inggs
Control: tags -1 patch


Hi Anton

> I think this can be ignored. But the question is interesting,
> if it is platform-dependent.

I saw the same behaviour on plummer.debian.org, a ppc64el porterbox.

For the record, I applied the patch below in Ubuntu and eigen3 migrated.

Regards
Graham


--- a/debian/tests/build1
+++ b/debian/tests/build1
@@ -73,8 +73,6 @@

   std::cout<<"forceMatrix: "<

Bug#836844: eigen3: autopkgtests fail on ppc64el

2016-09-06 Thread Anton Gladky
Hi Graham,

I think this can be ignored. But the question is interesting,
if it is platform-dependent.

Regards

Anton


2016-09-06 16:10 GMT+02:00 Graham Inggs :
> Source: eigen3
> Version: 3.3~beta2-1
> Severity: wishlist
>
>
> Hi Maintainer
>
> Since eigen3 3.3~beta2-1, its autopkgtests fail on ppc64el in Ubuntu [1].
> Tests on other architectures remain successful [2].
>
> I compared passing and failing test results and the only difference I can
> see is the passing test has:
>
> forceMatrix*axisMatrix: -1 -0 -0
> -0 -2 -0
> -0 -0 -3
>
> while the failing test has:
>
> forceMatrix*axisMatrix: -1  0  0
>  0 -2  0
>  0  0 -3
>
> This currently prevents the latest versions of eigen3 from migrating to
> Ubuntu Yakkety.
> Any ideas, please?  Is it safe to ignore these differences?
>
> Regards
> Graham
>
>
> [1] http://autopkgtest.ubuntu.com/packages/e/eigen3/yakkety/ppc64el
> [2] http://autopkgtest.ubuntu.com/packages/e/eigen3
>
> --
> debian-science-maintainers mailing list
> debian-science-maintainers@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#836844: eigen3: autopkgtests fail on ppc64el

2016-09-06 Thread Graham Inggs

Source: eigen3
Version: 3.3~beta2-1
Severity: wishlist


Hi Maintainer

Since eigen3 3.3~beta2-1, its autopkgtests fail on ppc64el in Ubuntu [1].
Tests on other architectures remain successful [2].

I compared passing and failing test results and the only difference I 
can see is the passing test has:


forceMatrix*axisMatrix: -1 -0 -0
-0 -2 -0
-0 -0 -3

while the failing test has:

forceMatrix*axisMatrix: -1  0  0
 0 -2  0
 0  0 -3

This currently prevents the latest versions of eigen3 from migrating to 
Ubuntu Yakkety.

Any ideas, please?  Is it safe to ignore these differences?

Regards
Graham


[1] http://autopkgtest.ubuntu.com/packages/e/eigen3/yakkety/ppc64el
[2] http://autopkgtest.ubuntu.com/packages/e/eigen3

--
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers