rpms/suitesparse/devel suitesparse_build.patch, NONE, 1.1 suitesparse.spec, 1.9, 1.10

Deji Akingunola deji at fedoraproject.org
Sun Dec 21 04:00:32 UTC 2008


Author: deji

Update of /cvs/pkgs/rpms/suitesparse/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23036

Modified Files:
	suitesparse.spec 
Added Files:
	suitesparse_build.patch 
Log Message:
* Sat Dec 20 2008 Deji Akingunola <dakingun at gmail.com> - 3.2.0-4
- Also build SPQR
- Further fixes for BZ #475411


suitesparse_build.patch:

--- NEW FILE suitesparse_build.patch ---
--- SPQR/Include/spqr.hpp	2008-09-18 09:20:48.000000000 -0400
+++ SPQR/Include/spqr.hpp.new	2008-12-20 21:05:49.000000000 -0500
@@ -17,6 +17,7 @@
 #include <math.h>
 #include <float.h>
 #include <stdio.h>
+#include <cstring>
 
 #include <complex>
 typedef std::complex<double> Complex ;
--- UFconfig/UFconfig.mk	2008-09-22 14:19:37.000000000 -0400
+++ UFconfig/UFconfig.mk.new	2008-12-20 21:18:19.000000000 -0500
@@ -48,7 +48,7 @@
 MV = mv -f
 
 # Fortran compiler (not normally required)
-F77 = f77
+F77 = gfortran
 F77FLAGS = -O
 F77LIB =
 
@@ -89,13 +89,17 @@
 # BLAS = -lgoto -lgfortran -lgfortranbegin -lg2c
 
 # This is probably slow ... it might connect to the Standard Reference BLAS:
-BLAS = -lblas -lgfortran -lgfortranbegin -lg2c
-LAPACK = -llapack
+#BLAS = -lblas -lgfortran -lgfortranbegin -lg2c
+#LAPACK = -llapack
 
 # Using non-optimized versions:
 # BLAS = -lblas_plain -lgfortran -lgfortranbegin -lg2c
 # LAPACK = -llapack_plain
 
+# Using ATLAS optimized BLAS and Lapack:  Fedora specific addition
+BLAS = -lcblas 
+LAPACK = -lclapack
+
 # The BLAS might not contain xerbla, an error-handling routine for LAPACK and
 # the BLAS.  Also, the standard xerbla requires the Fortran I/O library, and
 # stops the application program if an error occurs.  A C version of xerbla
@@ -146,7 +150,7 @@
 # -DNRECIPROCAL	do not multiply by the reciprocal
 # -DNO_DIVIDE_BY_ZERO	do not divide by zero
 
-UMFPACK_CONFIG = 
+UMFPACK_CONFIG = -DNPARTITION
 
 #------------------------------------------------------------------------------
 # CHOLMOD configuration
@@ -184,7 +188,7 @@
 # -DNSUNPERF	    for Solaris only.  If defined, do not use the Sun
 #			Performance Library
 
-CHOLMOD_CONFIG =
+CHOLMOD_CONFIG = -DNPARTITION
 
 #------------------------------------------------------------------------------
 # SuiteSparseQR configuration:
@@ -198,7 +202,7 @@
 # -DHAVE_TBB        enable the use of Intel's Threading Building Blocks (TBB)
 
 # default, without timing, without TBB:
-SPQR_CONFIG =
+SPQR_CONFIG = -DNPARTITION
 # with timing and TBB:
 # SPQR_CONFIG = -DTIMING -DHAVE_TBB
 # with timing
@@ -263,6 +267,10 @@
 # F77 = gfortran
 # BLAS = -lgoto -lgfortran
 
+# Fedora, with ATLAS Blas
+F77 = gfortran
+BLAS = -lf77blas -lgfortran
+
 #------------------------------------------------------------------------------
 # Solaris
 #------------------------------------------------------------------------------


Index: suitesparse.spec
===================================================================
RCS file: /cvs/pkgs/rpms/suitesparse/devel/suitesparse.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- suitesparse.spec	18 Dec 2008 05:08:38 -0000	1.9
+++ suitesparse.spec	21 Dec 2008 04:00:02 -0000	1.10
@@ -1,12 +1,13 @@
 Name:           suitesparse
 Version:        3.2.0
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        A collection of sparse matrix libraries
 
 Group:          System Environment/Libraries
 License:        LGPLv2+
 URL:            http://www.cise.ufl.edu/research/sparse/SuiteSparse
 Source0:        http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-%{version}.tar.gz
