Rebase to 3.10.1

- Dropped x86_64-SSE2, ix86-SSE1, ix86-3DNow, z10, z196 (uncompilable).
- Modified incompatible patches.
- Added armv7neon support, modified archdef from softfp abi to hard abi.
- Modified Make.lib to include build-id, soname, versioned library name and symlinks.
- Now builds monolithic libsatlas (serial) and libtatlas (threaded)
  libraries with lapack and blas included.
- Lapack source tarball needed instead of static library.
- Disabled cpu throttling detection again (sorry, could not work on atlas
  otherwise, feel free to enable yet again - atlas-throttling.patch).
- Removed mentions of "Fedora" to promote redistribution.
- Modified parts of atlas.spec sometimes left in place, work still in progress,
  cleanup needed.
This commit is contained in:
Frantisek Kluknavsky 2013-09-20 16:01:10 +02:00
parent f974d7b834
commit 62670b4e6a
10 changed files with 535 additions and 632 deletions

5
.gitignore vendored
View File

@ -1,3 +1,8 @@
atlas3.8.3.tar.bz2 atlas3.8.3.tar.bz2
PPRO32.tgz PPRO32.tgz
K7323DNow.tgz K7323DNow.tgz
/atlas3.10.0.tar.bz2
/atlas3.10.1.tar.bz2
/IBMz932.tar.bz2
/IBMz964.tar.bz2
/POWER332.tar.bz2

View File

@ -1,68 +0,0 @@
Notes on the Fedora version of ATLAS
by Quentin Spencer
updated: October 4, 2005
updated by Deji Akingunola
October 15, 2008
updated by Deji Akingunola
June 15, 2011
Because ATLAS relies on compile-time optimizations to obtain improved
performance over BLAS and LAPACK, the resulting binaries are closely
tied to the hardware on which they are compiled, and can likely result
in very poor performance on other hardware. For this reason,
including a package like ATLAS in Fedora requires some compromises.
Firstly, a binary ATLAS package must perform reasonably well on the
entire range of hardware on which it could potentially be installed.
Optimizing ATLAS for the most modern hardware can result in
significant performance penalties for users using the same package on
older hardware. Second, building from the same source package must
result in identical binaries for any computer of a particular
architecture. This is because the binaries installed on a user's
computer are built on a computer in the Fedora Extras build system,
which will have hardware different from the end user's hardware, and
quite possibly different from other available hardware in the build
system.
As of version 3.8.2 (in Fedora), ATLAS builds uses achitectural defaults,
are partial results of past searches when the compiler and architecture
are known, to discover the appropriate kernels used to build all the required
libraries. They make install time quicker and also ensure that good results are
obtained, since they typically represent several searches and/or user
intervention into the usual search so that maximum performance is found.
The result is a set of libraries that will not
necessarily achieve optimal performance on any given hardware but
should still offer significant performance gains over the reference
BLAS and LAPACK libraries on most hardware. The binary package
includes the atlas libraries as well as binary-compatible blas and
lapack libraries that should work as a drop-in replacement for the
standard ones (they are installed in /usr/lib{64}/atlas* rather than
/usr/lib{64}).
For 32bit x86 systems, the default atlas package on was built using Pentium Pro
architectural defaults using just x87 math optimization. In addition to the
base 32bit build, 4 ATLAS subpackages are built for 3Dnow, SSE, SSE2, and SSE3
ix86 extensions, using architectural defaults obtained from Athlon K7, PIII,
Pentium 4 with SSE2 extension and PENTIUM 4 with SSE3 extensions respectively.
On 64bit x86 systems the default atlas package on was built with SSE2 optimization using architetural default made for AMD's HAMMER processor, and an additional
SSE3-enabled subpackage was built also using architetural default made for AMD's HAMMER processor.
This packaging allows multiple installation of different atlas sub-packages
at the same time. The alternatives system (read 'man alternatives' for usage)
is used in the -devel subpackages to select the appropriate location for the
architectural dependent header files.
This package is designed to build RPMs that are identical regardless
of where they are compiled and that provide reasonable performance on
a wide range of hardware. For users who want optimal performance on
particular hardware, custom RPMs can be built from the source package
by setting the RPM macro "enable_native_atlas" to a value of 1. This
can be done from the command line as in the following example:
rpmbuild -D "enable_native_atlas 1" --rebuild atlas-3.8.3-1.src.rpm
This will cause the ATLAS build to use the achitectural default most
appropriate for the system on which the package is to be built.

47
README.dist Normal file
View File

@ -0,0 +1,47 @@
Notes on the packaged version of ATLAS
by Quentin Spencer
updated: October 4, 2005
updated by Deji Akingunola
October 15, 2008
updated by Deji Akingunola
June 15, 2011
updated by Frantisek Kluknavsky
Nov 20, 2012
Because ATLAS relies on compile-time optimizations to obtain improved
performance over BLAS and LAPACK, the resulting binaries are closely
tied to the hardware on which they are compiled, and can likely result
in very poor performance on other hardware. For this reason,
including a package like ATLAS in Fedora requires some compromises.
Optimizing ATLAS for the most modern hardware can result in
significant performance penalties for users using the same package on
older hardware. A binary ATLAS package must perform reasonably well on the
entire range of hardware on which it could potentially be installed.
The result is a set of libraries that will not
necessarily achieve optimal performance on any given hardware but
should still offer significant performance gains over the reference
BLAS and LAPACK libraries on most hardware.
In addition to the base 32bit build, subpackages are built for SSE, SSE2,
and SSE3 ix86 extensions.
On 64bit x86 systems the default atlas package was built with SSE3
optimization.
This packaging allows multiple installation of different atlas sub-packages
at the same time. The alternatives system (read 'man alternatives' for usage)
is used in the -devel subpackages to select the appropriate location for the
architectural dependent header files.
For users who want optimal performance on
particular hardware, custom RPMs can be built from the source package
by setting the RPM macro "enable_native_atlas" to a value of 1. This
can be done from the command line as in the following example:
rpmbuild -D "enable_native_atlas 1" --rebuild atlas-3.8.3-1.src.rpm

View File

@ -1,15 +1,16 @@
diff -up ATLAS/CONFIG/src/SpewMakeInc.c.melf ATLAS/CONFIG/src/SpewMakeInc.c diff --git a/CONFIG/src/SpewMakeInc.c b/CONFIG/src/SpewMakeInc.c
--- ATLAS/CONFIG/src/SpewMakeInc.c.melf 2011-05-14 11:33:24.000000000 -0600 index eed259e..65d68a1 100644
+++ ATLAS/CONFIG/src/SpewMakeInc.c 2012-08-09 10:52:28.051926489 -0600 --- a/CONFIG/src/SpewMakeInc.c
@@ -665,9 +665,9 @@ main(int nargs, char **args) +++ b/CONFIG/src/SpewMakeInc.c
if (MachIsX86(mach)) @@ -764,9 +764,9 @@ int main(int nargs, char **args)
{ else
if (ptrbits == 32) {
- fprintf(fpout, " -melf_i386"); if (ptrbits == 32)
+ fprintf(fpout, " -Wl,-melf_i386"); - fprintf(fpout, " -melf_i386");
else if (ptrbits == 64) + fprintf(fpout, " -Wl,-melf_i386");
- fprintf(fpout, " -melf_x86_64"); else if (ptrbits == 64)
+ fprintf(fpout, " -Wl,-melf_x86_64"); - fprintf(fpout, " -melf_x86_64");
if (OS == OSFreeBSD) + fprintf(fpout, " -Wl,-melf_x86_64");
fprintf(fpout, "_fbsd"); if (OS == OSFreeBSD)
} fprintf(fpout, "_fbsd");
}

View File

