Update to 3.8.2
This commit is contained in:
parent
f211563ff8
commit
9680a0e7b8
|
@ -1,2 +1 @@
|
|||
atlas3.6.0.tar.bz2
|
||||
atlas3_3.6.0-20.diff.gz
|
||||
atlas3.8.2.tar.bz2
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
Notes on the Fedora Extras version of ATLAS
|
||||
Notes on the Fedora version of ATLAS
|
||||
|
||||
by Quentin Spencer
|
||||
updated: October 4, 2005
|
||||
|
||||
updated by Deji Akingunola
|
||||
October 15, 2008
|
||||
|
||||
Because ATLAS relies on compile-time optimizations to obtain improved
|
||||
performance over BLAS and LAPACK, the resulting binaries are closely
|
||||
|
@ -21,45 +23,33 @@ which will have hardware different from the end user's hardware, and
|
|||
quite possibly different from other available hardware in the build
|
||||
system.
|
||||
|
||||
The Debian project was probably the first to distribute precompiled
|
||||
ATLAS libraries. Camm Maguire, the creator of the Debian ATLAS
|
||||
package, has found a way of dealing with both of these challenges.
|
||||
The system essentially consists of "recorded builds" where ATLAS is
|
||||
compiled on particular hardware such that the resulting binary has
|
||||
reasonable performance on a range of hardware. The build parameters
|
||||
from the resulting optimization are stored in the source package and
|
||||
"played back" when a binary package is built. This has the additional
|
||||
advantage that builds using this method can be completed in minutes
|
||||
rather than the hours required to complete the standard compile-time
|
||||
empirical tests.
|
||||
|
||||
A significant amount of research has been done to find the best
|
||||
compile parameters for the Debian packages, so the most sensible
|
||||
approach to making a package for Fedora is to make use of that
|
||||
research by applying the Debian patches directly to the source and to
|
||||
emulate the same build process. The spec file for this package does
|
||||
exactly that. The result is a set of libraries that will not
|
||||
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/atlas rather than
|
||||
/usr/lib).
|
||||
standard ones (they are installed in /usr/lib{64}/atlas* rather than
|
||||
/usr/lib{64}).
|
||||
|
||||
For i386 systems, 3 ATLAS subpackages are built for SSE1, SSE2, and SSE3 ix86
|
||||
extensions, using architectural defaults obtained from PIII, Pentium 4 with
|
||||
SSE2 extension and PENTIUM 4 with SSE3 extensions respectively.
|
||||
|
||||
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_custom_atlas" to a value of 1. This
|
||||
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_custom_atlas 1" --rebuild atlas-3.6.0-1.src.rpm
|
||||
rpmbuild -D "enable_native_atlas 1" --rebuild atlas-3.8.2-1.src.rpm
|
||||
|
||||
This command will create an atlas package called atlas-custom, which
|
||||
installs the optimized atlas libraries in /usr/lib/custom and the
|
||||
blas-compatible libraries in /usr/lib/atlas/custom. It should also be
|
||||
noted here that because custom compilation enables all compile-time
|
||||
empirical tests instead of simply replaying a previous build, the
|
||||
compilation time will be considerably longer, and can require several
|
||||
hours to complete, depending on the hardware.
|
||||
This will cause the ATLAS build to use the achitectural default most
|
||||
appropriate for the system on which the package is to be built.
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
--- debian/config.expect.orig 2005-08-15 13:22:40.000000000 -0500
|
||||
+++ debian/config.expect 2005-08-15 13:30:14.000000000 -0500
|
||||
@@ -4,6 +4,8 @@
|
||||
set timeout 180
|
||||
set i [spawn make]
|
||||
expect -re "ready to continue?" {send "\n" ; exp_continue} \
|
||||
+ "Stop ATLAS install?" {send "n\n"; exp_continue} \
|
||||
+ "enter a different F77" {send "1\n"; exp_continue} \
|
||||
"Enter number at top left of screen" {send "\n" ; exp_continue} \
|
||||
"ENTER TO CONTINUE" {send "\n" ; exp_continue} \
|
||||
"enable Posix threads support?" {send "n\n" ; exp_continue} \
|
||||
@@ -20,7 +22,7 @@
|
||||
"Fortran77 interface to BLAS" {send "\n" ; exp_continue} \
|
||||
"3DNow! for computation?" {send "$env(TDNCOMP)\n" ; exp_continue} \
|
||||
"Level 1 BLAS" {send "\n" ; exp_continue} \
|
||||
- "f77 compiler" {send "\n" ; exp_continue} \
|
||||
+ "f77 compiler" {send "/usr/bin/gfortran\n" ; exp_continue} \
|
||||
"F77 Flags" {send "\n" ; exp_continue} \
|
||||
"F77 Linker" {send "\n" ; exp_continue} \
|
||||
"F77 Link Flags" {send "\n" ; exp_continue} \
|
|
@ -1,12 +0,0 @@
|
|||
diff -up ATLAS/config.c.broken ATLAS/config.c
|
||||
--- ATLAS/config.c.broken 2008-02-13 17:33:21.000000000 -0500
|
||||
+++ ATLAS/config.c 2008-02-13 17:34:03.000000000 -0500
|
||||
@@ -3254,7 +3254,7 @@ enum MACHTYPE GetArch(FILE *fpout, FILE
|
||||
fprintf(stdout, " 1. IA-64 Itanium 1\n");
|
||||
fprintf(stdout, " 2. IA-64 Itanium 2\n");
|
||||
fprintf(stdout, " 3. Other/UNKNOWN\n");
|
||||
- i = GetIntRange(3, 1, 2, "", "machine number");
|
||||
+ i = GetIntRange(2, 1, 2, "", "machine number");
|
||||
if (i == 1) mach = IA64Itan;
|
||||
else if (i == 2) mach = IA64Itan2;
|
||||
break;
|
|
@ -0,0 +1,88 @@
|
|||
--- makes/Make.lib 2008-06-06 20:57:46.000000000 -0400
|
||||
+++ makes/Make.lib.new 2008-09-01 11:12:11.000000000 -0400
|
||||
@@ -3,6 +3,8 @@
|
||||
#
|
||||
# override with libatlas.so only when atlas is built to one lib
|
||||
#
|
||||
+so_ver_major=3
|
||||
+so_ver = $(so_ver_major).0
|
||||
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
|
||||
@@ -32,38 +34,63 @@
|
||||
mv $(tarnam).tar.gz $(tarnam).tgz
|
||||
|
||||
ptshared :
|
||||
- - rm -f libatlas.so liblapack.so
|
||||
+ - rm -f libatlas.so* liblapack.so* \
|
||||
+ lib*blas.so* libclapack.so*
|
||||
$(MAKE) libatlas.so liblapack.so libptf77blas.so libf77blas.so \
|
||||
- libptcblas.so libcblas.so liblapack.so
|
||||
+ libptcblas.so libcblas.so libclapack.so
|
||||
shared :
|
||||
- - rm -f libatlas.so liblapack.so
|
||||
- $(MAKE) libatlas.so liblapack.so libf77blas.so libcblas.so liblapack.so
|
||||
+ - rm -f libatlas.so liblapack.so \
|
||||
+ libatlas.so.$(so_ver) liblapack.so.$(so_ver)
|
||||
+ $(MAKE) libatlas.so liblapack.so libf77blas.so libcblas.so libclapack.so
|
||||
cptshared :
|
||||
- - rm -f libatlas.so libclapack.so
|
||||
+ - rm -f libatlas.so libclapack.so \
|
||||
+ libatlas.so.$(so_ver) libclapack.so.$(so_ver)
|
||||
$(MAKE) libatlas.so libclapack.so libptcblas.so libcblas.so
|
||||
cshared :
|
||||
- - rm -f libatlas.so libclapack.so
|
||||
+ - rm -f libatlas.so libclapack.so \
|
||||
+ libatlas.so.$(so_ver) libclapack.so.$(so_ver)
|
||||
$(MAKE) libatlas.so libclapack.so libcblas.so
|
||||
|
||||
libatlas.so : libatlas.a
|
||||
- ld $(LDFLAGS) -shared -soname libatlas.so -o libatlas.so \
|
||||
+ ld $(LDFLAGS) --build-id -shared -soname libatlas.so.$(so_ver_major) \
|
||||
+ -o libatlas.so.$(so_ver) \
|
||||
--whole-archive libatlas.a --no-whole-archive -lc $(LIBS)
|
||||
+ ln -s ./libatlas.so.$(so_ver) libatlas.so.$(so_ver_major)
|
||||
+ ln -s ./libatlas.so.$(so_ver) libatlas.so
|
||||
liblapack.so : liblapack.a
|
||||
- ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive \
|
||||
+ ld $(LDFLAGS) --build-id -shared -soname liblapack.so.$(so_ver_major) \
|
||||
+ -o liblapack.so.$(so_ver) --whole-archive \
|
||||
liblapack.a --no-whole-archive $(F77SYSLIB)
|
||||
+ ln -s ./liblapack.so.$(so_ver) liblapack.so.$(so_ver_major)
|
||||
+ ln -s ./liblapack.so.$(so_ver) liblapack.so
|
||||
libclapack.so : libclapack.a
|
||||
- ld $(LDFLAGS) -shared -soname liblapack.so -o liblapack.so \
|
||||
+ ld $(LDFLAGS) --build-id -shared -soname libclapack.so.$(so_ver_major) \
|
||||
+ -o libclapack.so.$(so_ver) \
|
||||
--whole-archive libclapack.a
|
||||
+ ln -s ./libclapack.so.$(so_ver) libclapack.so.$(so_ver_major)
|
||||
+ ln -s ./libclapack.so.$(so_ver) libclapack.so
|
||||
libptf77blas.so : libptf77blas.a
|
||||
- ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libptf77blas.a \
|
||||
+ ld $(LDFLAGS) --build-id -shared -soname libptf77blas.so.$(so_ver_major) \
|
||||
+ -o libptf77blas.so.$(so_ver) --whole-archive libptf77blas.a \
|
||||
--no-whole-archive $(F77SYSLIB)
|
||||
+ ln -s ./libptf77blas.so.$(so_ver) libptf77blas.so.$(so_ver_major)
|
||||
+ ln -s ./libptf77blas.so.$(so_ver) libptf77blas.so
|
||||
libf77blas.so : libf77blas.a
|
||||
- ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libf77blas.a \
|
||||
+ ld $(LDFLAGS) --build-id -shared -soname libf77blas.so.$(so_ver_major) \
|
||||
+ -o libf77blas.so.$(so_ver) --whole-archive libf77blas.a \
|
||||
--no-whole-archive $(F77SYSLIB)
|
||||
+ ln -s ./libf77blas.so.$(so_ver) libf77blas.so.$(so_ver_major)
|
||||
+ ln -s ./libf77blas.so.$(so_ver) libf77blas.so
|
||||
libptcblas.so : libptcblas.a
|
||||
- ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libptcblas.a
|
||||
+ ld $(LDFLAGS) --build-id -shared -soname libptcblas.so.$(so_ver_major) \
|
||||
+ -o libptcblas.so.$(so_ver) --whole-archive libptcblas.a
|
||||
+ ln -s ./libptcblas.so.$(so_ver) libptcblas.so.$(so_ver_major)
|
||||
+ ln -s ./libptcblas.so.$(so_ver) libptcblas.so
|
||||
libcblas.so : libcblas.a
|
||||
- ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libcblas.a
|
||||
+ ld $(LDFLAGS) --build-id -shared -soname libcblas.so.$(so_ver_major) \
|
||||
+ -o libcblas.so.$(so_ver) --whole-archive libcblas.a
|
||||
+ ln -s ./libcblas.so.$(so_ver) libcblas.so.$(so_ver_major)
|
||||
+ ln -s ./libcblas.so.$(so_ver) libcblas.so
|
||||
#
|
||||
# Builds one shared lib from all ATLAS files
|
||||
#
|
522
atlas.spec
522
atlas.spec
|
@ -1,6 +1,8 @@
|
|||
%define enable_native_atlas 0
|
||||
|
||||
Name: atlas
|
||||
Version: 3.6.0
|
||||
Release: 15%{?dist}
|
||||
Version: 3.8.2
|
||||
Release: 2%{?dist}
|
||||
Summary: Automatically Tuned Linear Algebra Software
|
||||
|
||||
Group: System Environment/Libraries
|
||||
|
@ -8,18 +10,10 @@ License: BSD
|
|||
URL: http://math-atlas.sourceforge.net/
|
||||
Source0: http://prdownloads.sourceforge.net/math-atlas/%{name}%{version}.tar.bz2
|
||||
Source1: README.Fedora
|
||||
Patch0: http://ftp.debian.org/debian/pool/main/a/atlas3/%{name}3_%{version}-20.diff.gz
|
||||
Patch1: %{name}-%{version}-gfortran.patch
|
||||
Patch2: %{name}-%{version}-ia64-configure.patch
|
||||
Patch0: atlas-fedora_shared.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
Requires: /etc/ld.so.conf.d
|
||||
Requires(post): /sbin/ldconfig
|
||||
Requires(postun): /sbin/ldconfig
|
||||
BuildRequires: gcc-gfortran lapack-devel expect sharutils gawk
|
||||
|
||||
%define ver_major 3
|
||||
%define ver %{ver_major}.0
|
||||
BuildRequires: gcc-gfortran lapack-devel
|
||||
|
||||
%description
|
||||
The ATLAS (Automatically Tuned Linear Algebra Software) project is an
|
||||
|
@ -37,8 +31,6 @@ necessarily optimal for any specific hardware configuration. However,
|
|||
the source package can be used to compile customized ATLAS packages;
|
||||
see the documentation for information.
|
||||
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development libraries for ATLAS
|
||||
Group: Development/Libraries
|
||||
|
@ -48,357 +40,181 @@ Requires: %{name} = %{version}-%{release}
|
|||
This package contains the static libraries and headers for development
|
||||
with ATLAS (Automatically Tuned Linear Algebra Software).
|
||||
|
||||
%define types base
|
||||
|
||||
%if "%{?enable_native_atlas}" == "0"
|
||||
############## Subpackages for architecture extensions #################
|
||||
#
|
||||
# Because a set of ATLAS libraries is a ~5 MB package, separate packages
|
||||
# are created for SSE, SSE2, and 3DNow extensions to ix86 and AltiVec
|
||||
# extensions to PowerPC.
|
||||
# are created for SSE, SSE2, and SSE3 extensions to ix86.
|
||||
|
||||
%ifarch i386
|
||||
%define archt i386
|
||||
%define types base sse sse2 3dnow
|
||||
%define types sse sse2 sse3
|
||||
|
||||
%package sse
|
||||
Summary: ATLAS libraries for SSE extensions
|
||||
Group: System Environment/Libraries
|
||||
Obsoletes: %{name}-3dnow < 3.7
|
||||
Provides: %{name}-3dnow = %{version}-%{release}
|
||||
|
||||
%description sse
|
||||
This package contains the ATLAS (Automatically Tuned Linear Algebra
|
||||
Software) libraries compiled with optimizations for the SSE extensions
|
||||
to the ix86 architecture.
|
||||
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}-3dnow-devel < 3.7
|
||||
Provides: %{name}-3dnow-devel = %{version}-%{release}
|
||||
|
||||
%description sse-devel
|
||||
This package contains headers and static versions of the ATLAS
|
||||
(Automatically Tuned Linear Algebra Software) libraries compiled with
|
||||
optimizations for the SSE extensions to the ix86 architecture.
|
||||
|
||||
optimizations for the SSE(1) extensions to the ix86 architecture.
|
||||
|
||||
%package sse2
|
||||
Summary: ATLAS libraries for SSE2 extensions
|
||||
Group: System Environment/Libraries
|
||||
Obsoletes: %{name} < 3.7
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
|
||||
%description sse2
|
||||
This package contains the ATLAS (Automatically Tuned Linear Algebra
|
||||
Software) libraries compiled with optimizations for the SSE2
|
||||
extensions to the ix86 architecture.
|
||||
extensions to the ix86 architecture. Fedora also produces ATLAS build with
|
||||
SSE(1) and SSE3 extensions.
|
||||
|
||||
%package sse2-devel
|
||||
Summary: Development libraries for ATLAS with SSE2 extensions
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-sse2 = %{version}-%{release}
|
||||
Obsoletes: %{name}-devel < 3.7
|
||||
Provides: %{name}-devel = %{version}-%{release}
|
||||
|
||||
%description sse2-devel
|
||||
This package contains headers and static versions of the ATLAS
|
||||
(Automatically Tuned Linear Algebra Software) libraries compiled with
|
||||
optimizations for the SSE2 extensions to the ix86 architecture.
|
||||
|
||||
|
||||
%package 3dnow
|
||||
%package sse3
|
||||
Summary: ATLAS libraries for 3DNow extensions
|
||||
Group: System Environment/Libraries
|
||||
%description 3dnow
|
||||
|
||||
%description sse3
|
||||
This package contains the ATLAS (Automatically Tuned Linear Algebra
|
||||
Software) libraries compiled with optimizations for the 3DNow
|
||||
extensions to the ix86 architecture.
|
||||
%package 3dnow-devel
|
||||
Software) libraries compiled with optimizations for the SSE3.
|
||||
Fedora also produces ATLAS build with SSE(1) and SSE2 extensions.
|
||||
|
||||
%package sse3-devel
|
||||
Summary: Development libraries for ATLAS with 3DNow extensions
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-3dnow = %{version}-%{release}
|
||||
%description 3dnow-devel
|
||||
Requires: %{name}-sse3 = %{version}-%{release}
|
||||
|
||||
%description sse3-devel
|
||||
This package contains headers and static versions of the ATLAS
|
||||
(Automatically Tuned Linear Algebra Software) libraries compiled with
|
||||
optimizations for the 3DNow extensions to the ix86 architecture.
|
||||
|
||||
optimizations for the sse3 extensions to the ix86 architecture.
|
||||
|
||||
%endif
|
||||
%ifarch ppc ppc64
|
||||
%define archt powerpc
|
||||
%define types base
|
||||
|
||||
%endif
|
||||
%ifarch x86_64
|
||||
%define archt amd64
|
||||
%define types base
|
||||
%define bit 2
|
||||
|
||||
%ifarch x86_64 ppc64
|
||||
%define mode 64
|
||||
%else
|
||||
%define bit 1
|
||||
%define mode 32
|
||||
%endif
|
||||
|
||||
%ifarch alpha
|
||||
%define archt alpha
|
||||
%define types base
|
||||
%endif
|
||||
|
||||
%ifarch alphaev6
|
||||
%define archt alpha
|
||||
%define types ev6
|
||||
%endif
|
||||
|
||||
%if "%{?enable_custom_atlas}" == "1"
|
||||
# This flag enables building customized ATLAS libraries with all
|
||||
# compile-time optimizations. Note that compilation will take a very
|
||||
# long time, and that the resulting binaries are not guaranteed to
|
||||
# work well or even at all on other hardware.
|
||||
|
||||
%define archt %{_arch}
|
||||
%define types custom
|
||||
|
||||
%package custom
|
||||
Summary: Custom-compiled ATLAS libraries
|
||||
Group: System Environment/Libraries
|
||||
%description custom
|
||||
This package contains the ATLAS (Automatically Tuned Linear Algebra
|
||||
Software) libraries compiled with all compile-time optimizations enabled.
|
||||
%package custom-devel
|
||||
Summary: Development libraries for ATLAS with AltiVec extensions
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-custom = %{version}-%{release}
|
||||
%description custom-devel
|
||||
This package contains headers and static versions of the ATLAS
|
||||
(Automatically Tuned Linear Algebra Software) libraries compiled with
|
||||
all compile-time optimizations enabled.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n ATLAS
|
||||
%patch0 -p1
|
||||
%patch1 -p0
|
||||
%patch2 -p1
|
||||
%patch0 -p0 -b .shared
|
||||
cp %{SOURCE1} doc
|
||||
|
||||
|
||||
%build
|
||||
# The following build procedure is more or less copied from the Debian
|
||||
# sources, where the output of a previously recorded build is
|
||||
# replayed, so as to bypass the compile-time optimizations and produce
|
||||
# predictable results independent of the hardware on which it is
|
||||
# compiled. This forces builds to be sequential, so SMP builds are not
|
||||
# supported.
|
||||
chmod +x debian/config.expect debian/ab
|
||||
sed -i debian/ab -e s/g77/gfortran/
|
||||
for type in %{types}; do
|
||||
if [ "$type" = "base" ]; then
|
||||
libname=atlas
|
||||
else
|
||||
libname=atlas-${type}
|
||||
fi
|
||||
mkdir -p %{_arch}_${type}
|
||||
pushd %{_arch}_${type}
|
||||
../configure -b %{mode} -D c -DWALL -Fa alg '-Wa,--noexecstack -fPIC'\
|
||||
--prefix=%{buildroot}%{_prefix} \
|
||||
--incdir=%{buildroot}%{_includedir} \
|
||||
--libdir=%{buildroot}%{_libdir}/${libname} \
|
||||
--with-netlib-lapack=%{_libdir}/liblapack_pic.a
|
||||
|
||||
########## Static Libraries ##########################################
|
||||
for TYPE in %{types}; do
|
||||
if [ "$TYPE" = "3dnow" ]; then
|
||||
TDN=y
|
||||
else
|
||||
TDN=n
|
||||
fi
|
||||
BUILD_DIR=Linux_${TYPE}_static
|
||||
ARCH_DIR=$BUILD_DIR CACHE_SIZE= BIT=%{bit} \
|
||||
DEFAULTS=y TDNCOMP=$TDN debian/config.expect
|
||||
cat Make.$BUILD_DIR |\
|
||||
sed -e "s, TOPdir = \(.*\), TOPdir = `pwd`,1" \
|
||||
-e "s, FLAPACKlib = , FLAPACKlib = %{_libdir}/liblapack.a,1" >foo
|
||||
mv foo Make.$BUILD_DIR
|
||||
make killall arch=$BUILD_DIR
|
||||
make startup arch=$BUILD_DIR
|
||||
|
||||
if [ "$TYPE" = "custom" ]; then
|
||||
BUILD_DATA_DIR=atlas-$TYPE-%{archt}
|
||||
if [ -a %{_sourcedir}/$BUILD_DATA_DIR.tgz ]; then
|
||||
tar zxf %{_sourcedir}/$BUILD_DATA_DIR.tgz
|
||||
else
|
||||
make install arch=$BUILD_DIR >out 2>&1 &
|
||||
pid=$!
|
||||
echo Waiting on $pid
|
||||
tail -f --pid $pid out &
|
||||
wait $pid
|
||||
rm -rf ${BUILD_DATA_DIR}
|
||||
mkdir -p ${BUILD_DATA_DIR}
|
||||
cat out | sed -e "s,`pwd`,TOPDIR,g" -e "s,$BUILD_DIR,CARCH,g" | \
|
||||
gzip -9 | uuencode - >${BUILD_DATA_DIR}/build.uu
|
||||
rm -f out
|
||||
mkdir -p ${BUILD_DATA_DIR}/include
|
||||
cp include/$BUILD_DIR/* ${BUILD_DATA_DIR}/include
|
||||
mkdir -p ${BUILD_DATA_DIR}/mm
|
||||
cp tune/blas/gemm/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/mm
|
||||
mkdir -p ${BUILD_DATA_DIR}/mv
|
||||
cp tune/blas/gemv/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/mv
|
||||
mkdir -p ${BUILD_DATA_DIR}/r1
|
||||
cp tune/blas/ger/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/r1
|
||||
mkdir -p ${BUILD_DATA_DIR}/l1
|
||||
cp tune/blas/level1/$BUILD_DIR/res/* ${BUILD_DATA_DIR}/l1
|
||||
tar zcf %{_sourcedir}/${BUILD_DATA_DIR}.tgz ${BUILD_DATA_DIR}
|
||||
fi
|
||||
else
|
||||
BUILD_DATA_DIR=debian/%{archt}/${TYPE}
|
||||
fi
|
||||
|
||||
cp ${BUILD_DATA_DIR}/mm/* tune/blas/gemm/$BUILD_DIR/res
|
||||
cp ${BUILD_DATA_DIR}/mv/* tune/blas/gemv/$BUILD_DIR/res
|
||||
cp ${BUILD_DATA_DIR}/r1/* tune/blas/ger/$BUILD_DIR/res
|
||||
cp ${BUILD_DATA_DIR}/l1/* tune/blas/level1/$BUILD_DIR/res
|
||||
cp ${BUILD_DATA_DIR}/include/* include/$BUILD_DIR
|
||||
|
||||
cat ${BUILD_DATA_DIR}/build.uu | uudecode | zcat - | \
|
||||
sed -e s/g77/gfortran/ -e s/-DAdd__/-DAdd_/ | debian/ab topdir=`pwd` \
|
||||
carch=$BUILD_DIR fpic="-Wa,--noexecstack" debug= | bash -x -e
|
||||
mv lib/$BUILD_DIR/liblapack.a lib/$BUILD_DIR/liblapack_atlas.a
|
||||
|
||||
# Create replacement for BLAS and LAPACK Libraries
|
||||
mkdir tmp
|
||||
pushd tmp
|
||||
ar x ../lib/$BUILD_DIR/libatlas.a
|
||||
ar x ../lib/$BUILD_DIR/libf77blas.a
|
||||
ar x ../lib/$BUILD_DIR/libcblas.a
|
||||
popd
|
||||
rm -f lib/$BUILD_DIR/libblas.a
|
||||
ar r lib/$BUILD_DIR/libblas.a tmp/*.o
|
||||
rm -rf tmp
|
||||
|
||||
mkdir tmp
|
||||
pushd tmp
|
||||
ar x %{_libdir}/liblapack.a
|
||||
ar x ../lib/$BUILD_DIR/liblapack_atlas.a
|
||||
ar x ../lib/$BUILD_DIR/libcblas.a
|
||||
popd
|
||||
rm -f lib/$BUILD_DIR/liblapack.a
|
||||
ar r lib/$BUILD_DIR/liblapack.a tmp/*.o
|
||||
rm -rf tmp
|
||||
|
||||
########## Shared Libraries ##########################################
|
||||
BUILD_DIR=Linux_${TYPE}_shared
|
||||
ARCH_DIR=$BUILD_DIR CACHE_SIZE= BIT=%{bit} \
|
||||
DEFAULTS=y TDNCOMP=$TDN debian/config.expect
|
||||
cat Make.$BUILD_DIR |\
|
||||
sed -e "s, TOPdir = \(.*\), TOPdir = `pwd`,1" \
|
||||
-e "s, FLAPACKlib = , FLAPACKlib = %{_libdir}/liblapack_pic.a,1" \
|
||||
-e "s, F77FLAGS = \(.*\), F77FLAGS = \1 -fPIC,1" \
|
||||
-e "s, CCFLAGS = \(.*\), CCFLAGS = \1 -fPIC,1" \
|
||||
-e "s, MMFLAGS = \(.*\), MMFLAGS = \1 -fPIC,1" \
|
||||
-e "s, XCCFLAGS = \(.*\), XCCFLAGS = \1 -fPIC,1" >foo
|
||||
mv foo Make.$BUILD_DIR
|
||||
make killall arch=$BUILD_DIR
|
||||
make startup arch=$BUILD_DIR
|
||||
|
||||
cp ${BUILD_DATA_DIR}/mm/* tune/blas/gemm/$BUILD_DIR/res
|
||||
cp ${BUILD_DATA_DIR}/mv/* tune/blas/gemv/$BUILD_DIR/res
|
||||
cp ${BUILD_DATA_DIR}/r1/* tune/blas/ger/$BUILD_DIR/res
|
||||
cp ${BUILD_DATA_DIR}/l1/* tune/blas/level1/$BUILD_DIR/res
|
||||
cp ${BUILD_DATA_DIR}/include/* include/$BUILD_DIR
|
||||
|
||||
cat ${BUILD_DATA_DIR}/build.uu | uudecode | zcat - | \
|
||||
sed -e s/g77/gfortran/ -e s/-DAdd__/-DAdd_/ | debian/ab topdir=`pwd` \
|
||||
carch=$BUILD_DIR fpic="-Wa,--noexecstack -fPIC" debug= | bash -x -e
|
||||
mv lib/$BUILD_DIR/liblapack.a lib/$BUILD_DIR/liblapack_atlas.a
|
||||
|
||||
mkdir tmp
|
||||
pushd tmp
|
||||
ar x ../lib/$BUILD_DIR/libatlas.a
|
||||
rm -f ilaenv.o
|
||||
popd
|
||||
cc -shared -Wl,-soname=libatlas.so.%{ver_major} \
|
||||
-o lib/$BUILD_DIR/libatlas.so.%{ver} tmp/*.o -lm
|
||||
ln -s libatlas.so.%{ver} lib/$BUILD_DIR/libatlas.so.%{ver_major}
|
||||
ln -s libatlas.so.%{ver} lib/$BUILD_DIR/libatlas.so
|
||||
rm -rf tmp
|
||||
|
||||
mkdir tmp
|
||||
pushd tmp
|
||||
ar x ../lib/$BUILD_DIR/libcblas.a
|
||||
rm -f ilaenv.o
|
||||
popd
|
||||
cc -shared -Wl,-soname=libcblas.so.%{ver_major} \
|
||||
-o lib/$BUILD_DIR/libcblas.so.%{ver} tmp/*.o -L lib/$BUILD_DIR -latlas
|
||||
ln -s libcblas.so.%{ver} lib/$BUILD_DIR/libcblas.so.%{ver_major}
|
||||
ln -s libcblas.so.%{ver} lib/$BUILD_DIR/libcblas.so
|
||||
rm -rf tmp
|
||||
|
||||
mkdir tmp
|
||||
pushd tmp
|
||||
ar x ../lib/$BUILD_DIR/libf77blas.a
|
||||
rm -f ilaenv.o
|
||||
popd
|
||||
cc -shared -Wl,-soname=libf77blas.so.%{ver_major} \
|
||||
-o lib/$BUILD_DIR/libf77blas.so.%{ver} tmp/*.o \
|
||||
-L lib/$BUILD_DIR -latlas -lgfortran
|
||||
ln -s libf77blas.so.%{ver} lib/$BUILD_DIR/libf77blas.so.%{ver_major}
|
||||
ln -s libf77blas.so.%{ver} lib/$BUILD_DIR/libf77blas.so
|
||||
rm -rf tmp
|
||||
|
||||
mkdir tmp
|
||||
pushd tmp
|
||||
ar x ../lib/$BUILD_DIR/liblapack_atlas.a
|
||||
rm -f ilaenv.o
|
||||
popd
|
||||
cc -shared -Wl,-soname=liblapack_atlas.so.%{ver_major} \
|
||||
-o lib/$BUILD_DIR/liblapack_atlas.so.%{ver} tmp/*.o \
|
||||
-L lib/$BUILD_DIR -lcblas -lf77blas
|
||||
ln -s liblapack_atlas.so.%{ver} lib/$BUILD_DIR/liblapack_atlas.so.%{ver_major}
|
||||
ln -s liblapack_atlas.so.%{ver} lib/$BUILD_DIR/liblapack_atlas.so
|
||||
rm -rf tmp
|
||||
|
||||
# Create replacement for BLAS and LAPACK Libraries
|
||||
mkdir tmp
|
||||
pushd tmp
|
||||
ar x ../lib/$BUILD_DIR/libatlas.a
|
||||
ar x ../lib/$BUILD_DIR/libf77blas.a
|
||||
ar x ../lib/$BUILD_DIR/libcblas.a
|
||||
popd
|
||||
cc -shared -Wl,-soname=libblas.so.%{ver_major} \
|
||||
-o lib/$BUILD_DIR/libblas.so.%{ver} tmp/*.o -lgfortran
|
||||
ln -s libblas.so.%{ver} lib/$BUILD_DIR/libblas.so.%{ver_major}
|
||||
ln -s libblas.so.%{ver} lib/$BUILD_DIR/libblas.so
|
||||
rm -rf tmp
|
||||
|
||||
mkdir tmp
|
||||
pushd tmp
|
||||
ar x %{_libdir}/liblapack_pic.a
|
||||
ar x ../lib/$BUILD_DIR/liblapack_atlas.a
|
||||
ar x ../lib/$BUILD_DIR/libcblas.a
|
||||
popd
|
||||
cc -shared -Wl,-soname=liblapack.so.%{ver_major} \
|
||||
-o lib/$BUILD_DIR/liblapack.so.%{ver} tmp/*.o \
|
||||
-L lib/$BUILD_DIR -lblas -lgfortran
|
||||
ln -s liblapack.so.%{ver} lib/$BUILD_DIR/liblapack.so.%{ver_major}
|
||||
ln -s liblapack.so.%{ver} lib/$BUILD_DIR/liblapack.so
|
||||
rm -rf tmp
|
||||
if [ "$type" = "sse" ]; then
|
||||
sed -i 's#ARCH =.*#ARCH = PIII32SSE1#' Make.inc
|
||||
sed -i 's#-DATL_SSE3 -DATL_SSE2##' Make.inc
|
||||
elif [ "$type" = "sse2" ]; then
|
||||
sed -i 's#ARCH =.*#ARCH = P432SSE2#' Make.inc
|
||||
sed -i 's#-DATL_SSE3##' Make.inc
|
||||
elif [ "$type" = "sse3" ]; then
|
||||
sed -i 's#ARCH =.*#ARCH = P4E32SSE3#' Make.inc
|
||||
fi
|
||||
make build
|
||||
cd lib
|
||||
make shared
|
||||
make ptshared
|
||||
popd
|
||||
done
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||||
mkdir -p $RPM_BUILD_ROOT%{_includedir}/atlas
|
||||
cp -a include/*.h $RPM_BUILD_ROOT%{_includedir}/atlas
|
||||
rm -rf %{buildroot}
|
||||
for type in %{types}; do
|
||||
pushd %{_arch}_${type}
|
||||
make DESTDIR=%{buildroot} install
|
||||
if [ "$type" = "base" ]; then
|
||||
cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas/
|
||||
else
|
||||
cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas-${type}/
|
||||
fi
|
||||
popd
|
||||
|
||||
LIBNAMES="libatlas libcblas libf77blas liblapack_atlas libblas liblapack"
|
||||
for TYPE in %{types}; do
|
||||
if [ "$TYPE" = "base" ]; then
|
||||
EXTDIR="atlas"
|
||||
echo "%{_libdir}/atlas" \
|
||||
> $RPM_BUILD_ROOT/etc/ld.so.conf.d/atlas-%{_arch}.conf
|
||||
elif [ "$TYPE" = "custom" ]; then
|
||||
EXTDIR="atlas-custom"
|
||||
echo "%{_libdir}/atlas-custom" \
|
||||
> $RPM_BUILD_ROOT/etc/ld.so.conf.d/atlas-custom-%{_arch}.conf
|
||||
else
|
||||
EXTDIR=$TYPE
|
||||
if [ "$TYPE" != "sse2" ]; then
|
||||
echo "/usr/lib/$TYPE" \
|
||||
> $RPM_BUILD_ROOT/etc/ld.so.conf.d/atlas-$TYPE.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}/${EXTDIR}
|
||||
for LIB in $LIBNAMES; do
|
||||
LIBS="lib/Linux_${TYPE}_static/$LIB.a lib/Linux_${TYPE}_shared/$LIB.so*"
|
||||
cp -a $LIBS ${RPM_BUILD_ROOT}%{_libdir}/${EXTDIR}
|
||||
done
|
||||
mkdir -p %{buildroot}/etc/ld.so.conf.d
|
||||
if [ "$type" = "base" ]; then
|
||||
echo "%{_libdir}/atlas" \
|
||||
> %{buildroot}/etc/ld.so.conf.d/atlas-%{_arch}.conf
|
||||
else
|
||||
echo "%{_libdir}/atlas-${type}" \
|
||||
> %{buildroot}/etc/ld.so.conf.d/atlas-${type}.conf
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
%ifarch i386 && %if "%{?enable_native_atlas}" == "0"
|
||||
pushd %{buildroot}%{_libdir}
|
||||
ln -s ./atlas-sse2 atlas
|
||||
popd
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%ifnarch i386 || %if "%{?enable_native_atlas}" == "1"
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%ifarch i386
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc doc/README.Fedora
|
||||
%dir %{_libdir}/atlas
|
||||
%{_libdir}/atlas/*.so.*
|
||||
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}.conf
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc doc
|
||||
%{_libdir}/atlas/*.so
|
||||
%{_libdir}/atlas/*.a
|
||||
%{_includedir}/atlas
|
||||
%{_includedir}/*.h
|
||||
|
||||
%else
|
||||
|
||||
%post -n atlas-sse -p /sbin/ldconfig
|
||||
|
||||
|
@ -408,105 +224,65 @@ rm -rf $RPM_BUILD_ROOT
|
|||
|
||||
%postun -n atlas-sse2 -p /sbin/ldconfig
|
||||
|
||||
%post -n atlas-3dnow -p /sbin/ldconfig
|
||||
%post -n atlas-sse3 -p /sbin/ldconfig
|
||||
|
||||
%postun -n atlas-3dnow -p /sbin/ldconfig
|
||||
|
||||
%endif
|
||||
%if "%{?enable_custom_atlas}" == "1"
|
||||
|
||||
%post -n atlas-custom -p /sbin/ldconfig
|
||||
|
||||
%postun -n atlas-custom -p /sbin/ldconfig
|
||||
|
||||
%files custom
|
||||
%defattr(-,root,root,-)
|
||||
%doc debian/copyright doc/README.Fedora
|
||||
%dir %{_libdir}/atlas-custom
|
||||
%{_libdir}/atlas-custom/*.so.*
|
||||
%config(noreplace) /etc/ld.so.conf.d/atlas-custom-%{_arch}.conf
|
||||
|
||||
%files custom-devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc debian/copyright doc
|
||||
%dir %{_libdir}/atlas-custom
|
||||
%{_libdir}/atlas-custom/*.so
|
||||
%{_libdir}/atlas-custom/*.a
|
||||
%{_includedir}/atlas
|
||||
|
||||
%else
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc debian/copyright doc/README.Fedora
|
||||
%dir %{_libdir}/atlas
|
||||
%{_libdir}/atlas/*.so.*
|
||||
%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}.conf
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc debian/copyright doc
|
||||
%{_libdir}/atlas/*.so
|
||||
%{_libdir}/atlas/*.a
|
||||
%{_includedir}/atlas
|
||||
|
||||
%ifarch i386
|
||||
%postun -n atlas-sse3 -p /sbin/ldconfig
|
||||
|
||||
%files sse
|
||||
%defattr(-,root,root,-)
|
||||
%doc debian/copyright doc/README.Fedora
|
||||
%dir %{_libdir}/sse
|
||||
%{_libdir}/sse/*.so.*
|
||||
%doc doc/README.Fedora
|
||||
%dir %{_libdir}/atlas-sse
|
||||
%{_libdir}/atlas-sse/*.so.*
|
||||
%config(noreplace) /etc/ld.so.conf.d/atlas-sse.conf
|
||||
|
||||
%files sse-devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc debian/copyright doc
|
||||
%dir %{_libdir}/sse
|
||||
%{_libdir}/sse/*.so
|
||||
%{_libdir}/sse/*.a
|
||||
%doc doc
|
||||
%{_libdir}/atlas-sse/*.so
|
||||
%{_libdir}/atlas-sse/*.a
|
||||
%{_includedir}/atlas
|
||||
|
||||
%{_includedir}/*.h
|
||||
|
||||
%files sse2
|
||||
%defattr(-,root,root,-)
|
||||
%doc debian/copyright doc/README.Fedora
|
||||
%dir %{_libdir}/sse2
|
||||
%{_libdir}/sse2/*.so.*
|
||||
%doc doc/README.Fedora
|
||||
%dir %{_libdir}/atlas-sse2
|
||||
%dir %{_libdir}/atlas
|
||||
%{_libdir}/atlas-sse2/*.so.*
|
||||
%config(noreplace) /etc/ld.so.conf.d/atlas-sse2.conf
|
||||
|
||||
%files sse2-devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc debian/copyright doc
|
||||
%dir %{_libdir}/sse2
|
||||
%{_libdir}/sse2/*.so
|
||||
%{_libdir}/sse2/*.a
|
||||
%doc doc
|
||||
%{_libdir}/atlas-sse2/*.so
|
||||
%{_libdir}/atlas-sse2/*.a
|
||||
%{_includedir}/atlas
|
||||
%{_includedir}/*.h
|
||||
|
||||
|
||||
%files 3dnow
|
||||
%files sse3
|
||||
%defattr(-,root,root,-)
|
||||
%doc debian/copyright doc/README.Fedora
|
||||
%dir %{_libdir}/3dnow
|
||||
%{_libdir}/3dnow/*.so.*
|
||||
%config(noreplace) /etc/ld.so.conf.d/atlas-3dnow.conf
|
||||
%doc doc/README.Fedora
|
||||
%dir %{_libdir}/atlas-sse3
|
||||
%{_libdir}/atlas-sse3/*.so.*
|
||||
%config(noreplace) /etc/ld.so.conf.d/atlas-sse3.conf
|
||||
|
||||
%files 3dnow-devel
|
||||
%files sse3-devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc debian/copyright doc
|
||||
%dir %{_libdir}/3dnow
|
||||
%{_libdir}/3dnow/*.so
|
||||
%{_libdir}/3dnow/*.a
|
||||
%doc doc
|
||||
%{_libdir}/atlas-sse3/*.so
|
||||
%{_libdir}/atlas-sse3/*.a
|
||||
%{_includedir}/atlas
|
||||
|
||||
%endif
|
||||
%ifarch ppc ppc64
|
||||
|
||||
%endif
|
||||
%{_includedir}/*.h
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Dec 13 2008 Deji Akingunola <dakingun@gmail.com> - 3.8.2-2
|
||||
- Properly obsolete/provide older subpackages that are no longer packaged.
|
||||
|
||||
* Mon Sep 01 2008 Deji Akingunola <dakingun@gmail.com> - 3.8.2-1
|
||||
- Upgrade to ver 3.8.2 with refined build procedures.
|
||||
|
||||
* Thu Feb 28 2008 Quentin Spencer <qspencer@users.sourceforge.net> 3.6.0-15
|
||||
- Disable altivec package--it is causing illegal instructions during build.
|
||||
|
||||
|
|
Loading…
Reference in New Issue