+Patch0:		suitesparse_build.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  atlas-devel
@@ -27,6 +28,8 @@
   CXSparse    CSparse extended: complex matrix, int and long int support
   KLU         sparse LU factorization, primarily for circuit simulation
   LDL         a simple LDL' factorization
+  SQPR        a multithread, multifrontal, rank-revealing sparse QR
+              factorization method
   UMFPACK     sparse LU factorization
   UFconfig    configuration file for all the above packages.
 
@@ -58,6 +61,7 @@
 
 %prep
 %setup -q -n SuiteSparse
+%patch0 -p0 -b .build
 
 %build
 %define amd_version 2.2
@@ -82,6 +86,8 @@
 %define ldl_version_major 2
 %define umfpack_version 5.2.0
 %define umfpack_version_major 5
+%define spqr_version 1.1.0
+%define spqr_version_major 1
 ### CHOLMOD can also be compiled to use the METIS library, but it is not
 ### used here because its licensing terms exclude it from Fedora Extras.
 ### To compile with METIS, define enable_metis as 1 below.
@@ -94,7 +100,7 @@
 
 mkdir Devel Devel/AMD Devel/CHOLMOD Devel/KLU Devel/LDL Devel/UMFPACK \
       Doc Doc/AMD Doc/BTF Doc/CAMD Doc/CCOLAMD Doc/CHOLMOD Doc/COLAMD \
-      Doc/KLU Doc/LDL Doc/UMFPACK Lib Include
+      Doc/KLU Doc/LDL Doc/UMFPACK Doc/SPQR Lib Include
 
 pushd AMD
   pushd Lib
@@ -243,7 +249,9 @@
   popd
   pushd ../Lib
     gcc -shared -Wl,-soname,libklu.so.%{klu_version_major} -o \
-        libklu.so.%{klu_version} ../KLU/Lib/*.o
+        libklu.so.%{klu_version} ../KLU/Lib/*.o \
+        libamd.so.%{amd_version_major} libcolamd.so.%{colamd_version_major} \
+        libbtf.so.%{btf_version_major} libcholmod.so.%{cholmod_version_major}
     ln -sf libklu.so.%{klu_version} libklu.so.%{klu_version_major}
     ln -sf libklu.so.%{klu_version} libklu.so
     cp -p ../KLU/Lib/*.a ./
@@ -275,7 +283,7 @@
   pushd ../Lib
     gcc -shared -Wl,-soname,libumfpack.so.%{umfpack_version_major} -o \
         libumfpack.so.%{umfpack_version} ../UMFPACK/Lib/*.o \
-        -L%{_libdir}/atlas -lcblas -lm
+        -L%{_libdir}/atlas -lcblas libamd.so.%{amd_version_major} -lm
     ln -sf libumfpack.so.%{umfpack_version} libumfpack.so.%{umfpack_version_major}
     ln -sf libumfpack.so.%{umfpack_version} libumfpack.so
     cp -p ../UMFPACK/Lib/*.a ./
@@ -285,6 +293,23 @@
   cp -p Doc/*.pdf ../Devel/UMFPACK
 popd
 
+pushd SPQR
+  pushd Lib
+    make CFLAGS="$RPM_OPT_FLAGS -DNPARTITION -fPIC"
+  popd
+  pushd ../Lib
+    gcc -shared -Wl,-soname,libspqr.so.%{spqr_version_major} -o \
+        libspqr.so.%{spqr_version} ../SPQR/Lib/*.o \
+        -L%{_libdir}/atlas -lcblas -lclapack -lm
+    ln -sf libspqr.so.%{spqr_version} libspqr.so.%{spqr_version_major}
+    ln -sf libspqr.so.%{spqr_version} libspqr.so
+    cp -p ../SPQR/Lib/*.a ./
+  popd
+  cp -p Include/*.h* ../Include
+  cp -p README{,_SPQR}.txt
+  cp -p README_SPQR.txt Doc/* ../Doc/SPQR
+popd
+
 cp -p UFconfig/UFconfig.h Include
 
 %install
@@ -327,6 +352,10 @@
 %{_libdir}/lib*.a
 
 %changelog
+* Sat Dec 20 2008 Deji Akingunola <dakingun at gmail.com> - 3.2.0-4
+- Also build SPQR
+- Further fixes for BZ #475411
+
 * Wed Dec 17 2008 Deji Akingunola <dakingun at gmail.com> - 3.2.0-3
 - Rearrange the spec
 - Link in necessary libs when making shared CHOLMOD lib (BZ #475411)




More information about the fedora-extras-commits mailing list