@ -1,234 +1,7 @@
--- ---
CONFIG/include/atlconf.h | 18 +++++++-----
CONFIG/src/Makefile | 5 +++
CONFIG/src/SpewMakeInc.c | 5 +++
CONFIG/src/atlcomp.txt | 50 ++++++++++++++++++++++++++++++++++++
CONFIG/src/atlconf_misc.c | 2 +
CONFIG/src/backend/Make.ext | 2 +
CONFIG/src/backend/archinfo_linux.c | 12 ++++++++
CONFIG/src/backend/probe_gas_s390.S | 13 +++++++++ CONFIG/src/backend/probe_gas_s390.S | 13 +++++++++
CONFIG/src/probe_comp.c | 2 +
include/atlas_prefetch.h | 6 ++++
10 files changed, 108 insertions(+), 7 deletions(-) 10 files changed, 108 insertions(+), 7 deletions(-)
Index: b/CONFIG/include/atlconf.h
===================================================================
--- a/CONFIG/include/atlconf.h
+++ b/CONFIG/include/atlconf.h
@@ -14,9 +14,9 @@ enum OSTYPE {OSOther=0, OSLinux, OSSunOS
OSWin9x, OSWinNT, OSHPUX, OSFreeBSD, OSOSX};
#define OSIsWin(OS_) (((OS_) == OSWinNT) || ((OS_) == OSWin9x))
-enum ARCHFAM {AFOther=0, AFPPC, AFSPARC, AFALPHA, AFX86, AFIA64, AFMIPS};
+enum ARCHFAM {AFOther=0, AFPPC, AFSPARC, AFALPHA, AFX86, AFIA64, AFMIPS, AFS390};
-#define NMACH 37
+#define NMACH 42
static char *machnam[NMACH] =
{"UNKNOWN", "POWER3", "POWER4", "POWER5", "PPCG4", "PPCG5",
"POWER6", "POWER7",
@@ -25,7 +25,8 @@ static char *machnam[NMACH] =
"Efficeon", "K7", "HAMMER", "AMD64K10h", "UNKNOWNx86",
"IA64Itan", "IA64Itan2",
"USI", "USII", "USIII", "USIV", "UST2", "UnknownUS",
- "MIPSR1xK", "MIPSICE9"};
+ "MIPSR1xK", "MIPSICE9",
+ "IBMz900", "IBMz990", "IBMz9", "IBMz10", "IBMz196" };
enum MACHTYPE {MACHOther, IbmPwr3, IbmPwr4, IbmPwr5, PPCG4, PPCG5,
IbmPwr6, IbmPwr7,
IntP5, IntP5MMX, IntPPRO, IntPII, IntPIII, IntPM, IntCoreS,
@@ -34,7 +35,8 @@ enum MACHTYPE {MACHOther, IbmPwr3, IbmPw
IA64Itan, IA64Itan2,
SunUSI, SunUSII, SunUSIII, SunUSIV, SunUST2, SunUSX,
MIPSR1xK, /* includes R10K, R12K, R14K, R16K */
- MIPSICE9 /* SiCortex ICE9 -- like MIPS5K */
+ MIPSICE9, /* SiCortex ICE9 -- like MIPS5K */
+ IBMz900, IBMz990, IBMz9, IBMz10, IBMz196 /* s390(x) in Linux */
};
#define MachIsX86(mach_) \
( (mach_) >= IntP5 && (mach_) <= x86X )
@@ -51,6 +53,8 @@ enum MACHTYPE {MACHOther, IbmPwr3, IbmPw
#endif
#define MachIsPPC(mach_) \
( (mach_) >= PPCG4 && (mach_) <= PPCG5 )
+#define MachIsS390(mach_) \
+ ( (mach_) >= IBMz900 && (mach_) <= IBMz196 )
static char *f2c_namestr[5] = {"UNKNOWN","Add_", "Add__", "NoChange", "UpCase"};
static char *f2c_intstr[5] =
@@ -68,13 +72,13 @@ static char *ISAXNAM[NISA] =
{"", "AltiVec", "SSE3", "SSE2", "SSE1", "3DNow"};
enum ISAEXT {ISA_None=0, ISA_AV, ISA_SSE3, ISA_SSE2, ISA_SSE1, ISA_3DNow};
-#define NASMD 7
+#define NASMD 8
enum ASMDIA
{ASM_None=0, gas_x86_32, gas_x86_64, gas_sparc, gas_ppc, gas_parisc,
- gas_mips};
+ gas_mips, gas_s390};
static char *ASMNAM[NASMD] =
{"", "GAS_x8632", "GAS_x8664", "GAS_SPARC", "GAS_PPC", "GAS_PARISC",
- "GAS_MIPS"};
+ "GAS_MIPS", "GAS_S390"};
/*
Index: b/CONFIG/src/Makefile
===================================================================
--- a/CONFIG/src/Makefile
+++ b/CONFIG/src/Makefile
@@ -177,6 +177,11 @@ IRun_GAS_x8632 :
$(MAKE) $(atlrun) atldir=$(mydir) exe=xprobe_gas_x8632 args="$(args)" \
redir=config0.out
- cat config0.out
+IRun_GAS_S390 :
+ $(CC) $(CCFLAGS) -o xprobe_gas_s390 $(SRCdir)/backend/probe_this_asm.c $(SRCdir)/backend/probe_gas_s390.S
+ $(MAKE) $(atlrun) atldir=$(mydir) exe=xprobe_gas_s390 args="$(args)" \
+ redir=config0.out
+ - cat config0.out
IRunC2C :
- rm -f config0.out xc2c c2cslave.o
Index: b/CONFIG/src/SpewMakeInc.c
===================================================================
--- a/CONFIG/src/SpewMakeInc.c
+++ b/CONFIG/src/SpewMakeInc.c
@@ -342,6 +342,9 @@ char *GetPtrbitsFlag(enum OSTYPE OS, enu
return(sp);
if (MachIsMIPS(arch))
return((ptrbits == 64) ? "-mabi=64" : "-mabi=n32");
+ if (MachIsS390(arch))
+ return((ptrbits == 64) ? "-m64" : "-m31");
+
if (!CompIsGcc(comp))
{
/*
@@ -671,6 +674,8 @@ main(int nargs, char **args)
if (OS == OSFreeBSD)
fprintf(fpout, "_fbsd");
}
+ if (MachIsS390(mach))
+ fprintf(fpout, ptrbits == 32 ? "-m31" : "-m64");
fprintf(fpout, "\n F77SYSLIB = %s\n", f77lib ? f77lib : "");
fprintf(fpout, " BC = $(ICC)\n");
fprintf(fpout, " NCFLAGS = $(ICCFLAGS)\n");
Index: b/CONFIG/src/atlcomp.txt
===================================================================
--- a/CONFIG/src/atlcomp.txt
+++ b/CONFIG/src/atlcomp.txt
@@ -164,6 +164,56 @@ MACH=ALL OS=WinNT LVL=0 COMPS=f77
MACH=P4,PM OS=WinNT LVL=0 COMPS=icc,dmc,smc,dkc,skc,xcc
'icl' '-QxN -O3 -Qprec -fp:extended -fp:except -nologo -Oy'
#
+# IBM System z or zEnterprise
+#
+
+# z900 or z800
+MACH=IBMz900 OS=ALL LVL=1000 COMPS=f77
+ 'gfortran' '-march=z900 -O3 -funroll-loops'
+MACH=IBMz900 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc,xcc
+ 'gcc' '-march=z900 -O3 -funroll-loops'
+
+# z990 or z890
+MACH=IBMz990 OS=ALL LVL=1000 COMPS=f77
+ 'gfortran' '-march=z990 -O3 -funroll-loops'
+MACH=IBMz990 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc,xcc
+ 'gcc' '-march=z990 -O3 -funroll-loops'
+
+# z9-EC z9-BC or z9-109
+MACH=IBMz9 OS=ALL LVL=1000 COMPS=f77
+ 'gfortran' '-march=z9-109 -O3 -funroll-loops'
+MACH=IBMz9 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc,xcc
+ 'gcc' '-march=z9-109 -O3 -funroll-loops'
+
+# on z10 and z196 gcc emits prefetches which disturb cache size
+# detection and optimization. Therefore, we use fno-prefetch-loop-arrays
+# z10
+MACH=IBMz10 OS=ALL LVL=1000 COMPS=f77
+ 'gfortran' '-march=z10 -O3 -funroll-loops -fno-prefetch-loop-arrays'
+MACH=IBMz10 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc,xcc
+ 'gcc' '-march=z10 -O3 -funroll-loops -fno-prefetch-loop-arrays'
+
+# z196. we also try to fallback to z10 and z9 for older compilers
+MACH=IBMz196 OS=ALL LVL=1000 COMPS=f77
+ 'gfortran' '-march=z196 -O3 -funroll-loops -fno-prefetch-loop-arrays'
+MACH=IBMz196 OS=ALL LVL=800 COMPS=f77
+ 'gfortran' '-march=z10 -O3 -funroll-loops -fno-prefetch-loop-arrays'
+MACH=IBMz196 OS=ALL LVL=600 COMPS=f77
+ 'gfortran' '-march=z9-109 -O3 -funroll-loops'
+MACH=IBMz196 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc,xcc
+ 'gcc' '-march=z196 -O3 -funroll-loops -fno-prefetch-loop-arrays'
+MACH=IBMz196 OS=ALL LVL=800 COMPS=smc,dmc,skc,dkc,icc,xcc
+ 'gcc' '-march=z10 -O3 -funroll-loops -fno-prefetch-loop-arrays'
+MACH=IBMz196 OS=ALL LVL=600 COMPS=smc,dmc,skc,dkc,icc,xcc
+ 'gcc' '-march=z9-109 -O3 -funroll-loops'
+
+# ALL march options failed, go back to conservative defaults
+MACH=IBMz900,IBMz990,IBMz9,IBMz10,IBMz196 OS=ALL LVL=500 COMPS=f77
+ 'gfortran' '-O3 -funroll-loops'
+MACH=IBMz900,IBMz990,IBMz9,IBMz10,IBMz196 OS=ALL LVL=500 COMPS=smc,dmc,skc,dkc,icc,xcc
+ 'gcc' '-O3 -funroll-loops'
+
+#
# Generic defaults
#
MACH=ALL OS=ALL LVL=5 COMPS=icc,smc,dmc,skc,dkc,xcc
Index: b/CONFIG/src/atlconf_misc.c
===================================================================
--- a/CONFIG/src/atlconf_misc.c
+++ b/CONFIG/src/atlconf_misc.c
@@ -480,6 +480,7 @@ enum ARCHFAM ProbeArchFam(char *targ)
else if (strstr(res, "alpha")) fam = AFALPHA;
else if (strstr(res, "ia64")) fam = AFIA64;
else if (strstr(res, "mips")) fam = AFMIPS;
+ else if (strstr(res, "s390")) fam = AFS390;
else if ( strstr(res, "i686") || strstr(res, "i586") ||
strstr(res, "i486") || strstr(res, "i386") ||
strstr(res, "x86") || strstr(res, "x86_64") ) fam = AFX86;
@@ -501,6 +502,7 @@ enum ARCHFAM ProbeArchFam(char *targ)
strstr(res, "i486") || strstr(res, "i386") ||
strstr(res, "x86_64") ) fam = AFX86;
else if (strstr(res, "mips")) fam = AFMIPS;
+ else if (strstr(res, "s390")) fam = AFS390;
}
}
return(fam);
Index: b/CONFIG/src/backend/Make.ext
===================================================================
--- a/CONFIG/src/backend/Make.ext
+++ b/CONFIG/src/backend/Make.ext
@@ -43,6 +43,8 @@ probe_gas_parisc.S : $(basf)
$(extC) -b $(basf) -o probe_gas_parisc.S rout=probe_gas_parisc.S
probe_gas_mips.S : $(basf)
$(extC) -b $(basf) -o probe_gas_mips.S rout=probe_gas_mips.S
+probe_gas_s390.S : $(basf)
+ $(extC) -b $(basf) -o probe_gas_s390.S rout=probe_gas_s390.S
probe_SSE3.S : $(basf)
$(extC) -b $(basf) -o probe_SSE3.S rout=probe_SSE3.S
probe_SSE2.S : $(basf)
Index: b/CONFIG/src/backend/archinfo_linux.c
===================================================================
--- a/CONFIG/src/backend/archinfo_linux.c
+++ b/CONFIG/src/backend/archinfo_linux.c
@@ -193,6 +193,18 @@ enum MACHTYPE ProbeArch()
}
#endif
break;
+ case AFS390:
+ if ( !CmndOneLine(NULL, "cat /proc/cpuinfo | fgrep \"processor \"", res) )
+ {
+ if (strstr(res, "2064") || strstr(res, "2066")) mach = IBMz900;
+ else if (strstr(res, "2084") || strstr(res, "2086")) mach = IBMz990;
+ else if (strstr(res, "2094") || strstr(res, "2096")) mach = IBMz9;
+ else if (strstr(res, "2097") || strstr(res, "2098")) mach = IBMz10;
+ /* we consider anything else to be a z196 or later */
+ else mach = IBMz196;
+ }
+ break;
+
default:
#if 0
if (!CmndOneLine(NULL, "fgrep 'cpu family' /proc/cpuinfo", res))
Index: b/CONFIG/src/backend/probe_gas_s390.S Index: b/CONFIG/src/backend/probe_gas_s390.S
=================================================================== ===================================================================
--- /dev/null --- /dev/null
@ -247,33 +20,4 @@ Index: b/CONFIG/src/backend/probe_gas_s390.S
+ ar r2,r3 + ar r2,r3
+ ar r2,r3 + ar r2,r3
+ br r14 + br r14
Index: b/CONFIG/src/probe_comp.c
===================================================================
--- a/CONFIG/src/probe_comp.c
+++ b/CONFIG/src/probe_comp.c
@@ -509,6 +509,8 @@ char *GetPtrbitsFlag(enum OSTYPE OS, enu
return(sp);
if (MachIsMIPS(arch))
return((ptrbits == 64) ? "-mabi=64" : "-mabi=n32");
+ if (MachIsS390(arch))
+ return((ptrbits == 64) ? "-m64" : "-m31");
if (!CompIsGcc(comp))
{
/*
Index: b/include/atlas_prefetch.h
===================================================================
--- a/include/atlas_prefetch.h
+++ b/include/atlas_prefetch.h
@@ -149,6 +149,12 @@
#define ATL_GOT_L1PREFETCH
#define ATL_L1LS 32
#define ATL_L2LS 64
+#elif defined(ATL_ARCH_IBMz196) || defined(ATL_ARCH_IBMz10)
+ #define ATL_pfl1R(mem) __builtin_prefetch(mem, 0, 3)
+ #define ATL_pfl1W(mem) __builtin_prefetch(mem, 1, 3)
+ #define ATL_GOT_L1PREFETCH
+ #define ATL_L1LS 256
+ #define ATL_L2LS 256
#elif defined(__GNUC__) /* last ditch, use gcc predefined func */
#define ATL_pfl1R(mem) __builtin_prefetch(mem, 0, 3)
#define ATL_pfl1W(mem) __builtin_prefetch(mem, 1, 3)

View File

@ -0,0 +1,40 @@
From 3119c671c566761a79ac98405cb619892acde3e8 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Fri, 20 Sep 2013 09:26:58 +0200
Subject: [PATCH] atlas-shared_libraries
---
ATLAS/makes/Make.lib | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/ATLAS/makes/Make.lib b/ATLAS/makes/Make.lib
index ab1eb9963d36678972a0a410905169aaa563dc64..27c6e316b442e09b0f46afac7940aaa11e25e45c 100644
--- a/ATLAS/makes/Make.lib
+++ b/ATLAS/makes/Make.lib
@@ -4,6 +4,8 @@ mySRCdir = $(SRCdir)/lib
#
# override with libatlas.so only when atlas is built to one lib
#
+so_ver_major=3
+so_ver = $(so_ver_major).10
DYNlibs = liblapack.so libf77blas.so libcblas.so libatlas.so
PTDYNlibs = liblapack.so libptf77blas.so libptcblas.so libatlas.so
CDYNlibs = liblapack.so libcblas.so libatlas.so
@@ -116,9 +118,12 @@ LDTRY:
-rpath-link $(LIBINSTdir) \
--whole-archive $(libas) --no-whole-archive $(LIBS)
GCCTRY:
- $(GOODGCC) -shared -o $(outso) \
- -Wl,"rpath-link $(LIBINSTdir)" \
+ $(GOODGCC) -shared -o $(outso).$(so_ver) \
+ \
+ -Wl,-soname,"$(outso).$(so_ver_major)" \
-Wl,--whole-archive $(libas) -Wl,--no-whole-archive $(LIBS)
+ ln -s $(outso).$(so_ver) $(outso).$(so_ver_major)
+ ln -s $(outso).$(so_ver) $(outso)
GCCTRY_norp:
$(GOODGCC) -shared -o $(outso) \
-Wl,--whole-archive $(libas) -Wl,--no-whole-archive $(LIBS)
--
1.8.3.1

12
atlas-throttling.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up ATLAS/CONFIG/src/config.c.zaloha ATLAS/CONFIG/src/config.c
--- ATLAS/CONFIG/src/config.c.zaloha 2012-10-25 11:29:02.495425989 +0200
+++ ATLAS/CONFIG/src/config.c 2012-10-25 11:42:10.218216957 +0200
@@ -711,6 +711,8 @@ int ProbePtrbits(int verb, char *targarg
int ProbeCPUThrottle(int verb, char *targarg, enum OSTYPE OS, enum ASMDIA asmb)
{
+ return 0; /* impossible to turn off cpu throttling => ignore */
+ /* this undermines performance of compiled library */
int i, iret;
char *ln;
i = strlen(targarg) + 22 + 12;

View File

@ -1,11 +1,11 @@
%define enable_native_atlas 0 %define enable_native_atlas 0
Name: atlas Name: atlas
Version: 3.8.4 Version: 3.10.1
%if "%{?enable_native_atlas}" != "0" %if "%{?enable_native_atlas}" != "0"
%define dist .native %define dist .native
%endif %endif
Release: 9%{?dist} Release: 1%{?dist}
Summary: Automatically Tuned Linear Algebra Software Summary: Automatically Tuned Linear Algebra Software
Group: System Environment/Libraries Group: System Environment/Libraries
@ -13,23 +13,50 @@ License: BSD
URL: http://math-atlas.sourceforge.net/ URL: http://math-atlas.sourceforge.net/
Source0: http://downloads.sourceforge.net/math-atlas/%{name}%{version}.tar.bz2 Source0: http://downloads.sourceforge.net/math-atlas/%{name}%{version}.tar.bz2
Source1: PPRO32.tgz Source1: PPRO32.tgz
Source2: K7323DNow.tgz #Source2: K7323DNow.tgz
Source3: README.Fedora Source3: README.dist
Source4: USII64.tgz #Source4: USII64.tgz
Source5: USII32.tgz #Source5: USII32.tgz
Source6: IBMz1032.tgz #Source6: IBMz1032.tgz
Source7: IBMz1064.tgz #Source7: IBMz1064.tgz
Source8: IBMz19632.tgz #Source8: IBMz19632.tgz
Source9: IBMz19664.tgz #Source9: IBMz19664.tgz
Patch0: atlas-fedora_shared.patch Source10: lapack-3.4.2-clean.tgz
#archdefs taken from debian:
Source11: POWER332.tar.bz2
Source12: IBMz932.tar.bz2
Source13: IBMz964.tar.bz2
#upstream arm uses softfp abi, fedora arm uses hard
Source14: ARMv732NEON.tar.bz2
Patch1: atlas-s390port.patch Patch1: atlas-s390port.patch
Patch2: atlas-fedora-arm.patch Patch2: atlas-fedora-arm.patch
# Properly pass -melf_* to the linker with -Wl, fixes FTBFS bug 817552 # Properly pass -melf_* to the linker with -Wl, fixes FTBFS bug 817552
# https://sourceforge.net/tracker/?func=detail&atid=379484&aid=3555789&group_id=23725 # https://sourceforge.net/tracker/?func=detail&atid=379484&aid=3555789&group_id=23725
Patch3: atlas-melf.patch Patch3: atlas-melf.patch
Patch4: atlas-throttling.patch
#credits Lukas Slebodnik
Patch5: atlas-shared_libraries.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-gfortran lapack-static BuildRequires: gcc-gfortran
%ifarch x86_64
Obsoletes: atlas-sse3 < 3.10
%endif
%ifarch %{ix86}
Obsoletes: atlas-3dnow < 3.10
Obsoletes: atlas-sse < 3.10
%endif
%ifarch s390 s390x
Obsoletes: atlas-z10 < 3.10
Obsoletes: atlas-z196 < 3.10
%endif
%description %description
The ATLAS (Automatically Tuned Linear Algebra Software) project is an The ATLAS (Automatically Tuned Linear Algebra Software) project is an
@ -40,7 +67,7 @@ well as a few routines from LAPACK.
The performance improvements in ATLAS are obtained largely via The performance improvements in ATLAS are obtained largely via
compile-time optimizations and tend to be specific to a given hardware compile-time optimizations and tend to be specific to a given hardware
configuration. In order to package ATLAS for Fedora some compromises configuration. In order to package ATLAS some compromises
are necessary so that good performance can be obtained on a variety are necessary so that good performance can be obtained on a variety
of hardware. This set of ATLAS binary packages is therefore not of hardware. This set of ATLAS binary packages is therefore not
necessarily optimal for any specific hardware configuration. However, necessarily optimal for any specific hardware configuration. However,
@ -59,87 +86,54 @@ Requires(preun): chkconfig
This package contains the libraries and headers for development This package contains the libraries and headers for development
with ATLAS (Automatically Tuned Linear Algebra Software). with ATLAS (Automatically Tuned Linear Algebra Software).
%package static
Summary: Static libraries for ATLAS
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Requires(posttrans): chkconfig
Requires(preun): chkconfig
%description static
This package contains static version of ATLAS (Automatically Tuned
Linear Algebra Software).
%define types base %define types base
%if "%{?enable_native_atlas}" == "0" %if "%{?enable_native_atlas}" == "0"
############## Subpackages for architecture extensions ################# ############## Subpackages for architecture extensions #################
# #
%ifarch x86_64 %ifarch x86_64
%define types base sse3 %define types base
# sse3
%package sse3 #package sse3
Summary: ATLAS libraries for SSE3 extensions #Summary: ATLAS libraries for SSE3 extensions
Group: System Environment/Libraries #Group: System Environment/Libraries
%description sse3 #description sse3
This package contains the ATLAS (Automatically Tuned Linear Algebra #This package contains the ATLAS (Automatically Tuned Linear Algebra
Software) libraries compiled with optimizations for the SSE3 #Software) libraries compiled with optimizations for the SSE3
extensions to the x86_64 architecture. The base ATLAS builds in Fedora for the #extensions to the x86_64 architecture. The base ATLAS builds for the
x86_64 architecture are made for the SSE2 extensions. #x86_64 architecture are made for the SSE2 extensions.
%package sse3-devel #package sse3-devel
Summary: Development libraries for ATLAS with SSE3 extensions #Summary: Development libraries for ATLAS with SSE3 extensions
Group: Development/Libraries #Group: Development/Libraries
Requires: %{name}-sse3 = %{version}-%{release} #Requires: %{name}-sse3 = %{version}-%{release}
Obsoletes: %name-header <= %version-%release #Obsoletes: %name-header <= %version-%release
Requires(posttrans): chkconfig #Requires(posttrans): chkconfig
Requires(preun): chkconfig #Requires(preun): chkconfig
%description sse3-devel #description sse3-devel
This package contains shared and static versions of the ATLAS #This package contains shared and static versions of the ATLAS
(Automatically Tuned Linear Algebra Software) libraries compiled with #(Automatically Tuned Linear Algebra Software) libraries compiled with
optimizations for the SSE3 extensions to the x86_64 architecture. #optimizations for the SSE3 extensions to the x86_64 architecture.
%endif %endif
%ifarch %{ix86} %ifarch %{ix86}
%define types base 3dnow sse sse2 sse3 %define types base sse2 sse3
%package 3dnow
Summary: ATLAS libraries for 3DNow extensions
Group: System Environment/Libraries
%description 3dnow
This package contains the ATLAS (Automatically Tuned Linear Algebra
Software) libraries compiled with optimizations for the 3DNow extension
to the ix86 architecture. Fedora also produces ATLAS build with SSE, SSE2
and SSE3 extensions.
%package 3dnow-devel
Summary: Development libraries for ATLAS with 3DNow extensions
Group: Development/Libraries
Requires: %{name}-3dnow = %{version}-%{release}
Obsoletes: %name-header <= %version-%release
Requires(posttrans): chkconfig
Requires(preun): chkconfig
%description 3dnow-devel
This package contains headers and shared versions of the ATLAS
(Automatically Tuned Linear Algebra Software) libraries compiled with
optimizations for the 3DNow extensions to the ix86 architecture.
%package sse
Summary: ATLAS libraries for SSE extensions
Group: System Environment/Libraries
%description sse
This package contains the ATLAS (Automatically Tuned Linear Algebra
Software) libraries compiled with optimizations for the SSE(1) extensions
to the ix86 architecture. Fedora also produces ATLAS build with SSE2 and SSE3
extensions.
%package sse-devel
Summary: Development libraries for ATLAS with SSE extensions
Group: Development/Libraries
Requires: %{name}-sse = %{version}-%{release}
Obsoletes: %name-header <= %version-%release
Requires(posttrans): chkconfig
Requires(preun): chkconfig
%description sse-devel
This package contains headers and shared versions of the ATLAS
(Automatically Tuned Linear Algebra Software) libraries compiled with
optimizations for the SSE(1) extensions to the ix86 architecture.
%package sse2 %package sse2
Summary: ATLAS libraries for SSE2 extensions Summary: ATLAS libraries for SSE2 extensions
@ -148,8 +142,8 @@ Group: System Environment/Libraries
%description sse2 %description sse2
This package contains ATLAS (Automatically Tuned Linear Algebra Software) This package contains ATLAS (Automatically Tuned Linear Algebra Software)
shared libraries compiled with optimizations for the SSE2 shared libraries compiled with optimizations for the SSE2
extensions to the ix86 architecture. Fedora also produces ATLAS build with extensions to the ix86 architecture. ATLAS builds with
SSE(1) and SSE3 extensions. SSE(1) and SSE3 extensions also exist.
%package sse2-devel %package sse2-devel
Summary: Development libraries for ATLAS with SSE2 extensions Summary: Development libraries for ATLAS with SSE2 extensions
@ -164,6 +158,19 @@ This package contains ATLAS (Automatically Tuned Linear Algebra Software)
shared libraries compiled with optimizations for the SSE2 extensions to the shared libraries compiled with optimizations for the SSE2 extensions to the
ix86 architecture. ix86 architecture.
%package sse2-static
Summary: Static libraries for ATLAS with SSE2 extensions
Group: Development/Libraries
Requires: %{name}-sse2-devel = %{version}-%{release}
Requires(posttrans): chkconfig
Requires(preun): chkconfig
%description sse2-static
This package contains ATLAS (Automatically Tuned Linear Algebra Software)
static libraries compiled with optimizations for the SSE2 extensions to the
ix86 architecture.
%package sse3 %package sse3
Summary: ATLAS libraries for SSE3 extensions Summary: ATLAS libraries for SSE3 extensions
Group: System Environment/Libraries Group: System Environment/Libraries
@ -171,7 +178,7 @@ Group: System Environment/Libraries
%description sse3 %description sse3
This package contains the ATLAS (Automatically Tuned Linear Algebra This package contains the ATLAS (Automatically Tuned Linear Algebra
Software) libraries compiled with optimizations for the SSE3. Software) libraries compiled with optimizations for the SSE3.
Fedora also produces ATLAS build with SSE(1) and SSE2 extensions. ATLAS builds with SSE(1) and SSE2 extensions also exist.
%package sse3-devel %package sse3-devel
Summary: Development libraries for ATLAS with SSE3 extensions Summary: Development libraries for ATLAS with SSE3 extensions
@ -185,82 +192,130 @@ Requires(preun): chkconfig
This package contains ATLAS (Automatically Tuned Linear Algebra Software) This package contains ATLAS (Automatically Tuned Linear Algebra Software)
shared libraries compiled with optimizations for the SSE3 extensions to the ix86 architecture. shared libraries compiled with optimizations for the SSE3 extensions to the ix86 architecture.
%package sse3-static
Summary: Static libraries for ATLAS with SSE2 extensions
Group: Development/Libraries
Requires: %{name}-sse2-devel = %{version}-%{release}
Requires(posttrans): chkconfig
Requires(preun): chkconfig
%description sse3-static
This package contains ATLAS (Automatically Tuned Linear Algebra Software)
static libraries compiled with optimizations for the SSE3 extensions to the
ix86 architecture.
%endif %endif
%ifarch s390 s390x %ifarch s390 s390x
%define types base z10 z196 %define types base
#z196
#z10
%package z196 #%package z196
Summary: ATLAS libraries for z196 #Summary: ATLAS libraries for z196
Group: System Environment/Libraries #Group: System Environment/Libraries
#
#%description z196
#This package contains the ATLAS (Automatically Tuned Linear Algebra
#Software) libraries compiled with optimizations for the z196.
#
#%package z196-devel
#Summary: Development libraries for ATLAS for z196
#Group: Development/Libraries
#Requires: %{name}-z196 = %{version}-%{release}
#Obsoletes: %name-header <= %version-%release
#Requires(posttrans): chkconfig
#Requires(preun): chkconfig
#
#%description z196-devel
#This package contains headers and shared versions of the ATLAS
#(Automatically Tuned Linear Algebra Software) libraries compiled with
#optimizations for the z196 architecture.
%description z196 #%package z196-static
This package contains the ATLAS (Automatically Tuned Linear Algebra #Summary: Static libraries for ATLAS
Software) libraries compiled with optimizations for the z196. #Group: Development/Libraries
#Requires: %{name}-devel = %{version}-%{release}
#Requires(posttrans): chkconfig
#Requires(preun): chkconfig
%package z196-devel #%description z196-static
Summary: Development libraries for ATLAS for z196 #This package contains static version of ATLAS (Automatically Tuned
Group: Development/Libraries #Linear Algebra Software) for the z196 architecture.
Requires: %{name}-z196 = %{version}-%{release}
Obsoletes: %name-header <= %version-%release
Requires(posttrans): chkconfig
Requires(preun): chkconfig
%description z196-devel
This package contains headers and shared versions of the ATLAS
(Automatically Tuned Linear Algebra Software) libraries compiled with
optimizations for the z196 architecture.
%package z10 #%package z10
Summary: ATLAS libraries for z10 #Summary: ATLAS libraries for z10
Group: System Environment/Libraries #Group: System Environment/Libraries
#
#%description z10
#This package contains the ATLAS (Automatically Tuned Linear Algebra
#Software) libraries compiled with optimizations for the z10.
#
#%package z10-devel
#Summary: Development libraries for ATLAS for z10
#Group: Development/Libraries
#Requires: %{name}-z10 = %{version}-%{release}
#Obsoletes: %name-header <= %version-%release
#Requires(posttrans): chkconfig
#Requires(preun): chkconfig
#
#%description z10-devel
#This package contains headers and shared versions of the ATLAS
#(Automatically Tuned Linear Algebra Software) libraries compiled with
#optimizations for the z10 architecture.
#
#%package z10-static
#Summary: Static libraries for ATLAS
#Group: Development/Libraries
#Requires: %{name}-devel = %{version}-%{release}
#Requires(posttrans): chkconfig
#Requires(preun): chkconfig
#
#%description z10-static
#This package contains static version of ATLAS (Automatically Tuned
#Linear Algebra Software) for the z10 architecture.
%description z10
This package contains the ATLAS (Automatically Tuned Linear Algebra
Software) libraries compiled with optimizations for the z10.
%package z10-devel
Summary: Development libraries for ATLAS for z10
Group: Development/Libraries
Requires: %{name}-z10 = %{version}-%{release}
Obsoletes: %name-header <= %version-%release
Requires(posttrans): chkconfig
Requires(preun): chkconfig
%description z10-devel
This package contains headers and shared versions of the ATLAS
(Automatically Tuned Linear Algebra Software) libraries compiled with
optimizations for the z10 architecture.
%endif %endif
%endif %endif
%global mode %{__isa_bits}
%ifarch %{arm} %ifarch %{arm}
%define arch_option -A 38 #beware - arch constant can change between releases
%define arch_option -A 46
%define threads_option -t 2 %define threads_option -t 2
%global mode ' ' %global armflags -mfpu=neon -mfloat-abi=hard
%global mode %{nil}
%else
%global mode -b %{__isa_bits}
%global armflags %{nil}
%endif %endif
%prep %prep
#uname -a
#cat /proc/cpuinfo
%setup -q -n ATLAS %setup -q -n ATLAS
%patch0 -p0 -b .shared #patch0 -p0 -b .shared
%ifarch s390 s390x %ifarch s390 s390x
%patch1 -p1 -b .s390 %patch1 -p1 -b .s390
%endif %endif
%ifarch %{arm} #arm patch not applicable, probably not needed
%patch2 -p0 -b .arm #%ifarch %{arm}
%endif #%patch2 -p0 -b .arm
#%endif
%patch3 -p1 -b .melf %patch3 -p1 -b .melf
%patch4 -p1 -b .thrott
%patch5 -p2 -b .sharedlib
#%patch6 -p1 -b .m32
cp %{SOURCE1} CONFIG/ARCHS/ cp %{SOURCE1} CONFIG/ARCHS/
cp %{SOURCE2} CONFIG/ARCHS/ #cp %{SOURCE2} CONFIG/ARCHS/
cp %{SOURCE3} doc cp %{SOURCE3} doc
cp %{SOURCE4} CONFIG/ARCHS/ cp %{SOURCE11} CONFIG/ARCHS/
cp %{SOURCE5} CONFIG/ARCHS/ cp %{SOURCE12} CONFIG/ARCHS/
cp %{SOURCE6} CONFIG/ARCHS/ cp %{SOURCE13} CONFIG/ARCHS/
cp %{SOURCE7} CONFIG/ARCHS/ cp %{SOURCE14} CONFIG/ARCHS/
cp %{SOURCE8} CONFIG/ARCHS/ #cp %{SOURCE8} CONFIG/ARCHS/
cp %{SOURCE9} CONFIG/ARCHS/ #cp %{SOURCE9} CONFIG/ARCHS/
%build %build
for type in %{types}; do for type in %{types}; do
@ -270,22 +325,34 @@ for type in %{types}; do
else else
libname=atlas-${type} libname=atlas-${type}
fi fi
mkdir -p %{_arch}_${type} mkdir -p %{_arch}_${type}
pushd %{_arch}_${type} pushd %{_arch}_${type}
../configure -b %{mode} %{?threads_option} %{?arch_option} -D c -DWALL -Fa alg '-g -Wa,--noexecstack -fPIC'\ ../configure %{mode} %{?threads_option} %{?arch_option} -D c -DWALL -Fa alg '%{armflags} -g -Wa,--noexecstack -fPIC'\
--prefix=%{buildroot}%{_prefix} \ --prefix=%{buildroot}%{_prefix} \
--incdir=%{buildroot}%{_includedir} \ --incdir=%{buildroot}%{_includedir} \
--libdir=%{buildroot}%{_libdir}/${libname} \ --libdir=%{buildroot}%{_libdir}/${libname} \
--with-netlib-lapack=%{_libdir}/liblapack_pic.a --with-netlib-lapack-tarfile=%{SOURCE10}
%if "%{?enable_native_atlas}" == "0" %if "%{?enable_native_atlas}" == "0"
%ifarch x86_64 %ifarch x86_64
if [ "$type" = "base" ]; then if [ "$type" = "base" ]; then
sed -i 's#ARCH =.*#ARCH = HAMMER64SSE2#' Make.inc # sed -i 's#ARCH =.*#ARCH = HAMMER64SSE2#' Make.inc
sed -i 's#-DATL_SSE3##' Make.inc
sed -i 's#-msse3#-msse2#' Make.inc
elif [ "$type" = "sse3" ]; then
sed -i 's#ARCH =.*#ARCH = HAMMER64SSE3#' Make.inc sed -i 's#ARCH =.*#ARCH = HAMMER64SSE3#' Make.inc
# sed -i 's#-DATL_SSE3##' Make.inc
sed -i 's#-DATL_AVX##' Make.inc
# sed -i 's#-msse3#-msse2#' Make.inc
sed -i 's#-mavx#-msse3#' Make.inc
echo 'base makefile edited'
# sed -i 's#PMAKE = $(MAKE) .*#PMAKE = $(MAKE) -j 1#' Make.inc
elif [ "$type" = "sse3" ]; then
# sed -i 's#ARCH =.*#ARCH = Corei264AVX#' Make.inc
# sed -i 's#PMAKE = $(MAKE) .*#PMAKE = $(MAKE) -j 1#' Make.inc
sed -i 's#-DATL_AVX##' Make.inc
sed -i 's#-DATL_SSE2##' Make.inc
sed -i 's#-mavx#-msse2#' Make.inc
sed -i 's#-msse3#-msse2#' Make.inc
echo 'sse makefile edited'
%define pr_sse3 %(echo $((%{__isa_bits}+4))) %define pr_sse3 %(echo $((%{__isa_bits}+4)))
fi fi
%endif %endif
@ -293,21 +360,20 @@ for type in %{types}; do
%ifarch %{ix86} %ifarch %{ix86}
if [ "$type" = "base" ]; then if [ "$type" = "base" ]; then
sed -i 's#ARCH =.*#ARCH = PPRO32#' Make.inc sed -i 's#ARCH =.*#ARCH = PPRO32#' Make.inc
sed -i 's#-DATL_SSE3 -DATL_SSE2 -DATL_SSE1##' Make.inc #sed -i 's#-DATL_SSE3 -DATL_SSE2 -DATL_SSE1##' Make.inc
sed -i 's#-DATL_SSE3##' Make.inc
sed -i 's#-DATL_SSE2##' Make.inc
sed -i 's#-DATL_SSE1##' Make.inc
sed -i 's#-mfpmath=sse -msse3#-mfpmath=387#' Make.inc sed -i 's#-mfpmath=sse -msse3#-mfpmath=387#' Make.inc
elif [ "$type" = "3dnow" ]; then
sed -i 's#ARCH =.*#ARCH = K7323DNow#' Make.inc
sed -i 's#-DATL_SSE3 -DATL_SSE2 -DATL_SSE1##' Make.inc
sed -i 's#-mfpmath=sse -msse3#-mfpmath=387#' Make.inc
%define pr_3dnow %(echo $((%{__isa_bits}+1)))
elif [ "$type" = "sse" ]; then elif [ "$type" = "sse" ]; then
sed -i 's#ARCH =.*#ARCH = PIII32SSE1#' Make.inc sed -i 's#ARCH =.*#ARCH = PIII32SSE1#' Make.inc
sed -i 's#-DATL_SSE3 -DATL_SSE2##' Make.inc sed -i 's#-DATL_SSE3#-DATL_SSE1#' Make.inc
sed -i 's#-msse3#-msse#' Make.inc sed -i 's#-msse3#-msse#' Make.inc
%define pr_sse %(echo $((%{__isa_bits}+2))) %define pr_sse %(echo $((%{__isa_bits}+2)))
elif [ "$type" = "sse2" ]; then elif [ "$type" = "sse2" ]; then
sed -i 's#ARCH =.*#ARCH = P432SSE2#' Make.inc # sed -i 's#ARCH =.*#ARCH = P432SSE2#' Make.inc
sed -i 's#-DATL_SSE3##' Make.inc sed -i 's#ARCH =.*#ARCH = x86SSE232SSE2#' Make.inc
sed -i 's#-DATL_SSE3#-DATL_SSE2#' Make.inc
sed -i 's#-msse3#-msse2#' Make.inc sed -i 's#-msse3#-msse2#' Make.inc
%define pr_sse2 %(echo $((%{__isa_bits}+3))) %define pr_sse2 %(echo $((%{__isa_bits}+3)))
elif [ "$type" = "sse3" ]; then elif [ "$type" = "sse3" ]; then
@ -322,31 +388,35 @@ for type in %{types}; do
# the base support will use z196 tuning # the base support will use z196 tuning
if [ "$type" = "base" ]; then if [ "$type" = "base" ]; then
%ifarch s390x %ifarch s390x
sed -i 's#ARCH =.*#ARCH = IBMz19664#' Make.inc sed -i 's#ARCH =.*#ARCH = IBMz964#' Make.inc
%endif %endif
%ifarch s390 %ifarch s390
sed -i 's#ARCH =.*#ARCH = IBMz19632#' Make.inc sed -i 's#ARCH =.*#ARCH = IBMz932#' Make.inc
%endif %endif
sed -i 's#-march=z196#-march=z9-109 -mtune=z196#' Make.inc sed -i 's#-march=z196#-march=z9-109 -mtune=z196#' Make.inc
sed -i 's#-march=z10 -mtune=z196#-march=z9-109 -mtune=z196#' Make.inc # sed -i 's#-march=z10 -mtune=z196#-march=z9-109 -mtune=z196#' Make.inc
sed -i 's#-march=z10#-march=z9-109 -mtune=z10#' Make.inc sed -i 's#-march=z10#-march=z9-109 -mtune=z10#' Make.inc
sed -i 's#-DATL_ARCH_IBMz196#-DATL_ARCH_IBMz9#' Make.inc sed -i 's#-DATL_ARCH_IBMz196#-DATL_ARCH_IBMz9#' Make.inc
sed -i 's#-DATL_ARCH_IBMz10#-DATL_ARCH_IBMz9#' Make.inc sed -i 's#-DATL_ARCH_IBMz10#-DATL_ARCH_IBMz9#' Make.inc
sed -i 's#-DATL_ARCH_IBMz9#-DATL_ARCH_IBMz9#' Make.inc # sed -i 's#-DATL_ARCH_IBMz9#-DATL_ARCH_IBMz9#' Make.inc
elif [ "$type" = "z10" ]; then elif [ "$type" = "z10" ]; then
%ifarch s390x %ifarch s390x
# cat Make.inc | grep "ARCH ="
sed -i 's#ARCH =.*#ARCH = IBMz1064#' Make.inc sed -i 's#ARCH =.*#ARCH = IBMz1064#' Make.inc
%endif %endif
%ifarch s390 %ifarch s390
sed -i 's#ARCH =.*#ARCH = IBMz1032#' Make.inc sed -i 's#ARCH =.*#ARCH = IBMz1032#' Make.inc
# cat Make.inc | grep "ARCH ="
%endif %endif
sed -i 's#-march=z196#-march=z10#' Make.inc sed -i 's#-march=z196#-march=z10#' Make.inc
sed -i 's#-march=z10 -mtune=z196#-march=z10#' Make.inc sed -i 's#-mtune=z196##' Make.inc
sed -i 's#-march=z9-109#-march=z10#' Make.inc sed -i 's#-march=z9-109#-march=z10#' Make.inc
sed -i 's#-DATL_ARCH_IBMz196#-DATL_ARCH_IBMz10#' Make.inc sed -i 's#-DATL_ARCH_IBMz196#-DATL_ARCH_IBMz10#' Make.inc
sed -i 's#-DATL_ARCH_IBMz9#-DATL_ARCH_IBMz10#' Make.inc sed -i 's#-DATL_ARCH_IBMz9#-DATL_ARCH_IBMz10#' Make.inc
%define pr_z10 %(echo $((%{__isa_bits}+1))) %define pr_z10 %(echo $((%{__isa_bits}+1)))
elif [ "$type" = "z196" ]; then elif [ "$type" = "z196" ]; then
%ifarch s390x %ifarch s390x
sed -i 's#ARCH =.*#ARCH = IBMz19664#' Make.inc sed -i 's#ARCH =.*#ARCH = IBMz19664#' Make.inc
%endif %endif
@ -362,6 +432,16 @@ for type in %{types}; do
fi fi
%endif %endif
%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
%endif %endif
make build make build
cd lib cd lib
@ -370,8 +450,7 @@ for type in %{types}; do
popd popd
done done
%install %install
rm -rf %{buildroot}
for type in %{types}; do for type in %{types}; do
pushd %{_arch}_${type} pushd %{_arch}_${type}
make DESTDIR=%{buildroot} install make DESTDIR=%{buildroot} install
@ -379,9 +458,11 @@ for type in %{types}; do
if [ "$type" = "base" ]; then if [ "$type" = "base" ]; then
cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas/ cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas/
rm -f %{buildroot}%{_libdir}/atlas/*.a rm -f %{buildroot}%{_libdir}/atlas/*.a
cp -pr lib/libatlas.a %{buildroot}%{_libdir}/atlas/
else else
cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas-${type}/ cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas-${type}/
rm -f %{buildroot}%{_libdir}/atlas-${type}/*.a rm -f %{buildroot}%{_libdir}/atlas-${type}/*.a
cp -pr lib/libatlas.a %{buildroot}%{_libdir}/atlas-${type}/
fi fi
popd popd
@ -397,9 +478,6 @@ done
mkdir -p %{buildroot}%{_includedir}/atlas mkdir -p %{buildroot}%{_includedir}/atlas
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
@ -416,55 +494,55 @@ if [ $1 -ge 0 ] ; then
fi fi
%if "%{?enable_native_atlas}" == "0" %if "%{?enable_native_atlas}" == "0"
%ifarch x86_64 #ifarch x86_64
%post -n atlas-sse3 -p /sbin/ldconfig #post -n atlas-sse3 -p /sbin/ldconfig
%postun -n atlas-sse3 -p /sbin/ldconfig #postun -n atlas-sse3 -p /sbin/ldconfig
%posttrans sse3-devel #posttrans sse3-devel
if [ $1 -eq 0 ] ; then #if [ $1 -eq 0 ] ; then
/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ #/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \
%{_includedir}/atlas-%{_arch}-sse3 %{pr_sse3} # %{_includedir}/atlas-%{_arch}-sse3 %{pr_sse3}
fi #fi
%preun sse3-devel #preun sse3-devel
if [ $1 -ge 0 ] ; then #if [ $1 -ge 0 ] ; then
/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse3 #/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse3
fi #fi
%endif #endif
%ifarch %{ix86} %ifarch %{ix86}
%post -n atlas-3dnow -p /sbin/ldconfig #%%post -n atlas-3dnow -p /sbin/ldconfig
%postun -n atlas-3dnow -p /sbin/ldconfig #%%postun -n atlas-3dnow -p /sbin/ldconfig
%posttrans 3dnow-devel #%%posttrans 3dnow-devel
if [ $1 -eq 0 ] ; then #if [ $1 -eq 0 ] ; then
/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ #/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \
%{_includedir}/atlas-%{_arch}-3dnow %{pr_3dnow} # %{_includedir}/atlas-%{_arch}-3dnow %{pr_3dnow}
fi #fi
%preun 3dnow-devel #%%preun 3dnow-devel
if [ $1 -ge 0 ] ; then #if [ $1 -ge 0 ] ; then
/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-3dnow #/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-3dnow
fi #fi
%post -n atlas-sse -p /sbin/ldconfig #%%post -n atlas-sse -p /sbin/ldconfig
%postun -n atlas-sse -p /sbin/ldconfig #%%postun -n atlas-sse -p /sbin/ldconfig
%posttrans sse-devel #%%posttrans sse-devel
if [ $1 -eq 0 ] ; then #if [ $1 -eq 0 ] ; then
/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ #/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \
%{_includedir}/atlas-%{_arch}-sse %{pr_sse} # %{_includedir}/atlas-%{_arch}-sse %{pr_sse}
fi #fi
%preun sse-devel #%%preun sse-devel
if [ $1 -ge 0 ] ; then #if [ $1 -ge 0 ] ; then
/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse #/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse
fi #fi
%post -n atlas-sse2 -p /sbin/ldconfig %post -n atlas-sse2 -p /sbin/ldconfig
@ -498,44 +576,44 @@ fi
%endif %endif
%ifarch s390 s390x #%ifarch s390 s390x
%post -n atlas-z10 -p /sbin/ldconfig #%post -n atlas-z10 -p /sbin/ldconfig
%postun -n atlas-z10 -p /sbin/ldconfig #%postun -n atlas-z10 -p /sbin/ldconfig
%posttrans z10-devel #%posttrans z10-devel
if [ $1 -eq 0 ] ; then #if [ $1 -eq 0 ] ; then
/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ #/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \
%{_includedir}/atlas-%{_arch}-z10 %{pr_z10} # %{_includedir}/atlas-%{_arch}-z10 %{pr_z10}
fi #fi
%preun z10-devel #%preun z10-devel
if [ $1 -ge 0 ] ; then #if [ $1 -ge 0 ] ; then
/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-z10 #/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-z10
fi #fi
%post -n atlas-z196 -p /sbin/ldconfig #%post -n atlas-z196 -p /sbin/ldconfig
%postun -n atlas-z196 -p /sbin/ldconfig #%postun -n atlas-z196 -p /sbin/ldconfig
%posttrans z196-devel #%posttrans z196-devel
if [ $1 -eq 0 ] ; then #if [ $1 -eq 0 ] ; then
/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ #/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \
%{_includedir}/atlas-%{_arch}-z196 %{pr_z196} # %{_includedir}/atlas-%{_arch}-z196 %{pr_z196}
fi #fi
%preun z196-devel #%preun z196-devel
if [ $1 -ge 0 ] ; then #if [ $1 -ge 0 ] ; then
/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-z196 #/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-z196
fi #fi
%endif #%endif
%endif %endif
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc doc/README.Fedora %doc doc/README.dist
%dir %{_libdir}/atlas %dir %{_libdir}/atlas
%{_libdir}/atlas/*.so.* %{_libdir}/atlas/*.so.*
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}.conf %config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}.conf
@ -548,62 +626,66 @@ fi
%{_includedir}/*.h %{_includedir}/*.h
%ghost %{_includedir}/atlas %ghost %{_includedir}/atlas
%files static
%defattr(-,root,root,-)
%{_libdir}/atlas/*.a
%if "%{?enable_native_atlas}" == "0" %if "%{?enable_native_atlas}" == "0"
%ifarch x86_64 #ifarch x86_64
%files sse3 #files sse3
%defattr(-,root,root,-) #defattr(-,root,root,-)
%doc doc/README.Fedora #doc doc/README.Fedora
%dir %{_libdir}/atlas-sse3 #dir %{_libdir}/atlas-sse3
%{_libdir}/atlas-sse3/*.so.* #{_libdir}/atlas-sse3/*.so
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse3.conf #config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse3.conf
%files sse3-devel #files sse3-devel
%defattr(-,root,root,-) #defattr(-,root,root,-)
%doc doc #doc doc
%{_libdir}/atlas-sse3/*.so #{_libdir}/atlas-sse3/*.so
%{_includedir}/atlas-%{_arch}-sse3/ #{_includedir}/atlas-%{_arch}-sse3/
%{_includedir}/*.h #{_includedir}/*.h
%ghost %{_includedir}/atlas #ghost %{_includedir}/atlas
%endif #endif
%ifarch %{ix86} %ifarch %{ix86}
%files 3dnow #%%files 3dnow
%defattr(-,root,root,-) #%%defattr(-,root,root,-)
%doc doc/README.Fedora #%%doc doc/README.Fedora
%dir %{_libdir}/atlas-3dnow #%%dir %{_libdir}/atlas-3dnow
%{_libdir}/atlas-3dnow/*.so.* #%%{_libdir}/atlas-3dnow/*.so.*
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-3dnow.conf #%%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-3dnow.conf
%files 3dnow-devel #%%files 3dnow-devel
%defattr(-,root,root,-) #%%defattr(-,root,root,-)
%doc doc #%%doc doc
%{_libdir}/atlas-3dnow/*.so #%%{_libdir}/atlas-3dnow/*.so
%{_includedir}/atlas-%{_arch}-3dnow/ #%%{_includedir}/atlas-%{_arch}-3dnow/
%{_includedir}/*.h #%%{_includedir}/*.h
%ghost %{_includedir}/atlas #%%ghost %{_includedir}/atlas
%files sse #%%files sse
%defattr(-,root,root,-) #%%defattr(-,root,root,-)
%doc doc/README.Fedora #%%doc doc/README.Fedora
%dir %{_libdir}/atlas-sse #%%dir %{_libdir}/atlas-sse
%{_libdir}/atlas-sse/*.so.* #%%{_libdir}/atlas-sse/*.so.*
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse.conf #%%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse.conf
%files sse-devel #%%files sse-devel
%defattr(-,root,root,-) #%%defattr(-,root,root,-)
%doc doc #%%doc doc
%{_libdir}/atlas-sse/*.so #%%{_libdir}/atlas-sse/*.so
%{_includedir}/atlas-%{_arch}-sse/ #%%{_includedir}/atlas-%{_arch}-sse/
%{_includedir}/*.h #%%{_includedir}/*.h
%ghost %{_includedir}/atlas #%%ghost %{_includedir}/atlas
%files sse2 %files sse2
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc doc/README.Fedora %doc doc/README.dist
%dir %{_libdir}/atlas-sse2 %dir %{_libdir}/atlas-sse2
%{_libdir}/atlas-sse2/*.so.* %{_libdir}/atlas-sse2/*.so.*
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse2.conf %config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse2.conf
@ -616,13 +698,21 @@ fi
%{_includedir}/*.h %{_includedir}/*.h
%ghost %{_includedir}/atlas %ghost %{_includedir}/atlas
%files sse2-static
%defattr(-,root,root,-)
%{_libdir}/atlas-sse2/*.a
%files sse3 %files sse3
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc doc/README.Fedora %doc doc/README.dist
%dir %{_libdir}/atlas-sse3 %dir %{_libdir}/atlas-sse3
%{_libdir}/atlas-sse3/*.so.* %{_libdir}/atlas-sse3/*.so.*
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse3.conf %config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse3.conf
%files sse3-static
%defattr(-,root,root,-)
%{_libdir}/atlas-sse3/*.a
%files sse3-devel %files sse3-devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc doc %doc doc
@ -633,46 +723,74 @@ fi
%endif %endif
%ifarch s390 s390x #%ifarch s390 s390x
%files z10 #%files z10
%defattr(-,root,root,-) #%defattr(-,root,root,-)
%doc doc/README.Fedora #%doc doc/README.dist
%dir %{_libdir}/atlas-z10 #%dir %{_libdir}/atlas-z10
%{_libdir}/atlas-z10/*.so.* #%{_libdir}/atlas-z10/*.so
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-z10.conf #%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-z10.conf
#
#%files z10-devel
#%defattr(-,root,root,-)
#%doc doc
#%{_libdir}/atlas-z10/*.so
#%{_includedir}/atlas-%{_arch}-z10/
#%{_includedir}/*.h
#%ghost %{_includedir}/atlas
#
#%files z10-static
#%defattr(-,root,root,-)
#%{_libdir}/atlas-z10/*.a
%files z10-devel #%files z196
%defattr(-,root,root,-) #%defattr(-,root,root,-)
%doc doc #%doc doc/README.dist
%{_libdir}/atlas-z10/*.so #%dir %{_libdir}/atlas-z196
%{_includedir}/atlas-%{_arch}-z10/ #%{_libdir}/atlas-z196/*.so
%{_includedir}/*.h #%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-z196.conf
%ghost %{_includedir}/atlas
%files z196 #%files z196-devel
%defattr(-,root,root,-) #%defattr(-,root,root,-)
%doc doc/README.Fedora #%doc doc
%dir %{_libdir}/atlas-z196 #%{_libdir}/atlas-z196/*.so
%{_libdir}/atlas-z196/*.so.* #%{_includedir}/atlas-%{_arch}-z196/
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-z196.conf #%{_includedir}/*.h
#%ghost %{_includedir}/atlas
%files z196-devel #%files z196-static
%defattr(-,root,root,-) #%defattr(-,root,root,-)
%doc doc #%{_libdir}/atlas-z196/*.a
%{_libdir}/atlas-z196/*.so
%{_includedir}/atlas-%{_arch}-z196/ #%endif
%{_includedir}/*.h
%ghost %{_includedir}/atlas
%endif
%endif %endif
%changelog %changelog
* Fri Sep 20 2012 Frantisek Kluknavsky <fkluknav@redhat.com> - 3.10.1-1
- Rebase to 3.10.1
- Dropped x86_64-SSE2, ix86-SSE1, ix86-3DNow, z10, z196 (uncompilable).
- Modified incompatible patches.
- Added armv7neon support, modified archdef from softfp abi to hard abi.
- Modified Make.lib to include build-id, soname, versioned library name and symlinks.
- Now builds monolithic libsatlas (serial) and libtatlas (threaded)
libraries with lapack and blas included.
- Lapack source tarball needed instead of static library.
- Disabled cpu throttling detection again (sorry, could not work on atlas
otherwise, feel free to enable yet again - atlas-throttling.patch).
- Removed mentions of "Fedora" to promote redistribution.
- Modified parts of atlas.spec sometimes left in place, work still in progress,
cleanup needed.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.4-9 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sun Jan 27 2013 Peter Robinson <pbrobinson@fedoraproject.org> 3.8.4-8 * Sun Jan 27 2013 Peter Robinson <pbrobinson@fedoraproject.org> 3.8.4-8
- Rebuild for ARM glibc/binutils issues - Rebuild for ARM glibc/binutils issues
* Sun Sep 15 2013 Frantisek Kluknavsky <fkluknav@redhat.com> - 3.10.1-1
- Rebase to 3.10.1
* Fri Sep 07 2012 Orion Poplawski <orion@nwra.com> - 3.8.4-7 * Fri Sep 07 2012 Orion Poplawski <orion@nwra.com> - 3.8.4-7
- Rebuild with lapack 3.4.1 - Rebuild with lapack 3.4.1
@ -735,7 +853,7 @@ fi
* Sun Sep 6 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 3.8.3-9 * Sun Sep 6 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 3.8.3-9
- Rebuild against fixed lapack (see #520518) - Rebuild against fixed lapack (see #520518)
* Wed Aug 13 2009 Deji Akingunola <dakingun@gmail.com> - 3.8.3-8 * Thu Aug 13 2009 Deji Akingunola <dakingun@gmail.com> - 3.8.3-8
- Revert the last change, it doesn't solve the problem. - Revert the last change, it doesn't solve the problem.
* Tue Aug 04 2009 Deji Akingunola <dakingun@gmail.com> - 3.8.3-7 * Tue Aug 04 2009 Deji Akingunola <dakingun@gmail.com> - 3.8.3-7

BIN
lapack-3.4.2-clean.tgz Normal file

Binary file not shown.

View File

@ -1,4 +1,3 @@
1bb3abde499b492b4be1f1a0759fbfa2 atlas3.8.4.tar.bz2
9ddf8c76e5e9781c542b712f704460e1 IBMz1032.tgz 9ddf8c76e5e9781c542b712f704460e1 IBMz1032.tgz
ee4cbc1f15cb4cd5f5266969a4bc62a7 IBMz1064.tgz ee4cbc1f15cb4cd5f5266969a4bc62a7 IBMz1064.tgz
edd3cb5602c6282e4a30691e728bd064 IBMz19632.tgz edd3cb5602c6282e4a30691e728bd064 IBMz19632.tgz
@ -7,3 +6,8 @@ edd3cb5602c6282e4a30691e728bd064 IBMz19632.tgz
676548252837b1e458181111443f340f PPRO32.tgz 676548252837b1e458181111443f340f PPRO32.tgz
ebb4732aff468bbc223e7f734252173b USII32.tgz ebb4732aff468bbc223e7f734252173b USII32.tgz
31f8ae7583d290e5414a1a61ff6e7e39 USII64.tgz 31f8ae7583d290e5414a1a61ff6e7e39 USII64.tgz
78753e869231cc1417a92eebaa076718 atlas3.10.1.tar.bz2
c0e92e1f977c3390666900e8093c5dc7 lapack-3.4.2-clean.tgz
93f108a072913fa1dbb2fcb6ca7c229a IBMz932.tar.bz2
f3e4ca175b5ffc49dce7f3c37f791827 IBMz964.tar.bz2
27e7baa49c588299260188afa78303dc POWER332.tar.bz2