Hello community,
here is the log from the commit of package libatlas3 for openSUSE:Factory checked in at 2014-07-29 16:48:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libatlas3 (Old)
and /work/SRC/openSUSE:Factory/.libatlas3.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libatlas3"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libatlas3/libatlas3.changes 2013-10-17 17:40:17.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libatlas3.new/libatlas3.changes 2014-07-29 16:49:15.000000000 +0200
@@ -1,0 +2,13 @@
+Thu Jun 26 23:23:09 UTC 2014 - dvaleev@suse.com
+
+- Enable build for ppc and ppc64le
+ see http://sourceforge.net/p/math-atlas/mailman/message/32471499/
+ POWER332.tar.bz2
+ POWER764LEVSX.tar.bz2
+ libatlas.ppc64le-abiv2.patch
+ initialize_malloc_memory.invtrsm.wms.oct23.patch
+ xlf.command.not.found.patch
+ getdoublearr.stripwhite.patch
+
+
+-------------------------------------------------------------------
New:
----
POWER332.tar.bz2
POWER764LEVSX.tar.bz2
getdoublearr.stripwhite.patch
initialize_malloc_memory.invtrsm.wms.oct23.patch
libatlas.ppc64le-abiv2.patch
xlf.command.not.found.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libatlas3.spec ++++++
--- /var/tmp/diff_new_pack.OxHFt9/_old 2014-07-29 16:49:16.000000000 +0200
+++ /var/tmp/diff_new_pack.OxHFt9/_new 2014-07-29 16:49:16.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package libatlas3
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,10 +26,20 @@
Group: Development/Libraries/C and C++
Url: http://math-atlas.sourceforge.net/
-Source0: atlas%{version}.tar.bz2
-Source1: README.SuSE
+Source: atlas%{version}.tar.bz2
+Source2: README.SuSE
+Source3: POWER332.tar.bz2
+Source4: POWER764LEVSX.tar.bz2
+Source5: %name-rpmlintrc
Patch0: atlas-suse-shared.patch
Patch1: atlas-hack.patch
+# for ppc64le
+# http://sourceforge.net/p/math-atlas/mailman/message/32471499/
+Patch10: getdoublearr.stripwhite.patch
+Patch11: xlf.command.not.found.patch
+Patch12: initialize_malloc_memory.invtrsm.wms.oct23.patch
+Patch13: libatlas.ppc64le-abiv2.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-fortran
BuildRequires: lapack-devel
@@ -172,7 +182,7 @@
%endif
%endif
-%ifarch x86_64 ppc64
+%ifarch x86_64 ppc64 ppc64le
%define mode 64
%else
%define mode 32
@@ -184,7 +194,15 @@
%ifarch x86_64 i586
%patch1
%endif
-cp %{SOURCE1} doc
+%ifarch ppc64le
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%endif
+cp %{SOURCE2} doc
+
+cp %{SOURCE3} %{SOURCE4} CONFIG/ARCHS/
%build
for type in %{types}; do
@@ -211,6 +229,22 @@
elif [ "$type" = "sse3" ]; then
sed -i 's#ARCH =.*#ARCH = P4E32SSE3#' Make.inc
fi
+%ifarch ppc
+ sed -i 's#ARCH =.*#ARCH = POWER332#' Make.inc
+ sed -i 's#-DATL_ARCH_POWER7#-DATL_ARCH_POWER3#g' Make.inc
+ sed -i 's#power7#power3#g' Make.inc
+ sed -i 's#-DATL_VSX##g' Make.inc
+ sed -i 's#-mvsx##g' Make.inc
+ sed -i 's#-DATL_AltiVec##g' Make.inc
+ sed -i 's#-m64#-m32#g' Make.inc
+%endif
+
+# use the provided archdef file for ppc64le
+# and force its usage in INSTFLAGS.
+%ifarch ppc64le
+ sed -i 's#\(ARCH = POWER.64\)VSX#\1LEVSX#' Make.inc
+ sed -i 's#\(INSTFLAGS =.*\) -a 0#\1 -a 1#' Make.inc
+%endif
make build %{?_smp_mflags}
cd lib
make shared %{?_smp_mflags}
++++++ getdoublearr.stripwhite.patch ++++++
References: http://sourceforge.net/p/math-atlas/mailman/message/32471499/
Index: ATLAS/include/atlas_genparse.h
===================================================================
--- ATLAS.orig/include/atlas_genparse.h
+++ ATLAS/include/atlas_genparse.h
@@ -149,13 +149,24 @@ static int asmNames2bitfield(char *str)
}
/* procedure 7 */
-static int GetDoubleArr(char *str, int N, double *d)
+static int GetDoubleArr(char *callerstr, int N, double *d)
/*
* Reads in a list with form "%le,%le...,%le"; N-length d recieves doubles.
* RETURNS: the number of doubles found, or N, whichever is less
*/
{
- int i=1;
+ int i;
+ char *dupstr = DupString(callerstr);
+ char *str = dupstr;
+ /* strip the string to end on first white space */
+ for (i=0; dupstr[i]; i++)
+ {
+ if (isspace(dupstr[i])) {
+ dupstr[i] = '\0';
+ break;
+ }
+ }
+ i = 1;
assert(sscanf(str, "%le", d) == 1);
while (i < N)
{
@@ -166,6 +177,7 @@ static int GetDoubleArr(char *str, int N
assert(sscanf(str, "%le", d+i) == 1);
i++;
}
+ free(dupstr);
return(i);
}
++++++ initialize_malloc_memory.invtrsm.wms.oct23.patch ++++++
From: Michel Normand
Subject: initialize malloc memory.invtrsm.wms.oct23
Date: Mon, 14 Apr 2014 17:18:53 +0200
References: http://sourceforge.net/p/math-atlas/mailman/message/32471499/
initialize malloc memory invtrsm.c
Signed-off-by: Will Schmidt
Signed-off-by: Michel Normand
---
ATLAS/tune/blas/level3/invtrsm.c | 1 +
1 file changed, 1 insertion(+)
Index: ATLAS/tune/blas/level3/invtrsm.c
===================================================================
--- ATLAS.orig/tune/blas/level3/invtrsm.c
+++ ATLAS/tune/blas/level3/invtrsm.c
@@ -525,6 +525,7 @@ static double RunTiming
a = A = malloc(i * ATL_MulBySize(incA));
if (A)
{
+ memset(A,0,i*ATL_MulBySize(incA)); /* wms (!!) malloc call above returns non-initialized memory. */
if (Uplo == TestGE)
for (i=0; i < k; i++)
Mjoin(PATL,gegen)(N, N, A+i*incA, lda, N+lda);
++++++ libatlas.ppc64le-abiv2.patch ++++++
From: Michel Normand
Subject: atlas.ppc64le abiv2
Date: Mon, 14 Apr 2014 18:03:06 +0200
References: http://sourceforge.net/p/math-atlas/mailman/message/32471499/
atlas.ppc64le abiv2
* do not use opd section for ABI V2
* define TOC in r2 in function call
TODO: may be not required everywhere.
based on work of Guy and Thierry
TODO: still have to work on stack FSIZE
TODO: for ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c
need to better understand the change about ld pC0
Signed-off-by: Michel Normand
---
ATLAS/CONFIG/src/backend/probe_AltiVec.S | 2 -
ATLAS/CONFIG/src/backend/probe_VSX.S | 2 -
ATLAS/src/threads/ATL_DecAtomicCount_ppc.S | 8 ++++++-
ATLAS/src/threads/ATL_ResetAtomicCount_ppc.S | 8 ++++++-
ATLAS/tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c | 8 ++++++-
ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x2pf_av.c | 10 +++++++--
ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x32_ppc.c | 8 ++++++-
ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c | 26 +++++++++++++++++++++++--
ATLAS/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c | 8 ++++++-
9 files changed, 69 insertions(+), 11 deletions(-)
Index: ATLAS/CONFIG/src/backend/probe_AltiVec.S
===================================================================
--- ATLAS.orig/CONFIG/src/backend/probe_AltiVec.S
+++ ATLAS/CONFIG/src/backend/probe_AltiVec.S
@@ -6,7 +6,7 @@
*
*/
.text
-#if defined(ATL_USE64BITS) && defined (ATL_OS_Linux)
+#if defined(ATL_USE64BITS) && defined (ATL_OS_Linux) && _CALL_ELF != 2
.align 2
.globl ATL_asmdecor(do_vsum)
.section ".opd","aw"
Index: ATLAS/CONFIG/src/backend/probe_VSX.S
===================================================================
--- ATLAS.orig/CONFIG/src/backend/probe_VSX.S
+++ ATLAS/CONFIG/src/backend/probe_VSX.S
@@ -6,7 +6,7 @@
*
*/
.text
-#if defined(ATL_USE64BITS) && defined (ATL_OS_Linux)
+#if defined(ATL_USE64BITS) && defined (ATL_OS_Linux) && _CALL_ELF != 2
.align 2
.globl ATL_asmdecor(do_vsum)
.section ".opd","aw"
Index: ATLAS/src/threads/ATL_DecAtomicCount_ppc.S
===================================================================
--- ATLAS.orig/src/threads/ATL_DecAtomicCount_ppc.S
+++ ATLAS/src/threads/ATL_DecAtomicCount_ppc.S
@@ -4,7 +4,7 @@
.globl _ATL_DecAtomicCount
_ATL_DecAtomicCount:
#else
- #if defined(ATL_USE64BITS)
+ #if defined(ATL_USE64BITS) && _CALL_ELF != 2
/*
* Official Program Descripter section, seg fault w/o it on Linux/PPC64
*/
@@ -22,6 +22,12 @@ ATL_DecAtomicCount:
#else
.globl ATL_DecAtomicCount
ATL_DecAtomicCount:
+ #if _CALL_ELF == 2
+ .type ATL_DecAtomicCount,@function
+0: addis 2,12,.TOC.-0b@ha
+ addi 2,2,.TOC.-0b@l
+ .localentry ATL_DecAtomicCount, .-ATL_DecAtomicCount
+ #endif
#endif
#endif
#error "Code is not reliable on PPC, don't know why"
Index: ATLAS/src/threads/ATL_ResetAtomicCount_ppc.S
===================================================================
--- ATLAS.orig/src/threads/ATL_ResetAtomicCount_ppc.S
+++ ATLAS/src/threads/ATL_ResetAtomicCount_ppc.S
@@ -4,7 +4,7 @@
.globl _ATL_ResetAtomicCount
_ATL_ResetAtomicCount:
#else
- #if defined(ATL_USE64BITS)
+ #if defined(ATL_USE64BITS) && _CALL_ELF != 2
/*
* Official Program Descripter section, seg fault w/o it on Linux/PPC64
*/
@@ -22,6 +22,12 @@ ATL_ResetAtomicCount:
#else
.globl ATL_ResetAtomicCount
ATL_ResetAtomicCount:
+ #if _CALL_ELF == 2
+ .type ATL_ResetAtomicCount,@function
+0: addis 2,12,.TOC.-0b@ha
+ addi 2,2,.TOC.-0b@l
+ .localentry ATL_ResetAtomicCount, .-ATL_ResetAtomicCount
+ #endif
#endif
#endif
/* r3 r3 r4 */
Index: ATLAS/tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c
===================================================================
--- ATLAS.orig/tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c
+++ ATLAS/tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c
@@ -181,7 +181,7 @@ void ATL_USERMM(const int M, const int N
.globl Mjoin(_,ATL_USERMM)
Mjoin(_,ATL_USERMM):
#else
- #if defined(ATL_USE64BITS)
+ #if defined(ATL_USE64BITS) && _CALL_ELF != 2
/*
* Official Program Descripter section, seg fault w/o it on Linux/PPC64
*/
@@ -199,6 +199,12 @@ Mjoin(.,ATL_USERMM):
#else
.globl ATL_USERMM
ATL_USERMM:
+ #if _CALL_ELF == 2
+ .type ATL_USERMM,@function
+0: addis 2,12,.TOC.-0b@ha
+ addi 2,2,.TOC.-0b@l
+ .localentry ATL_USERMM, .-ATL_USERMM
+ #endif
#endif
#endif
/* Save regs */
Index: ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x2pf_av.c
===================================================================
--- ATLAS.orig/tune/blas/gemm/CASES/ATL_dmm4x4x2pf_av.c
+++ ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x2pf_av.c
@@ -279,7 +279,7 @@ void ATL_USERMM(const int M, const int N
#endif
.text
#ifdef ATL_GAS_LINUX_PPC
- #if defined(ATL_USE64BITS)
+ #if defined(ATL_USE64BITS) && _CALL_ELF != 2
/*
* No idea what this does, but seg fault without it (I think it is
* partially resp for making code callable from both static & PIC code)
@@ -296,8 +296,14 @@ ATL_USERMM:
.globl Mjoin(.,ATL_USERMM)
Mjoin(.,ATL_USERMM):
#else
-.globl ATL_USERMM
+ .globl ATL_USERMM
ATL_USERMM:
+ #if _CALL_ELF == 2
+ .type ATL_USERMM,@function
+0: addis 2,12,.TOC.-0b@ha
+ addi 2,2,.TOC.-0b@l
+ .localentry ATL_USERMM, .-ATL_USERMM
+ #endif
#define IROFF 8
#define FROFF IROFF+48
#define FSIZE (((IROFF+FROFF+144+15)/16)*16)
Index: ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x32_ppc.c
===================================================================
--- ATLAS.orig/tune/blas/gemm/CASES/ATL_dmm4x4x32_ppc.c
+++ ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x32_ppc.c
@@ -268,7 +268,7 @@ Mjoin(.,ATL_USERMM):
.globl Mjoin(_,ATL_USERMM)
Mjoin(_,ATL_USERMM):
#else
- #if defined(ATL_USE64BITS)
+ #if defined(ATL_USE64BITS) && _CALL_ELF != 2
/*
* Official Program Descripter section, seg fault w/o it on Linux/PPC64
*/
@@ -285,6 +285,12 @@ Mjoin(.,ATL_USERMM):
#else
.globl ATL_USERMM
ATL_USERMM:
+ #if _CALL_ELF == 2
+ .type ATL_USERMM,@function
+0: addis 2,12,.TOC.-0b@ha
+ addi 2,2,.TOC.-0b@l
+ .localentry ATL_USERMM, .-ATL_USERMM
+ #endif
#endif
#endif
#endif
Index: ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c
===================================================================
--- ATLAS.orig/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c
+++ ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c
@@ -170,13 +170,21 @@ void ATL_USERMM(const int M, const int N
const TYPE beta, TYPE *C, const int ldc)
(r10) 8(r1)
*******************************************************************************
-64 bit ABIs:
+64 bit ABIv1s:
r3 r4 r5 r6/f1
void ATL_USERMM(const int M, const int N, const int K, const TYPE alpha,
r7 r8 r9 r10
const TYPE *A, const int lda, const TYPE *B, const int ldb,
f2 120(r1) 128(r1)
const TYPE beta, TYPE *C, const int ldc)
+
+64 bit ABIv2s:
+ r3 r4 r5 r6/f1
+void ATL_USERMM(const int M, const int N, const int K, const TYPE alpha,
+ r7 r8 r9 r10
+ const TYPE *A, const int lda, const TYPE *B, const int ldb,
+ f2 104(r1) 112(r1)
+ const TYPE beta, TYPE *C, const int ldc)
#endif
#ifdef ATL_AS_AIX_PPC
.csect .text[PR]
@@ -202,7 +210,7 @@ Mjoin(.,ATL_USERMM):
.globl Mjoin(_,ATL_USERMM)
Mjoin(_,ATL_USERMM):
#else
- #if defined(ATL_USE64BITS)
+ #if defined(ATL_USE64BITS) && _CALL_ELF != 2
/*
* Official Program Descripter section, seg fault w/o it on Linux/PPC64
*/
@@ -219,6 +227,12 @@ Mjoin(.,ATL_USERMM):
#else
.globl ATL_USERMM
ATL_USERMM:
+ #if _CALL_ELF == 2
+ .type ATL_USERMM,@function
+0: addis 2,12,.TOC.-0b@ha
+ addi 2,2,.TOC.-0b@l
+ .localentry ATL_USERMM, .-ATL_USERMM
+ #endif
#endif
#endif
#endif
@@ -257,9 +271,17 @@ ATL_USERMM:
#endif
#endif
+
#if defined (ATL_USE64BITS)
+#if _CALL_ELF == 2
+/* ABIv2 */
+ ld pC0, 104(r1)
+ ld incCn, 112(r1)
+#else
+/* ABIv1 */
ld pC0, 120(r1)
ld incCn, 128(r1)
+#endif
#elif defined(ATL_AS_OSX_PPC) || defined(ATL_AS_AIX_PPC)
lwz pC0, 68(r1)
lwz incCn, 72(r1)
Index: ATLAS/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c
===================================================================
--- ATLAS.orig/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c
+++ ATLAS/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c
@@ -196,7 +196,7 @@ void ATL_USERMM(const int M, const int N
.globl Mjoin(_,ATL_USERMM)
Mjoin(_,ATL_USERMM):
#else
- #if defined(ATL_USE64BITS)
+ #if defined(ATL_USE64BITS) && _CALL_ELF != 2
/*
* Official Program Descripter section, seg fault w/o it on Linux/PPC64
*/
@@ -214,6 +214,12 @@ Mjoin(.,ATL_USERMM):
#else
.globl ATL_USERMM
ATL_USERMM:
+ #if _CALL_ELF == 2
+ .type ATL_USERMM,@function
+0: addis 2,12,.TOC.-0b@ha
+ addi 2,2,.TOC.-0b@l
+ .localentry ATL_USERMM, .-ATL_USERMM
+ #endif
#endif
#endif
/*
++++++ xlf.command.not.found.patch ++++++
Subject: xlf.command.not.found
From: Michel Normand
References: http://sourceforge.net/p/math-atlas/mailman/message/32471499/
try to bypass error while building ppc64le
"make[2]: xlf: Command not found"
Signed-off-by: Michel Normand
---
ATLAS/CONFIG/src/atlcomp.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: ATLAS/CONFIG/src/atlcomp.txt
===================================================================
--- ATLAS.orig/CONFIG/src/atlcomp.txt
+++ ATLAS/CONFIG/src/atlcomp.txt
@@ -199,7 +199,7 @@ MACH=POWER6 OS=ALL LVL=1010 COMPS=f77
MACH=POWER5 OS=ALL LVL=1010 COMPS=f77
'gfortran' '-mcpu=power5 -mtune=power5 -O3 -fno-schedule-insns -fno-rerun-loop-opt'
MACH=POWER7 OS=ALL LVL=1010 COMPS=f77
- 'xlf' '-qtune=pwr7 -qarch=pwr7 -O3 -qmaxmem=-1 -qfloat=hsflt'
+ 'gfortran' '-O2 -mvsx -mcpu=power7 -mtune=power7 -m64 -mvrsave -funroll-all-loops'
MACH=POWER5 OS=ALL LVL=1010 COMPS=f77
'xlf' '-qtune=pwr5 -qarch=pwr5 -O3 -qmaxmem=-1 -qfloat=hsflt'
MACH=POWER4 OS=ALL LVL=1010 COMPS=icc,dmc,smc,dkc,skc,xcc,gcc
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org