* [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages
@ 2023-09-20 22:05 David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 01/20] gnu: suitesparse: Tweak description David Elsing
` (21 more replies)
0 siblings, 22 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:05 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
This patch series adds the individual SuiteSparse packages (as in
Gentoo:
https://packages.gentoo.org/packages/sci-libs/suitesparse/dependencies),
with autogenerated files and bundled libraries removed.
The GraphBLAS library is not yet included, but AFAICT it is not required
by any other package. It also makes up by far the most space of the
suitesparse package, e.g. on x86_64-linux, libgraphblas.so.7.2.0 is 196
MB of the 201 MB SuiteSparse package.
I think it would be best to keep the full suitesparse package until all
of its dependencies are updated and the GraphBLAS package is added, as
replacing them all at once would make the patch series quite large.
Is the use of (@@ (guix packages) computed-origin-method) ok for
creating the individual origins or is there another alternative?
David Elsing (20):
gnu: suitesparse: Tweak description.
gnu: Add suitesparse-config.
gnu: Add suitesparse-amd.
gnu: Add suitesparse-btf.
gnu: Add suitesparse-camd.
gnu: Add suitesparse-colamd.
gnu: Add suitesparse-ccolamd.
gnu: Add gklib.
gnu: Add metis-5.2.
gnu: Add gklib-suitesparse.
gnu: Add metis-suitesparse.
gnu: Add suitesparse-cholmod.
gnu: Add suitesparse-cxsparse.
gnu: Add suitesparse-klu.
gnu: Add suitesparse-ldl.
gnu: Add suitesparse-rbio.
gnu: Add suitesparse-mongoose.
gnu: Add suitesparse-spex.
gnu: Add suitesparse-spqr.
gnu: Add suitesparse-umfpack.
gnu/packages/maths.scm | 922 ++++++++++++++++++-
gnu/packages/patches/gklib-suitesparse.patch | 65 ++
2 files changed, 986 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/gklib-suitesparse.patch
--
2.41.0
^ permalink raw reply [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 01/20] gnu: suitesparse: Tweak description.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
@ 2023-09-20 22:07 ` David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 02/20] gnu: Add suitesparse-config David Elsing
` (20 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:07 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse)[description]: Mention that all
subpackages are included.
---
gnu/packages/maths.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6141c09886..a77928f9b6 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4960,7 +4960,10 @@ (define-public suitesparse
multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit
simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and
CXSparse, a concise sparse Cholesky factorization package; and many other
-packages.")
+packages.
+
+This package contains all of the above-mentioned parts.
+")
;; LGPLv2.1+:
;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL
;; GPLv2+:
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 02/20] gnu: Add suitesparse-config.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 01/20] gnu: suitesparse: Tweak description David Elsing
@ 2023-09-20 22:07 ` David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 03/20] gnu: Add suitesparse-amd David Elsing
` (19 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:07 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
The suitesparse-src variable contains the entire SuiteSparse source, from
which the source for the subpackages is extracted with the
suitesparse-package-src function using 'computed-origin-method'.
* gnu/packages/maths.scm (suitesparse-version, suitesparse-src,
suitesparse-config): New variable.
---
gnu/packages/maths.scm | 88 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a77928f9b6..23c27c1746 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4888,6 +4888,94 @@ (define-public openspecfun
;; public domain software.
(license (list license:expat license:public-domain))))
+;; Source for the modular SuiteSparse packages. When updating, also update the
+;; (different) versions of the subpackages.
+(define suitesparse-version "7.2.0")
+(define suitesparse-src
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/DrTimothyAldenDavis/SuiteSparse")
+ (commit (string-append "v" suitesparse-version))))
+ (file-name (git-file-name "suitesparse" suitesparse-version))
+ (sha256
+ (base32
+ "1draljn8i46862drc6008cnb2zjpklf74j8c34jirjazzpf53kaa"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Delete autogenerated and bundled files
+ (for-each delete-file (find-files "." "\\.pdf$"))
+ ;; ssget
+ (delete-file-recursively "ssget")
+ ;; SuiteSparse_config
+ (delete-file "SuiteSparse_config/SuiteSparse_config.h")
+ ;; CHOLMOD
+ (delete-file-recursively "CHOLMOD/SuiteSparse_metis")
+ ; GraphBLAS
+ (delete-file "GraphBLAS/README.md")
+ (delete-file "GraphBLAS/Config/GB_config.h")
+ (delete-file "GraphBLAS/Config/GB_prejit.c")
+ (delete-file-recursively "GraphBLAS/cpu_features")
+ (delete-file "GraphBLAS/CUDA/GB_cuda_common_jitFactory.hpp")
+ (delete-file "GraphBLAS/JITpackage/GB_JITpackage.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4.h")
+ (delete-file-recursively "GraphBLAS/lz4/lz4hc.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4hc.h")
+ (delete-file "GraphBLAS/GraphBLAS/Config/GB_config.h")
+ (delete-file "GraphBLAS/Tcov/PreJIT/GB_prejit.c")
+ (delete-file-recursively "GraphBLAS/Source/FactoryKernels")
+ (delete-file "GraphBLAS/Source/GB_AxB__include1.h")
+ (delete-file "GraphBLAS/xxHash/xxhash.h")
+ (delete-file-recursively "GraphBLAS/zstd/zstd_subset")
+ ;; KLU
+ (delete-file "KLU/Include/klu.h")
+ (delete-file "KLU/Doc/klu_version.tex")
+ ;; LDL
+ (delete-file "LDL/Include/ldl.h")
+ (delete-file "LDL/Doc/ldl_version.tex")
+ ;; RBio
+ (delete-file "RBio/Include/RBio.h")
+ ;; SPEX
+ (delete-file "SPEX/Include/SPEX.h")
+ (delete-file "SPEX/Doc/SPEX_version.tex")
+ ;; SPQR
+ (delete-file "SPQR/Include/SuiteSparseQR_definitions.h")
+ (delete-file "SPQR/Doc/spqr_version.tex")
+ ;; UMFPACK
+ (delete-file "UMFPACK/Include/umfpack.h")
+ (delete-file "UMFPACK/Doc/umfpack_version.tex")))))
+
+(define (suitesparse-package-src name path)
+ (origin
+ (method (@@ (guix packages) computed-origin-method))
+ (file-name
+ (string-append name "-" suitesparse-version))
+ (sha256 #f)
+ (uri
+ (delay
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (copy-recursively
+ (string-append #$suitesparse-src "/" #$path) #$output)))))))
+
+(define-public suitesparse-config
+ (package
+ (name "suitesparse-config")
+ (version suitesparse-version)
+ (source (suitesparse-package-src name "SuiteSparse_config"))
+ (build-system cmake-build-system)
+ (arguments (list #:tests? #f))
+ (inputs (list openblas))
+ (native-inputs (list pkg-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Configuration for all SuiteSparse packages")
+ (description "SuiteSparse is a suite of sparse matrix algorithms. This
+package contains a library with common configuration options.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 03/20] gnu: Add suitesparse-amd.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 01/20] gnu: suitesparse: Tweak description David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 02/20] gnu: Add suitesparse-config David Elsing
@ 2023-09-20 22:07 ` David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 04/20] gnu: Add suitesparse-btf David Elsing
` (18 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:07 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-amd): New variable.
---
gnu/packages/maths.scm | 45 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 23c27c1746..356e2e1d9d 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4976,6 +4976,51 @@ (define-public suitesparse-config
package contains a library with common configuration options.")
(license license:bsd-3)))
+(define-public suitesparse-amd
+ (package
+ (name "suitesparse-amd")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "AMD"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ ;; Required for suitesparse-umfpack
+ (add-after 'install 'install-internal-header
+ (lambda _
+ (install-file "../source/Include/amd_internal.h"
+ (string-append #$output "/include"))))
+ (add-after 'install-internal-header 'install-doc
+ (lambda _
+ (install-file "../source/Doc/AMD_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (native-inputs (list gfortran (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Sparse matrix ordering for Cholesky factorization")
+ (description "AMD is a set of routines for ordering a sparse matrix prior
+to Cholesky factorization (or for LU factorization with diagonal pivoting).")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 04/20] gnu: Add suitesparse-btf.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (2 preceding siblings ...)
2023-09-20 22:07 ` [bug#66129] [PATCH 03/20] gnu: Add suitesparse-amd David Elsing
@ 2023-09-20 22:07 ` David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 05/20] gnu: Add suitesparse-camd David Elsing
` (17 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:07 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-btf): New variable.
---
gnu/packages/maths.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 356e2e1d9d..f2c6f136a8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5021,6 +5021,36 @@ (define-public suitesparse-amd
to Cholesky factorization (or for LU factorization with diagonal pivoting).")
(license license:bsd-3)))
+(define-public suitesparse-btf
+ (package
+ (name "suitesparse-btf")
+ (version "2.2.0")
+ (source (suitesparse-package-src name "BTF"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Library for permuting matrices into block upper triangular form")
+ (description "BTF (Block Triangular Form) is a C library for permuting a
+matrix into block upper triangular form.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 05/20] gnu: Add suitesparse-camd.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (3 preceding siblings ...)
2023-09-20 22:07 ` [bug#66129] [PATCH 04/20] gnu: Add suitesparse-btf David Elsing
@ 2023-09-20 22:07 ` David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 06/20] gnu: Add suitesparse-colamd David Elsing
` (16 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:07 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-camd): New variable.
---
gnu/packages/maths.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f2c6f136a8..875e7dc391 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5051,6 +5051,48 @@ (define-public suitesparse-btf
matrix into block upper triangular form.")
(license license:lgpl2.1+)))
+(define-public suitesparse-camd
+ (package
+ (name "suitesparse-camd")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "CAMD"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/CAMD_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Sparse matrix ordering for Cholesky factorization with constraints")
+ (description "CAMD is a set of routines for ordering a sparse matrix prior
+to Cholesky factorization (or for LU factorization with diagonal pivoting).
+It is a variant of AMD which has the the option to apply constraints to the
+ordering.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 06/20] gnu: Add suitesparse-colamd.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (4 preceding siblings ...)
2023-09-20 22:07 ` [bug#66129] [PATCH 05/20] gnu: Add suitesparse-camd David Elsing
@ 2023-09-20 22:07 ` David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 07/20] gnu: Add suitesparse-ccolamd David Elsing
` (15 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:07 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-colamd): New variable.
---
gnu/packages/maths.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 875e7dc391..9a48a1fc65 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5093,6 +5093,36 @@ (define-public suitesparse-camd
ordering.")
(license license:bsd-3)))
+(define-public suitesparse-colamd
+ (package
+ (name "suitesparse-colamd")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "COLAMD"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Column Approximate Minimum Degree Ordering")
+ (description "COLAMD is library for computing a permutation vector for a
+matrix with which the LU factorization becomes sparser.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 07/20] gnu: Add suitesparse-ccolamd.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (5 preceding siblings ...)
2023-09-20 22:07 ` [bug#66129] [PATCH 06/20] gnu: Add suitesparse-colamd David Elsing
@ 2023-09-20 22:07 ` David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 08/20] gnu: Add gklib David Elsing
` (14 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:07 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-ccolamd): New variable.
---
gnu/packages/maths.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 9a48a1fc65..8f27134ba8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5123,6 +5123,37 @@ (define-public suitesparse-colamd
matrix with which the LU factorization becomes sparser.")
(license license:bsd-3)))
+(define-public suitesparse-ccolamd
+ (package
+ (name "suitesparse-ccolamd")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "CCOLAMD"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Column Approximate Minimum Degree Ordering with constraints")
+ (description "CCOLAMD is library for computing a permutation vector for a
+matrix with which the LU factorization becomes sparser. It is a variant of
+COLAMD which has the the option to apply constraints to the ordering.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 08/20] gnu: Add gklib.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (6 preceding siblings ...)
2023-09-20 22:07 ` [bug#66129] [PATCH 07/20] gnu: Add suitesparse-ccolamd David Elsing
@ 2023-09-20 22:07 ` David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 09/20] gnu: Add metis-5.2 David Elsing
` (13 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:07 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (gklib): New variable.
---
gnu/packages/maths.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 8f27134ba8..8e17629caa 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4193,6 +4193,32 @@ (define-public scotch-shared
(define-public pt-scotch-shared
(deprecated-package "pt-scotch-shared" pt-scotch))
+(define-public gklib
+ (let ((commit "8bd6bad750b2b0d90800c632cf18e8ee93ad72d7")
+ (revision "1"))
+ (package
+ (name "gklib")
+ (version (git-version "5.1.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/KarypisLab/GKlib")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "08k4zzyd7zsisdhfmnwz7zb9w3pzpgagyjq52mwk8i6sqajdxsdn"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON")))
+ (home-page "https://github.com/KarypisLab/GKlib")
+ (synopsis "Helper library for METIS")
+ (description
+ "GKlib is a library of various helper routines and frameworks used by
+software from KarypisLab, such as METIS.")
+ (license license:asl2.0))))
(define-public metis
(package
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 09/20] gnu: Add metis-5.2.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (7 preceding siblings ...)
2023-09-20 22:07 ` [bug#66129] [PATCH 08/20] gnu: Add gklib David Elsing
@ 2023-09-20 22:07 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 10/20] gnu: Add gklib-suitesparse David Elsing
` (12 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:07 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (metis-5.2): New variable.
---
gnu/packages/maths.scm | 48 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 8e17629caa..3150bac47f 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4220,6 +4220,7 @@ (define-public gklib
software from KarypisLab, such as METIS.")
(license license:asl2.0))))
+;; XXX: Remove once the full SuiteSparse package is replaced.
(define-public metis
(package
(name "metis")
@@ -4253,6 +4254,53 @@ (define-public metis
schemes.")
(license license:asl2.0))) ;As of version 5.0.3
+(define-public metis-5.2
+ (package
+ (name "metis")
+ (version "5.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/KarypisLab/METIS")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19vi1wsi2gp2m5vb715yfnzd2g7brm4r40qxg65ysrzgl13lpmvr"))
+ (snippet
+ #~(delete-file "manual/manual.pdf"))))
+ (build-system cmake-build-system)
+ (inputs (list gklib openblas))
+ (arguments
+ (list
+ #:tests? #f ; Tests are not automatic
+ #:configure-flags
+ #~(list "-DSHARED=ON"
+ (string-append "-DGKLIB_PATH=" #$gklib))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; The original Makefile copies some files and invokes CMake.
+ (add-before 'configure 'prepare-cmake
+ (lambda _
+ (substitute* "Makefile"
+ (("config: distclean") "config:")
+ (("BUILDDIR =.*")
+ "BUILDDIR = .\n")
+ ((".*cmake.*") ""))
+ (substitute* "CMakeLists.txt"
+ (("build/") "../source/"))
+ (invoke "make" "config"))))))
+ (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview")
+ (synopsis "Graph partitioning and fill-reducing matrix ordering library")
+ (description
+ "METIS is a set of serial programs for partitioning graphs, partitioning
+finite element meshes, and producing fill-reducing orderings for sparse
+matrices. The algorithms implemented in METIS are based on the multilevel
+recursive-bisection, multilevel k-way, and multi-constraint partitioning
+schemes.")
+ (license license:asl2.0)))
+
(define-public p4est
(package
(name "p4est")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 10/20] gnu: Add gklib-suitesparse.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (8 preceding siblings ...)
2023-09-20 22:07 ` [bug#66129] [PATCH 09/20] gnu: Add metis-5.2 David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 11/20] gnu: Add metis-suitesparse David Elsing
` (11 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (gklib-suitesparse): New variable.
---
gnu/packages/maths.scm | 25 ++++++++
gnu/packages/patches/gklib-suitesparse.patch | 65 ++++++++++++++++++++
2 files changed, 90 insertions(+)
create mode 100644 gnu/packages/patches/gklib-suitesparse.patch
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 3150bac47f..668d564edc 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5228,6 +5228,31 @@ (define-public suitesparse-ccolamd
COLAMD which has the the option to apply constraints to the ordering.")
(license license:bsd-3)))
+(define-public gklib-suitesparse
+ (package/inherit gklib
+ (name "gklib-suitesparse")
+ (source (origin
+ (inherit (package-source gklib))
+ (patches (cons
+ (search-patch
+ "gklib-suitesparse.patch")
+ (origin-patches (package-source gklib))))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments gklib)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'patch-cmake
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("add_library\\(GKlib.*" all)
+ (string-append
+ all
+ "target_link_libraries(GKlib PUBLIC"
+ " ${SUITESPARSE_CONFIG_LIBRARIES} m)\n")))))))))
+ (inputs
+ (modify-inputs (package-inputs gklib)
+ (prepend suitesparse-config)))))
+
(define-public suitesparse
(package
(name "suitesparse")
diff --git a/gnu/packages/patches/gklib-suitesparse.patch b/gnu/packages/patches/gklib-suitesparse.patch
new file mode 100644
index 0000000000..8b6c708b6a
--- /dev/null
+++ b/gnu/packages/patches/gklib-suitesparse.patch
@@ -0,0 +1,65 @@
+This patch contains the relevant changes to GKlib made in SuiteSparse
+(CHOLMOD) for the version 7.2.0
+(https://github.com/DrTimothyAldenDavis/SuiteSparse/commit/8a7641cdb4809533c681417e94f98058c07c5da2).
+The disabling of signal handling when MATLAB_MEX_FILE is defined is omitted.
+
+diff -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,6 +3,8 @@
+
+ option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF)
+
++find_package ( SuiteSparse_config 7.1.0 REQUIRED )
++
+ get_filename_component(abs "." ABSOLUTE)
+ set(GKLIB_PATH ${abs})
+ unset(abs)
+diff -ur a/GKlib.h b/GKlib.h
+--- a/GKlib.h
++++ b/GKlib.h
+@@ -59,6 +59,24 @@
+ #include <omp.h>
+ #endif
+
++/* -------------------------------------------------------------------------- */
++/* Added for incorporation into SuiteSparse.
++ Tim Davis, Oct 31, 2022, Texas A&M University. */
++#include "SuiteSparse_config.h"
++#define malloc SuiteSparse_config_malloc
++#define calloc SuiteSparse_config_calloc
++#define realloc SuiteSparse_config_realloc
++#define free(p) \
++{ \
++ if ((p) != NULL) \
++ { \
++ SuiteSparse_config_free (p) ; \
++ (p) = NULL ; \
++ } \
++}
++
++/* -------------------------------------------------------------------------- */
++
+
+
+
+diff -ur a/memory.c b/memory.c
+--- a/memory.c
++++ b/memory.c
+@@ -108,6 +108,8 @@
+ /*************************************************************************/
+ int gk_malloc_init()
+ {
++ gkmcore = NULL;
++#if 0
+ if (gkmcore == NULL)
+ gkmcore = gk_gkmcoreCreate();
+
+@@ -115,6 +117,7 @@
+ return 0;
+
+ gk_gkmcorePush(gkmcore);
++#endif
+
+ return 1;
+ }
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 11/20] gnu: Add metis-suitesparse.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (9 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 10/20] gnu: Add gklib-suitesparse David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 12/20] gnu: Add suitesparse-cholmod David Elsing
` (10 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (metis-suitesparse): New variable.
---
gnu/packages/maths.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 668d564edc..b34ad70321 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5253,6 +5253,32 @@ (define-public gklib-suitesparse
(modify-inputs (package-inputs gklib)
(prepend suitesparse-config)))))
+(define-public metis-suitesparse
+ (package/inherit metis-5.2
+ (name "metis-suitesparse")
+ (arguments
+ (substitute-keyword-arguments (package-arguments metis-5.2)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-before 'prepare-cmake 'set-idxwidth
+ (lambda _
+ (substitute* "Makefile"
+ (("IDXWIDTH.*=.*")
+ "IDXWIDTH = \"\\#define IDXTYPEWIDTH 64\"\n"))))
+ (add-before 'prepare-cmake 'link-suitesparse-config
+ (lambda _
+ (substitute* "programs/CMakeLists.txt"
+ (("include_directories.*" all)
+ (string-append
+ all "find_package(SuiteSparse_config REQUIRED)\n"))
+ (("(target_link_libraries.*)GKlib(.*)" _ start end)
+ (string-append
+ start "GKlib ${SUITESPARSE_CONFIG_LIBRARIES}" end)))))))
+ ((#:configure-flags _)
+ #~(list "-DSHARED=ON"
+ (string-append "-DGKLIB_PATH=" #$gklib-suitesparse)))))
+ (inputs (list suitesparse-config gklib-suitesparse))))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 12/20] gnu: Add suitesparse-cholmod.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (10 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 11/20] gnu: Add metis-suitesparse David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 13/20] gnu: Add suitesparse-cxsparse David Elsing
` (9 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-cholmod): New variable.
---
gnu/packages/maths.scm | 82 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b34ad70321..1dfd12af76 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5279,6 +5279,88 @@ (define-public metis-suitesparse
(string-append "-DGKLIB_PATH=" #$gklib-suitesparse)))))
(inputs (list suitesparse-config gklib-suitesparse))))
+(define-public suitesparse-cholmod
+ (package
+ (name "suitesparse-cholmod")
+ (version "4.2.0")
+ (source (suitesparse-package-src name "CHOLMOD"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n"))
+ (("add_subdirectory.*GPU.*") "\n")
+ ((".*cmake_modules/FindCHOLMOD_CUDA.cmake.*") "\n"))))
+ (add-after 'unpack 'use-external-metis
+ (lambda _
+ (let ((port (open-file "CMakeLists.txt" "a")))
+ (display
+ (string-append
+ "find_library(METIS_LIBRARY NAME metis PATHS ENV LIBRARY_PATH)
+get_filename_component(METIS_LIBRARY ${METIS_LIBRARY} REALPATH)
+find_library(GKLIB_LIBRARY NAME GKlib PATHS ENV LIBRARY_PATH)
+get_filename_component(GKLIB_LIBRARY ${GKLIB_LIBRARY} REALPATH)
+target_link_libraries(CHOLMOD PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY})
+target_link_libraries(CHOLMOD_static PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY})")
+ port)
+ (close-port port))
+ (delete-file "Partition/cholmod_metis_wrapper.c")
+ (delete-file "Partition/cholmod_metis_wrapper.h")
+ (substitute* "Partition/cholmod_metis.c"
+ (("#include \"cholmod_metis_wrapper\\.h\"") "")
+ (("#include \"SuiteSparse_metis/include/metis.h\"")
+ "#include <metis.h>")
+ (("SuiteSparse_metis_METIS") "METIS"))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/CHOLMOD_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((out (string-append #$output
+ "/share/doc/" #$name "-" #$version)))
+ (install-file "../source/Doc/License.txt" out)
+ (install-file "../source/Core/lesser.txt" out)
+ (install-file "../source/MatrixOps/gpl.txt" out)))))))
+ (inputs
+ (list gklib-suitesparse
+ metis-suitesparse
+ openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Library for solving sparse symmetric positive definite linear
+equations")
+ (description "CHOLMOD is a set of routins for factorizing sparse symmetrix
+positive definite matrices, updating/downdating sparse Cholesky factorizations
+and other related operations.")
+ (license (list license:gpl2+ license:lgpl2.1+))))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 13/20] gnu: Add suitesparse-cxsparse.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (11 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 12/20] gnu: Add suitesparse-cholmod David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 14/20] gnu: Add suitesparse-klu David Elsing
` (8 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-cxsparse): New variable.
---
gnu/packages/maths.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 1dfd12af76..57e3f82fa8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5361,6 +5361,37 @@ (define-public suitesparse-cholmod
and other related operations.")
(license (list license:gpl2+ license:lgpl2.1+))))
+(define-public suitesparse-cxsparse
+ (package
+ (name "suitesparse-cxsparse")
+ (version "4.2.0")
+ (source (suitesparse-package-src name "CXSparse"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((out (string-append #$output
+ "/share/doc/" #$name "-" #$version)))
+ (install-file "../source/Doc/License.txt" out)
+ (install-file "../source/Doc/lesser.txt" out)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Concise eXtended Sparse Matrix Package")
+ (description "CXSparse is a collection of sparse matrix algorithms for
+direct methods on both real and complex matrices.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 14/20] gnu: Add suitesparse-klu.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (12 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 13/20] gnu: Add suitesparse-cxsparse David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 15/20] gnu: Add suitesparse-ldl David Elsing
` (7 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-klu): New variable.
---
gnu/packages/maths.scm | 61 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 57e3f82fa8..cfa631b975 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5392,6 +5392,67 @@ (define-public suitesparse-cxsparse
direct methods on both real and complex matrices.")
(license license:lgpl2.1+)))
+(define-public suitesparse-klu
+ (package
+ (name "suitesparse-klu")
+ (version "2.2.0")
+ (source
+ (suitesparse-package-src name "KLU"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-btf
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-cholmod
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (substitute* "../source/Doc/Makefile"
+ (("\\.\\./\\.\\./BTF/Include/btf.h")
+ (string-append #$suitesparse-btf "/include/btf.h")))
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/KLU_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list suitesparse-amd
+ suitesparse-btf
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Routines for solving sparse linear problems with a LU factorization")
+ (description "KLU is a method for computing the LU factorization of sparse
+for real and complex matrices.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 15/20] gnu: Add suitesparse-ldl.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (13 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 14/20] gnu: Add suitesparse-klu David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 16/20] gnu: Add suitesparse-rbio David Elsing
` (6 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-ldl): New variable.
---
gnu/packages/maths.scm | 51 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index cfa631b975..b317b1b18a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5453,6 +5453,57 @@ (define-public suitesparse-klu
for real and complex matrices.")
(license license:lgpl2.1+)))
+(define-public suitesparse-ldl
+ (package
+ (name "suitesparse-ldl")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "LDL"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (substitute* "../source/Doc/Makefile"
+ (("\\.\\./\\.\\./BTF/Include/btf.h")
+ (string-append #$suitesparse-btf "/include/btf.h")))
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/ldl_userguide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list suitesparse-amd
+ suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "LDL' factorization method for sparse, symmetric matrices")
+ (description "This package contains a set of routines for computing the
+LDL' factorization of sparse, symmetric matrices. Its focus lies on concise
+code.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 16/20] gnu: Add suitesparse-rbio.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (14 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 15/20] gnu: Add suitesparse-ldl David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 17/20] gnu: Add suitesparse-mongoose David Elsing
` (5 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-rbio): New variable.
---
gnu/packages/maths.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b317b1b18a..84ad02b3df 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5504,6 +5504,41 @@ (define-public suitesparse-ldl
code.")
(license license:lgpl2.1+)))
+(define-public suitesparse-rbio
+ (package
+ (name "suitesparse-rbio")
+ (version "4.2.0")
+ (source (suitesparse-package-src name "RBio"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((out (string-append #$output
+ "/share/doc/" #$name "-" #$version)))
+ (install-file "../source/Doc/License.txt" out)
+ (install-file "../source/Doc/gpl.txt" out)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Library for the Rutherford/Boeing sparse matrix format")
+ (description "This package provides the C library of RBio. It can be used
+for reading and writing sparse matrices in the Rutherford/Boeing format.")
+ (license license:gpl2+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 17/20] gnu: Add suitesparse-mongoose.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (15 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 16/20] gnu: Add suitesparse-rbio David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 18/20] gnu: Add suitesparse-spex David Elsing
` (4 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-mongoose): New variable.
---
gnu/packages/maths.scm | 72 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 84ad02b3df..e958e6521b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5539,6 +5539,78 @@ (define-public suitesparse-rbio
for reading and writing sparse matrices in the Rutherford/Boeing format.")
(license license:gpl2+)))
+(define-public suitesparse-mongoose
+ (package
+ (name "suitesparse-mongoose")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "Mongoose"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ ;; XeLaTeX fails with .eps graphics
+ (with-directory-excursion "../source/Doc"
+ (for-each
+ (lambda (name)
+ (invoke "epstopdf" name))
+ (find-files "Figures" "\\.eps$"))
+ (substitute* "Mongoose_UserGuide.tex"
+ (("\\.eps") ".pdf"))
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/Mongoose_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (native-inputs
+ (list texlive-epstopdf
+ (texlive-updmap.cfg
+ (list texlive-algorithmicx
+ texlive-booktabs
+ texlive-lastpage
+ texlive-multirow
+ texlive-pgf
+ texlive-caption
+ texlive-etoolbox
+ texlive-csquotes
+ texlive-fancybox
+ texlive-enumitem
+ texlive-microtype
+ texlive-cancel
+ texlive-sourcecodepro
+ texlive-xkeyval
+ texlive-fontspec
+ texlive-wasy
+ texlive-wasysym
+ texlive-float
+ texlive-tcolorbox
+ texlive-environ
+ texlive-xcolor
+ texlive-xetex
+ texlive-listings))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Graph partitioning library")
+ (description "Mongoose is a library for graph partitioning by computing
+edge cuts using a coarsening and refinement framework.")
+ (license license:gpl3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 18/20] gnu: Add suitesparse-spex.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (16 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 17/20] gnu: Add suitesparse-mongoose David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 19/20] gnu: Add suitesparse-spqr David Elsing
` (3 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-spex): New variable.
---
gnu/packages/maths.scm | 67 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e958e6521b..0c9b983ab0 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5611,6 +5611,73 @@ (define-public suitesparse-mongoose
edge cuts using a coarsening and refinement framework.")
(license license:gpl3)))
+(define-public suitesparse-spex
+ (package
+ (name "suitesparse-spex")
+ (version "2.2.0")
+ (source (suitesparse-package-src name "SPEX"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/SPEX_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list gmp
+ mpfr
+ suitesparse-amd
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs
+ (list (texlive-updmap.cfg
+ (list texlive-paralist
+ texlive-comment
+ texlive-psfrag
+ texlive-soul
+ texlive-multirow
+ texlive-algorithms
+ texlive-float
+ texlive-algorithmicx
+ texlive-cprotect
+ texlive-bigfoot
+ texlive-caption
+ texlive-listings
+ texlive-xcolor
+ texlive-framed
+ texlive-mdframed
+ texlive-etoolbox
+ texlive-zref
+ texlive-needspace))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Package for SParse EXact algebra")
+ (description "SPEX is a set of routines for sparse exact linear algebra.
+It contains the SPEX Left LU library for computing a sparse exact left-looking
+LU factorization for solving unsymmetric sparse linear systems.")
+ ;; Dual licensed.
+ (license (list license:lgpl3+ license:gpl2+))))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 19/20] gnu: Add suitesparse-spqr.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (17 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 18/20] gnu: Add suitesparse-spex David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 20/20] gnu: Add suitesparse-umfpack David Elsing
` (2 subsequent siblings)
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-spqr): New variable.
---
gnu/packages/maths.scm | 59 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0c9b983ab0..f45ff900cf 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5678,6 +5678,65 @@ (define-public suitesparse-spex
;; Dual licensed.
(license (list license:lgpl3+ license:gpl2+))))
+(define-public suitesparse-spqr
+ (package
+ (name "suitesparse-spqr")
+ (version "4.2.0")
+ (source (suitesparse-package-src name "SPQR"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-cholmod
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/spqr_user_guide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs
+ (list (texlive-updmap.cfg
+ (list texlive-epsf))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Sparse QR factorization method")
+ (description "The SPQR (SuiteSparseQR) package provides sparse QR
+factorization based on the multifrontal method, using BLAS for the frontal
+matrices.")
+ (license license:gpl2+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 20/20] gnu: Add suitesparse-umfpack.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (18 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 19/20] gnu: Add suitesparse-spqr David Elsing
@ 2023-09-20 22:08 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
2023-10-05 13:20 ` [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages Ludovic Courtès
21 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-20 22:08 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-umfpack): New variable.
---
gnu/packages/maths.scm | 68 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f45ff900cf..eeff1b5ece 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5737,6 +5737,74 @@ (define-public suitesparse-spqr
matrices.")
(license license:gpl2+)))
+(define-public suitesparse-umfpack
+ (package
+ (name "suitesparse-umfpack")
+ (version "6.2.0")
+ (source (suitesparse-package-src name "UMFPACK"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-cholmod
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (let ((outdir
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))
+ (install-file "../source/Doc/UMFPACK_UserGuide.pdf" outdir)
+ (install-file "../source/Doc/UMFPACK_QuickStart.pdf" outdir))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((outdir
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))
+ (install-file "../source/Doc/License.txt" outdir)
+ (install-file "../source/Doc/gpl.txt" outdir)))))))
+ (inputs
+ (list openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs
+ (list (texlive-updmap.cfg
+ (list texlive-etoolbox
+ texlive-framed
+ texlive-mdframed
+ texlive-needspace
+ texlive-xcolor
+ texlive-zref))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Routines for solving sparse linear problems via LU factorization")
+ (description "UMFPACK is a set of routines for solving unsymmetric sparse
+linear systems using the Unsymmetric MultiFrontal method and direct sparse LU
+factorization.")
+ (license license:gpl2+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description.
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (19 preceding siblings ...)
2023-09-20 22:08 ` [bug#66129] [PATCH 20/20] gnu: Add suitesparse-umfpack David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 02/20] gnu: Add suitesparse-config David Elsing
` (18 more replies)
2023-10-05 13:20 ` [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages Ludovic Courtès
21 siblings, 19 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse)[description]: Mention that all
subpackages are included.
---
gnu/packages/maths.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6141c09886..a77928f9b6 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4960,7 +4960,10 @@ (define-public suitesparse
multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit
simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and
CXSparse, a concise sparse Cholesky factorization package; and many other
-packages.")
+packages.
+
+This package contains all of the above-mentioned parts.
+")
;; LGPLv2.1+:
;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL
;; GPLv2+:
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 02/20] gnu: Add suitesparse-config.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 03/20] gnu: Add suitesparse-amd David Elsing
` (17 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
The suitesparse-src variable contains the entire SuiteSparse source, from
which the source for the subpackages is extracted with the
suitesparse-package-src function using 'computed-origin-method'.
* gnu/packages/maths.scm (suitesparse-version, suitesparse-src,
suitesparse-config): New variable.
---
gnu/packages/maths.scm | 88 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a77928f9b6..23c27c1746 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4888,6 +4888,94 @@ (define-public openspecfun
;; public domain software.
(license (list license:expat license:public-domain))))
+;; Source for the modular SuiteSparse packages. When updating, also update the
+;; (different) versions of the subpackages.
+(define suitesparse-version "7.2.0")
+(define suitesparse-src
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/DrTimothyAldenDavis/SuiteSparse")
+ (commit (string-append "v" suitesparse-version))))
+ (file-name (git-file-name "suitesparse" suitesparse-version))
+ (sha256
+ (base32
+ "1draljn8i46862drc6008cnb2zjpklf74j8c34jirjazzpf53kaa"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Delete autogenerated and bundled files
+ (for-each delete-file (find-files "." "\\.pdf$"))
+ ;; ssget
+ (delete-file-recursively "ssget")
+ ;; SuiteSparse_config
+ (delete-file "SuiteSparse_config/SuiteSparse_config.h")
+ ;; CHOLMOD
+ (delete-file-recursively "CHOLMOD/SuiteSparse_metis")
+ ; GraphBLAS
+ (delete-file "GraphBLAS/README.md")
+ (delete-file "GraphBLAS/Config/GB_config.h")
+ (delete-file "GraphBLAS/Config/GB_prejit.c")
+ (delete-file-recursively "GraphBLAS/cpu_features")
+ (delete-file "GraphBLAS/CUDA/GB_cuda_common_jitFactory.hpp")
+ (delete-file "GraphBLAS/JITpackage/GB_JITpackage.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4.h")
+ (delete-file-recursively "GraphBLAS/lz4/lz4hc.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4hc.h")
+ (delete-file "GraphBLAS/GraphBLAS/Config/GB_config.h")
+ (delete-file "GraphBLAS/Tcov/PreJIT/GB_prejit.c")
+ (delete-file-recursively "GraphBLAS/Source/FactoryKernels")
+ (delete-file "GraphBLAS/Source/GB_AxB__include1.h")
+ (delete-file "GraphBLAS/xxHash/xxhash.h")
+ (delete-file-recursively "GraphBLAS/zstd/zstd_subset")
+ ;; KLU
+ (delete-file "KLU/Include/klu.h")
+ (delete-file "KLU/Doc/klu_version.tex")
+ ;; LDL
+ (delete-file "LDL/Include/ldl.h")
+ (delete-file "LDL/Doc/ldl_version.tex")
+ ;; RBio
+ (delete-file "RBio/Include/RBio.h")
+ ;; SPEX
+ (delete-file "SPEX/Include/SPEX.h")
+ (delete-file "SPEX/Doc/SPEX_version.tex")
+ ;; SPQR
+ (delete-file "SPQR/Include/SuiteSparseQR_definitions.h")
+ (delete-file "SPQR/Doc/spqr_version.tex")
+ ;; UMFPACK
+ (delete-file "UMFPACK/Include/umfpack.h")
+ (delete-file "UMFPACK/Doc/umfpack_version.tex")))))
+
+(define (suitesparse-package-src name path)
+ (origin
+ (method (@@ (guix packages) computed-origin-method))
+ (file-name
+ (string-append name "-" suitesparse-version))
+ (sha256 #f)
+ (uri
+ (delay
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (copy-recursively
+ (string-append #$suitesparse-src "/" #$path) #$output)))))))
+
+(define-public suitesparse-config
+ (package
+ (name "suitesparse-config")
+ (version suitesparse-version)
+ (source (suitesparse-package-src name "SuiteSparse_config"))
+ (build-system cmake-build-system)
+ (arguments (list #:tests? #f))
+ (inputs (list openblas))
+ (native-inputs (list pkg-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Configuration for all SuiteSparse packages")
+ (description "SuiteSparse is a suite of sparse matrix algorithms. This
+package contains a library with common configuration options.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 03/20] gnu: Add suitesparse-amd.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 02/20] gnu: Add suitesparse-config David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 04/20] gnu: Add suitesparse-btf David Elsing
` (16 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-amd): New variable.
---
gnu/packages/maths.scm | 45 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 23c27c1746..356e2e1d9d 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4976,6 +4976,51 @@ (define-public suitesparse-config
package contains a library with common configuration options.")
(license license:bsd-3)))
+(define-public suitesparse-amd
+ (package
+ (name "suitesparse-amd")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "AMD"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ ;; Required for suitesparse-umfpack
+ (add-after 'install 'install-internal-header
+ (lambda _
+ (install-file "../source/Include/amd_internal.h"
+ (string-append #$output "/include"))))
+ (add-after 'install-internal-header 'install-doc
+ (lambda _
+ (install-file "../source/Doc/AMD_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (native-inputs (list gfortran (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Sparse matrix ordering for Cholesky factorization")
+ (description "AMD is a set of routines for ordering a sparse matrix prior
+to Cholesky factorization (or for LU factorization with diagonal pivoting).")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 04/20] gnu: Add suitesparse-btf.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 02/20] gnu: Add suitesparse-config David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 03/20] gnu: Add suitesparse-amd David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 05/20] gnu: Add suitesparse-camd David Elsing
` (15 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-btf): New variable.
---
gnu/packages/maths.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 356e2e1d9d..f2c6f136a8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5021,6 +5021,36 @@ (define-public suitesparse-amd
to Cholesky factorization (or for LU factorization with diagonal pivoting).")
(license license:bsd-3)))
+(define-public suitesparse-btf
+ (package
+ (name "suitesparse-btf")
+ (version "2.2.0")
+ (source (suitesparse-package-src name "BTF"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Library for permuting matrices into block upper triangular form")
+ (description "BTF (Block Triangular Form) is a C library for permuting a
+matrix into block upper triangular form.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 05/20] gnu: Add suitesparse-camd.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (2 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 04/20] gnu: Add suitesparse-btf David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 06/20] gnu: Add suitesparse-colamd David Elsing
` (14 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-camd): New variable.
---
gnu/packages/maths.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f2c6f136a8..875e7dc391 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5051,6 +5051,48 @@ (define-public suitesparse-btf
matrix into block upper triangular form.")
(license license:lgpl2.1+)))
+(define-public suitesparse-camd
+ (package
+ (name "suitesparse-camd")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "CAMD"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/CAMD_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Sparse matrix ordering for Cholesky factorization with constraints")
+ (description "CAMD is a set of routines for ordering a sparse matrix prior
+to Cholesky factorization (or for LU factorization with diagonal pivoting).
+It is a variant of AMD which has the the option to apply constraints to the
+ordering.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 06/20] gnu: Add suitesparse-colamd.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (3 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 05/20] gnu: Add suitesparse-camd David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 07/20] gnu: Add suitesparse-ccolamd David Elsing
` (13 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-colamd): New variable.
---
gnu/packages/maths.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 875e7dc391..9a48a1fc65 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5093,6 +5093,36 @@ (define-public suitesparse-camd
ordering.")
(license license:bsd-3)))
+(define-public suitesparse-colamd
+ (package
+ (name "suitesparse-colamd")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "COLAMD"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Column Approximate Minimum Degree Ordering")
+ (description "COLAMD is library for computing a permutation vector for a
+matrix with which the LU factorization becomes sparser.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 07/20] gnu: Add suitesparse-ccolamd.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (4 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 06/20] gnu: Add suitesparse-colamd David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 08/20] gnu: Add gklib David Elsing
` (12 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-ccolamd): New variable.
---
gnu/packages/maths.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 9a48a1fc65..8f27134ba8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5123,6 +5123,37 @@ (define-public suitesparse-colamd
matrix with which the LU factorization becomes sparser.")
(license license:bsd-3)))
+(define-public suitesparse-ccolamd
+ (package
+ (name "suitesparse-ccolamd")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "CCOLAMD"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Column Approximate Minimum Degree Ordering with constraints")
+ (description "CCOLAMD is library for computing a permutation vector for a
+matrix with which the LU factorization becomes sparser. It is a variant of
+COLAMD which has the the option to apply constraints to the ordering.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 08/20] gnu: Add gklib.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (5 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 07/20] gnu: Add suitesparse-ccolamd David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 09/20] gnu: Add metis-5.2 David Elsing
` (11 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (gklib): New variable.
---
gnu/packages/maths.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 8f27134ba8..a2650b3101 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4193,6 +4193,42 @@ (define-public scotch-shared
(define-public pt-scotch-shared
(deprecated-package "pt-scotch-shared" pt-scotch))
+(define-public gklib
+ (let ((commit "8bd6bad750b2b0d90800c632cf18e8ee93ad72d7")
+ (revision "1"))
+ (package
+ (name "gklib")
+ (version (git-version "5.1.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/KarypisLab/GKlib")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "08k4zzyd7zsisdhfmnwz7zb9w3pzpgagyjq52mwk8i6sqajdxsdn"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list "-DBUILD_SHARED_LIBS=ON"
+ #$@(if (target-x86?)
+ '()
+ '("-DNO_X86=1")))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-march=native
+ (lambda _
+ (substitute* "GKlibSystem.cmake"
+ (("-march=native") "")))))))
+ (home-page "https://github.com/KarypisLab/GKlib")
+ (synopsis "Helper library for METIS")
+ (description
+ "GKlib is a library of various helper routines and frameworks used by
+software from KarypisLab, such as METIS.")
+ (license license:asl2.0))))
(define-public metis
(package
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 09/20] gnu: Add metis-5.2.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (6 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 08/20] gnu: Add gklib David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 10/20] gnu: Add gklib-suitesparse David Elsing
` (10 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (metis-5.2): New variable.
---
gnu/packages/maths.scm | 48 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a2650b3101..2a9040ad39 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4230,6 +4230,7 @@ (define-public gklib
software from KarypisLab, such as METIS.")
(license license:asl2.0))))
+;; XXX: Remove once the full SuiteSparse package is replaced.
(define-public metis
(package
(name "metis")
@@ -4263,6 +4264,53 @@ (define-public metis
schemes.")
(license license:asl2.0))) ;As of version 5.0.3
+(define-public metis-5.2
+ (package
+ (name "metis")
+ (version "5.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/KarypisLab/METIS")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19vi1wsi2gp2m5vb715yfnzd2g7brm4r40qxg65ysrzgl13lpmvr"))
+ (snippet
+ #~(delete-file "manual/manual.pdf"))))
+ (build-system cmake-build-system)
+ (inputs (list gklib openblas))
+ (arguments
+ (list
+ #:tests? #f ; Tests are not automatic
+ #:configure-flags
+ #~(list "-DSHARED=ON"
+ (string-append "-DGKLIB_PATH=" #$gklib))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; The original Makefile copies some files and invokes CMake.
+ (add-before 'configure 'prepare-cmake
+ (lambda _
+ (substitute* "Makefile"
+ (("config: distclean") "config:")
+ (("BUILDDIR =.*")
+ "BUILDDIR = .\n")
+ ((".*cmake.*") ""))
+ (substitute* "CMakeLists.txt"
+ (("build/") "../source/"))
+ (invoke "make" "config"))))))
+ (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview")
+ (synopsis "Graph partitioning and fill-reducing matrix ordering library")
+ (description
+ "METIS is a set of serial programs for partitioning graphs, partitioning
+finite element meshes, and producing fill-reducing orderings for sparse
+matrices. The algorithms implemented in METIS are based on the multilevel
+recursive-bisection, multilevel k-way, and multi-constraint partitioning
+schemes.")
+ (license license:asl2.0)))
+
(define-public p4est
(package
(name "p4est")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 10/20] gnu: Add gklib-suitesparse.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (7 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 09/20] gnu: Add metis-5.2 David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 11/20] gnu: Add metis-suitesparse David Elsing
` (9 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (gklib-suitesparse): New variable.
---
gnu/packages/maths.scm | 25 ++++++++
gnu/packages/patches/gklib-suitesparse.patch | 65 ++++++++++++++++++++
2 files changed, 90 insertions(+)
create mode 100644 gnu/packages/patches/gklib-suitesparse.patch
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2a9040ad39..3a86e90cb5 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5238,6 +5238,31 @@ (define-public suitesparse-ccolamd
COLAMD which has the the option to apply constraints to the ordering.")
(license license:bsd-3)))
+(define-public gklib-suitesparse
+ (package/inherit gklib
+ (name "gklib-suitesparse")
+ (source (origin
+ (inherit (package-source gklib))
+ (patches (cons
+ (search-patch
+ "gklib-suitesparse.patch")
+ (origin-patches (package-source gklib))))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments gklib)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'patch-cmake
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("add_library\\(GKlib.*" all)
+ (string-append
+ all
+ "target_link_libraries(GKlib PUBLIC"
+ " ${SUITESPARSE_CONFIG_LIBRARIES} m)\n")))))))))
+ (inputs
+ (modify-inputs (package-inputs gklib)
+ (prepend suitesparse-config)))))
+
(define-public suitesparse
(package
(name "suitesparse")
diff --git a/gnu/packages/patches/gklib-suitesparse.patch b/gnu/packages/patches/gklib-suitesparse.patch
new file mode 100644
index 0000000000..8b6c708b6a
--- /dev/null
+++ b/gnu/packages/patches/gklib-suitesparse.patch
@@ -0,0 +1,65 @@
+This patch contains the relevant changes to GKlib made in SuiteSparse
+(CHOLMOD) for the version 7.2.0
+(https://github.com/DrTimothyAldenDavis/SuiteSparse/commit/8a7641cdb4809533c681417e94f98058c07c5da2).
+The disabling of signal handling when MATLAB_MEX_FILE is defined is omitted.
+
+diff -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,6 +3,8 @@
+
+ option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF)
+
++find_package ( SuiteSparse_config 7.1.0 REQUIRED )
++
+ get_filename_component(abs "." ABSOLUTE)
+ set(GKLIB_PATH ${abs})
+ unset(abs)
+diff -ur a/GKlib.h b/GKlib.h
+--- a/GKlib.h
++++ b/GKlib.h
+@@ -59,6 +59,24 @@
+ #include <omp.h>
+ #endif
+
++/* -------------------------------------------------------------------------- */
++/* Added for incorporation into SuiteSparse.
++ Tim Davis, Oct 31, 2022, Texas A&M University. */
++#include "SuiteSparse_config.h"
++#define malloc SuiteSparse_config_malloc
++#define calloc SuiteSparse_config_calloc
++#define realloc SuiteSparse_config_realloc
++#define free(p) \
++{ \
++ if ((p) != NULL) \
++ { \
++ SuiteSparse_config_free (p) ; \
++ (p) = NULL ; \
++ } \
++}
++
++/* -------------------------------------------------------------------------- */
++
+
+
+
+diff -ur a/memory.c b/memory.c
+--- a/memory.c
++++ b/memory.c
+@@ -108,6 +108,8 @@
+ /*************************************************************************/
+ int gk_malloc_init()
+ {
++ gkmcore = NULL;
++#if 0
+ if (gkmcore == NULL)
+ gkmcore = gk_gkmcoreCreate();
+
+@@ -115,6 +117,7 @@
+ return 0;
+
+ gk_gkmcorePush(gkmcore);
++#endif
+
+ return 1;
+ }
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 11/20] gnu: Add metis-suitesparse.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (8 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 10/20] gnu: Add gklib-suitesparse David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 12/20] gnu: Add suitesparse-cholmod David Elsing
` (8 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (metis-suitesparse): New variable.
---
gnu/packages/maths.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 3a86e90cb5..3f80029414 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5263,6 +5263,32 @@ (define-public gklib-suitesparse
(modify-inputs (package-inputs gklib)
(prepend suitesparse-config)))))
+(define-public metis-suitesparse
+ (package/inherit metis-5.2
+ (name "metis-suitesparse")
+ (arguments
+ (substitute-keyword-arguments (package-arguments metis-5.2)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-before 'prepare-cmake 'set-idxwidth
+ (lambda _
+ (substitute* "Makefile"
+ (("IDXWIDTH.*=.*")
+ "IDXWIDTH = \"\\#define IDXTYPEWIDTH 64\"\n"))))
+ (add-before 'prepare-cmake 'link-suitesparse-config
+ (lambda _
+ (substitute* "programs/CMakeLists.txt"
+ (("include_directories.*" all)
+ (string-append
+ all "find_package(SuiteSparse_config REQUIRED)\n"))
+ (("(target_link_libraries.*)GKlib(.*)" _ start end)
+ (string-append
+ start "GKlib ${SUITESPARSE_CONFIG_LIBRARIES}" end)))))))
+ ((#:configure-flags _)
+ #~(list "-DSHARED=ON"
+ (string-append "-DGKLIB_PATH=" #$gklib-suitesparse)))))
+ (inputs (list suitesparse-config gklib-suitesparse))))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 12/20] gnu: Add suitesparse-cholmod.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (9 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 11/20] gnu: Add metis-suitesparse David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 13/20] gnu: Add suitesparse-cxsparse David Elsing
` (7 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-cholmod): New variable.
---
gnu/packages/maths.scm | 82 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 3f80029414..271ae8137b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5289,6 +5289,88 @@ (define-public metis-suitesparse
(string-append "-DGKLIB_PATH=" #$gklib-suitesparse)))))
(inputs (list suitesparse-config gklib-suitesparse))))
+(define-public suitesparse-cholmod
+ (package
+ (name "suitesparse-cholmod")
+ (version "4.2.0")
+ (source (suitesparse-package-src name "CHOLMOD"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n"))
+ (("add_subdirectory.*GPU.*") "\n")
+ ((".*cmake_modules/FindCHOLMOD_CUDA.cmake.*") "\n"))))
+ (add-after 'unpack 'use-external-metis
+ (lambda _
+ (let ((port (open-file "CMakeLists.txt" "a")))
+ (display
+ (string-append
+ "find_library(METIS_LIBRARY NAME metis PATHS ENV LIBRARY_PATH)
+get_filename_component(METIS_LIBRARY ${METIS_LIBRARY} REALPATH)
+find_library(GKLIB_LIBRARY NAME GKlib PATHS ENV LIBRARY_PATH)
+get_filename_component(GKLIB_LIBRARY ${GKLIB_LIBRARY} REALPATH)
+target_link_libraries(CHOLMOD PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY})
+target_link_libraries(CHOLMOD_static PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY})")
+ port)
+ (close-port port))
+ (delete-file "Partition/cholmod_metis_wrapper.c")
+ (delete-file "Partition/cholmod_metis_wrapper.h")
+ (substitute* "Partition/cholmod_metis.c"
+ (("#include \"cholmod_metis_wrapper\\.h\"") "")
+ (("#include \"SuiteSparse_metis/include/metis.h\"")
+ "#include <metis.h>")
+ (("SuiteSparse_metis_METIS") "METIS"))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/CHOLMOD_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((out (string-append #$output
+ "/share/doc/" #$name "-" #$version)))
+ (install-file "../source/Doc/License.txt" out)
+ (install-file "../source/Core/lesser.txt" out)
+ (install-file "../source/MatrixOps/gpl.txt" out)))))))
+ (inputs
+ (list gklib-suitesparse
+ metis-suitesparse
+ openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Library for solving sparse symmetric positive definite linear
+equations")
+ (description "CHOLMOD is a set of routins for factorizing sparse symmetrix
+positive definite matrices, updating/downdating sparse Cholesky factorizations
+and other related operations.")
+ (license (list license:gpl2+ license:lgpl2.1+))))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 13/20] gnu: Add suitesparse-cxsparse.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (10 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 12/20] gnu: Add suitesparse-cholmod David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 14/20] gnu: Add suitesparse-klu David Elsing
` (6 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-cxsparse): New variable.
---
gnu/packages/maths.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 271ae8137b..813f9bd568 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5371,6 +5371,37 @@ (define-public suitesparse-cholmod
and other related operations.")
(license (list license:gpl2+ license:lgpl2.1+))))
+(define-public suitesparse-cxsparse
+ (package
+ (name "suitesparse-cxsparse")
+ (version "4.2.0")
+ (source (suitesparse-package-src name "CXSparse"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((out (string-append #$output
+ "/share/doc/" #$name "-" #$version)))
+ (install-file "../source/Doc/License.txt" out)
+ (install-file "../source/Doc/lesser.txt" out)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Concise eXtended Sparse Matrix Package")
+ (description "CXSparse is a collection of sparse matrix algorithms for
+direct methods on both real and complex matrices.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 14/20] gnu: Add suitesparse-klu.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (11 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 13/20] gnu: Add suitesparse-cxsparse David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 15/20] gnu: Add suitesparse-ldl David Elsing
` (5 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-klu): New variable.
---
gnu/packages/maths.scm | 61 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 813f9bd568..9b85ceb6a8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5402,6 +5402,67 @@ (define-public suitesparse-cxsparse
direct methods on both real and complex matrices.")
(license license:lgpl2.1+)))
+(define-public suitesparse-klu
+ (package
+ (name "suitesparse-klu")
+ (version "2.2.0")
+ (source
+ (suitesparse-package-src name "KLU"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-btf
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-cholmod
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (substitute* "../source/Doc/Makefile"
+ (("\\.\\./\\.\\./BTF/Include/btf.h")
+ (string-append #$suitesparse-btf "/include/btf.h")))
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/KLU_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list suitesparse-amd
+ suitesparse-btf
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Routines for solving sparse linear problems with a LU factorization")
+ (description "KLU is a method for computing the LU factorization of sparse
+for real and complex matrices.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 15/20] gnu: Add suitesparse-ldl.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (12 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 14/20] gnu: Add suitesparse-klu David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 16/20] gnu: Add suitesparse-rbio David Elsing
` (4 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-ldl): New variable.
---
gnu/packages/maths.scm | 51 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 9b85ceb6a8..1121f09b22 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5463,6 +5463,57 @@ (define-public suitesparse-klu
for real and complex matrices.")
(license license:lgpl2.1+)))
+(define-public suitesparse-ldl
+ (package
+ (name "suitesparse-ldl")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "LDL"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (substitute* "../source/Doc/Makefile"
+ (("\\.\\./\\.\\./BTF/Include/btf.h")
+ (string-append #$suitesparse-btf "/include/btf.h")))
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/ldl_userguide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list suitesparse-amd
+ suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "LDL' factorization method for sparse, symmetric matrices")
+ (description "This package contains a set of routines for computing the
+LDL' factorization of sparse, symmetric matrices. Its focus lies on concise
+code.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 16/20] gnu: Add suitesparse-rbio.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (13 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 15/20] gnu: Add suitesparse-ldl David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 17/20] gnu: Add suitesparse-mongoose David Elsing
` (3 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-rbio): New variable.
---
gnu/packages/maths.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 1121f09b22..2b7f7ef0ef 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5514,6 +5514,41 @@ (define-public suitesparse-ldl
code.")
(license license:lgpl2.1+)))
+(define-public suitesparse-rbio
+ (package
+ (name "suitesparse-rbio")
+ (version "4.2.0")
+ (source (suitesparse-package-src name "RBio"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((out (string-append #$output
+ "/share/doc/" #$name "-" #$version)))
+ (install-file "../source/Doc/License.txt" out)
+ (install-file "../source/Doc/gpl.txt" out)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Library for the Rutherford/Boeing sparse matrix format")
+ (description "This package provides the C library of RBio. It can be used
+for reading and writing sparse matrices in the Rutherford/Boeing format.")
+ (license license:gpl2+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 17/20] gnu: Add suitesparse-mongoose.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (14 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 16/20] gnu: Add suitesparse-rbio David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 18/20] gnu: Add suitesparse-spex David Elsing
` (2 subsequent siblings)
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-mongoose): New variable.
---
gnu/packages/maths.scm | 72 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2b7f7ef0ef..32b3a36871 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5549,6 +5549,78 @@ (define-public suitesparse-rbio
for reading and writing sparse matrices in the Rutherford/Boeing format.")
(license license:gpl2+)))
+(define-public suitesparse-mongoose
+ (package
+ (name "suitesparse-mongoose")
+ (version "3.2.0")
+ (source (suitesparse-package-src name "Mongoose"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ ;; XeLaTeX fails with .eps graphics
+ (with-directory-excursion "../source/Doc"
+ (for-each
+ (lambda (name)
+ (invoke "epstopdf" name))
+ (find-files "Figures" "\\.eps$"))
+ (substitute* "Mongoose_UserGuide.tex"
+ (("\\.eps") ".pdf"))
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/Mongoose_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (native-inputs
+ (list texlive-epstopdf
+ (texlive-updmap.cfg
+ (list texlive-algorithmicx
+ texlive-booktabs
+ texlive-lastpage
+ texlive-multirow
+ texlive-pgf
+ texlive-caption
+ texlive-etoolbox
+ texlive-csquotes
+ texlive-fancybox
+ texlive-enumitem
+ texlive-microtype
+ texlive-cancel
+ texlive-sourcecodepro
+ texlive-xkeyval
+ texlive-fontspec
+ texlive-wasy
+ texlive-wasysym
+ texlive-float
+ texlive-tcolorbox
+ texlive-environ
+ texlive-xcolor
+ texlive-xetex
+ texlive-listings))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Graph partitioning library")
+ (description "Mongoose is a library for graph partitioning by computing
+edge cuts using a coarsening and refinement framework.")
+ (license license:gpl3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 18/20] gnu: Add suitesparse-spex.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (15 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 17/20] gnu: Add suitesparse-mongoose David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 19/20] gnu: Add suitesparse-spqr David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 20/20] gnu: Add suitesparse-umfpack David Elsing
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-spex): New variable.
---
gnu/packages/maths.scm | 67 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 32b3a36871..237c4fb5cd 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5621,6 +5621,73 @@ (define-public suitesparse-mongoose
edge cuts using a coarsening and refinement framework.")
(license license:gpl3)))
+(define-public suitesparse-spex
+ (package
+ (name "suitesparse-spex")
+ (version "2.2.0")
+ (source (suitesparse-package-src name "SPEX"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/SPEX_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list gmp
+ mpfr
+ suitesparse-amd
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs
+ (list (texlive-updmap.cfg
+ (list texlive-paralist
+ texlive-comment
+ texlive-psfrag
+ texlive-soul
+ texlive-multirow
+ texlive-algorithms
+ texlive-float
+ texlive-algorithmicx
+ texlive-cprotect
+ texlive-bigfoot
+ texlive-caption
+ texlive-listings
+ texlive-xcolor
+ texlive-framed
+ texlive-mdframed
+ texlive-etoolbox
+ texlive-zref
+ texlive-needspace))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Package for SParse EXact algebra")
+ (description "SPEX is a set of routines for sparse exact linear algebra.
+It contains the SPEX Left LU library for computing a sparse exact left-looking
+LU factorization for solving unsymmetric sparse linear systems.")
+ ;; Dual licensed.
+ (license (list license:lgpl3+ license:gpl2+))))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 19/20] gnu: Add suitesparse-spqr.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (16 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 18/20] gnu: Add suitesparse-spex David Elsing
@ 2023-09-21 13:27 ` David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 20/20] gnu: Add suitesparse-umfpack David Elsing
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-spqr): New variable.
---
gnu/packages/maths.scm | 59 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 237c4fb5cd..a5d7f4ebd3 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5688,6 +5688,65 @@ (define-public suitesparse-spex
;; Dual licensed.
(license (list license:lgpl3+ license:gpl2+))))
+(define-public suitesparse-spqr
+ (package
+ (name "suitesparse-spqr")
+ (version "4.2.0")
+ (source (suitesparse-package-src name "SPQR"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-cholmod
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../source/Doc/spqr_user_guide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../source/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs
+ (list (texlive-updmap.cfg
+ (list texlive-epsf))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Sparse QR factorization method")
+ (description "The SPQR (SuiteSparseQR) package provides sparse QR
+factorization based on the multifrontal method, using BLAS for the frontal
+matrices.")
+ (license license:gpl2+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v2 20/20] gnu: Add suitesparse-umfpack.
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
` (17 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 19/20] gnu: Add suitesparse-spqr David Elsing
@ 2023-09-21 13:27 ` David Elsing
18 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-09-21 13:27 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-umfpack): New variable.
---
gnu/packages/maths.scm | 68 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a5d7f4ebd3..fbfa94265b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5747,6 +5747,74 @@ (define-public suitesparse-spqr
matrices.")
(license license:gpl2+)))
+(define-public suitesparse-umfpack
+ (package
+ (name "suitesparse-umfpack")
+ (version "6.2.0")
+ (source (suitesparse-package-src name "UMFPACK"))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-cholmod
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../source/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (let ((outdir
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))
+ (install-file "../source/Doc/UMFPACK_UserGuide.pdf" outdir)
+ (install-file "../source/Doc/UMFPACK_QuickStart.pdf" outdir))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((outdir
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))
+ (install-file "../source/Doc/License.txt" outdir)
+ (install-file "../source/Doc/gpl.txt" outdir)))))))
+ (inputs
+ (list openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs
+ (list (texlive-updmap.cfg
+ (list texlive-etoolbox
+ texlive-framed
+ texlive-mdframed
+ texlive-needspace
+ texlive-xcolor
+ texlive-zref))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Routines for solving sparse linear problems via LU factorization")
+ (description "UMFPACK is a set of routines for solving unsymmetric sparse
+linear systems using the Unsymmetric MultiFrontal method and direct sparse LU
+factorization.")
+ (license license:gpl2+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
` (20 preceding siblings ...)
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
@ 2023-10-05 13:20 ` Ludovic Courtès
2023-10-05 14:09 ` Ludovic Courtès
21 siblings, 1 reply; 69+ messages in thread
From: Ludovic Courtès @ 2023-10-05 13:20 UTC (permalink / raw)
To: David Elsing; +Cc: 66129
Hi David,
David Elsing <david.elsing@posteo.net> skribis:
> This patch series adds the individual SuiteSparse packages (as in
> Gentoo:
> https://packages.gentoo.org/packages/sci-libs/suitesparse/dependencies),
> with autogenerated files and bundled libraries removed.
Nice!
> The GraphBLAS library is not yet included, but AFAICT it is not required
> by any other package. It also makes up by far the most space of the
> suitesparse package, e.g. on x86_64-linux, libgraphblas.so.7.2.0 is 196
> MB of the 201 MB SuiteSparse package.
>
> I think it would be best to keep the full suitesparse package until all
> of its dependencies are updated and the GraphBLAS package is added, as
> replacing them all at once would make the patch series quite large.
>
> Is the use of (@@ (guix packages) computed-origin-method) ok for
> creating the individual origins or is there another alternative?
Instead of:
+(define (suitesparse-package-src name path)
+ (origin
+ (method (@@ (guix packages) computed-origin-method))
+ (file-name
+ (string-append name "-" suitesparse-version))
+ (sha256 #f)
+ (uri
+ (delay
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (copy-recursively
+ (string-append #$suitesparse-src "/" #$path) #$output)))))))
I’d suggest this:
(define (suitesparse-package-source name directory)
(computed-file (string-append name "-" suitesparse-version ".tar.xz")
(with-imported-modules '((guix build utils))
#~(begin
(use-modules (guix build utils))
(copy-recursively
(string-append #$suitesparse-src "/" #$directory)
#$output)))))
That way we have something simple that doesn’t rely on a private
procedure.
> gnu: suitesparse: Tweak description.
> gnu: Add suitesparse-config.
> gnu: Add suitesparse-amd.
> gnu: Add suitesparse-btf.
> gnu: Add suitesparse-camd.
> gnu: Add suitesparse-colamd.
> gnu: Add suitesparse-ccolamd.
> gnu: Add gklib.
> gnu: Add metis-5.2.
> gnu: Add gklib-suitesparse.
> gnu: Add metis-suitesparse.
> gnu: Add suitesparse-cholmod.
> gnu: Add suitesparse-cxsparse.
> gnu: Add suitesparse-klu.
> gnu: Add suitesparse-ldl.
> gnu: Add suitesparse-rbio.
> gnu: Add suitesparse-mongoose.
> gnu: Add suitesparse-spex.
> gnu: Add suitesparse-spqr.
> gnu: Add suitesparse-umfpack.
Apart from the trick above, this looks great to me!
Could you send an updated version?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages
2023-10-05 13:20 ` [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages Ludovic Courtès
@ 2023-10-05 14:09 ` Ludovic Courtès
2023-10-05 21:33 ` David Elsing
0 siblings, 1 reply; 69+ messages in thread
From: Ludovic Courtès @ 2023-10-05 14:09 UTC (permalink / raw)
To: David Elsing; +Cc: 66129
Ludovic Courtès <ludovic.courtes@inria.fr> skribis:
> (define (suitesparse-package-source name directory)
> (computed-file (string-append name "-" suitesparse-version ".tar.xz")
> (with-imported-modules '((guix build utils))
> #~(begin
> (use-modules (guix build utils))
> (copy-recursively
> (string-append #$suitesparse-src "/" #$directory)
> #$output)))))
Now that I think about it, we might just as well keep the same source
for each sub-package along with a phase that does (chdir DIR).
The advantage is that we would not spend CPU time and storage space
building one tarball per package. The downside is that it might make
package definitions less concise.
Your call!
Ludo’.
^ permalink raw reply [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages
2023-10-05 14:09 ` Ludovic Courtès
@ 2023-10-05 21:33 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 01/20] gnu: suitesparse: Tweak description David Elsing
` (20 more replies)
0 siblings, 21 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:33 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 66129
Ludovic Courtès <ludovic.courtes@inria.fr> writes:
Hello,
> Now that I think about it, we might just as well keep the same source
> for each sub-package along with a phase that does (chdir DIR).
>
> The advantage is that we would not spend CPU time and storage space
> building one tarball per package. The downside is that it might make
> package definitions less concise.
I changed the packages to use the same source. With the autogenerated
files removed, it is somewhat less unwieldy than the original checkout
(90 MB instead of 165 MB).
> Ludo’.
Cheers,
David
^ permalink raw reply [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 01/20] gnu: suitesparse: Tweak description.
2023-10-05 21:33 ` David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 02/20] gnu: Add suitesparse-config David Elsing
` (19 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse)[description]: Mention that all
subpackages are included.
---
gnu/packages/maths.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 27ca2d5f18..c796501e72 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5111,7 +5111,10 @@ (define-public suitesparse
multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit
simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and
CXSparse, a concise sparse Cholesky factorization package; and many other
-packages.")
+packages.
+
+This package contains all of the above-mentioned parts.
+")
;; LGPLv2.1+:
;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL
;; GPLv2+:
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 02/20] gnu: Add suitesparse-config.
2023-10-05 21:33 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 01/20] gnu: suitesparse: Tweak description David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 03/20] gnu: Add suitesparse-amd David Elsing
` (18 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
The suitesparse-source variable contains the entire SuiteSparse source code,
which is used for all subpackages.
* gnu/packages/maths.scm (suitesparse-version, suitesparse-source,
suitesparse-config): New variables.
---
gnu/packages/maths.scm | 81 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index c796501e72..0dcd456a2e 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5039,6 +5039,87 @@ (define-public openspecfun
;; public domain software.
(license (list license:expat license:public-domain))))
+;; Source for the modular SuiteSparse packages. When updating, also update the
+;; (different) versions of the subpackages.
+(define suitesparse-version "7.2.0")
+(define suitesparse-source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/DrTimothyAldenDavis/SuiteSparse")
+ (commit (string-append "v" suitesparse-version))))
+ (file-name (git-file-name "suitesparse" suitesparse-version))
+ (sha256
+ (base32
+ "1draljn8i46862drc6008cnb2zjpklf74j8c34jirjazzpf53kaa"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Delete autogenerated and bundled files
+ (for-each delete-file (find-files "." "\\.pdf$"))
+ ;; ssget
+ (delete-file-recursively "ssget")
+ ;; SuiteSparse_config
+ (delete-file "SuiteSparse_config/SuiteSparse_config.h")
+ ;; CHOLMOD
+ (delete-file-recursively "CHOLMOD/SuiteSparse_metis")
+ ; GraphBLAS
+ (delete-file "GraphBLAS/README.md")
+ (delete-file "GraphBLAS/Config/GB_config.h")
+ (delete-file "GraphBLAS/Config/GB_prejit.c")
+ (delete-file-recursively "GraphBLAS/cpu_features")
+ (delete-file "GraphBLAS/CUDA/GB_cuda_common_jitFactory.hpp")
+ (delete-file "GraphBLAS/JITpackage/GB_JITpackage.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4.h")
+ (delete-file-recursively "GraphBLAS/lz4/lz4hc.c")
+ (delete-file-recursively "GraphBLAS/lz4/lz4hc.h")
+ (delete-file "GraphBLAS/GraphBLAS/Config/GB_config.h")
+ (delete-file "GraphBLAS/Tcov/PreJIT/GB_prejit.c")
+ (delete-file-recursively "GraphBLAS/Source/FactoryKernels")
+ (delete-file "GraphBLAS/Source/GB_AxB__include1.h")
+ (delete-file "GraphBLAS/xxHash/xxhash.h")
+ (delete-file-recursively "GraphBLAS/zstd/zstd_subset")
+ ;; KLU
+ (delete-file "KLU/Include/klu.h")
+ (delete-file "KLU/Doc/klu_version.tex")
+ ;; LDL
+ (delete-file "LDL/Include/ldl.h")
+ (delete-file "LDL/Doc/ldl_version.tex")
+ ;; RBio
+ (delete-file "RBio/Include/RBio.h")
+ ;; SPEX
+ (delete-file "SPEX/Include/SPEX.h")
+ (delete-file "SPEX/Doc/SPEX_version.tex")
+ ;; SPQR
+ (delete-file "SPQR/Include/SuiteSparseQR_definitions.h")
+ (delete-file "SPQR/Doc/spqr_version.tex")
+ ;; UMFPACK
+ (delete-file "UMFPACK/Include/umfpack.h")
+ (delete-file "UMFPACK/Doc/umfpack_version.tex")))))
+
+(define-public suitesparse-config
+ (package
+ (name "suitesparse-config")
+ (version suitesparse-version)
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "SuiteSparse_config"))))))
+ (inputs (list openblas))
+ (native-inputs (list pkg-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Configuration for all SuiteSparse packages")
+ (description "SuiteSparse is a suite of sparse matrix algorithms. This
+package contains a library with common configuration options.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 03/20] gnu: Add suitesparse-amd.
2023-10-05 21:33 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 01/20] gnu: suitesparse: Tweak description David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 02/20] gnu: Add suitesparse-config David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-19 6:58 ` Ludovic Courtès
2023-10-05 21:34 ` [bug#66129] [PATCH v3 04/20] gnu: Add suitesparse-btf David Elsing
` (17 subsequent siblings)
20 siblings, 1 reply; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-amd): New variable.
---
gnu/packages/maths.scm | 48 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0dcd456a2e..2216cc67b8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5120,6 +5120,54 @@ (define-public suitesparse-config
package contains a library with common configuration options.")
(license license:bsd-3)))
+(define-public suitesparse-amd
+ (package
+ (name "suitesparse-amd")
+ (version "3.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "AMD")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../AMD/Doc"
+ (invoke "make"))))
+ ;; Required for suitesparse-umfpack
+ (add-after 'install 'install-internal-header
+ (lambda _
+ (install-file "../AMD/Include/amd_internal.h"
+ (string-append #$output "/include"))))
+ (add-after 'install-internal-header 'install-doc
+ (lambda _
+ (install-file "../AMD/Doc/AMD_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../AMD/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (native-inputs (list gfortran (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Sparse matrix ordering for Cholesky factorization")
+ (description "AMD is a set of routines for ordering a sparse matrix prior
+to Cholesky factorization (or for LU factorization with diagonal pivoting).")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 04/20] gnu: Add suitesparse-btf.
2023-10-05 21:33 ` David Elsing
` (2 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 03/20] gnu: Add suitesparse-amd David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 05/20] gnu: Add suitesparse-camd David Elsing
` (16 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-btf): New variable.
---
gnu/packages/maths.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2216cc67b8..1b1a39688b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5168,6 +5168,39 @@ (define-public suitesparse-amd
to Cholesky factorization (or for LU factorization with diagonal pivoting).")
(license license:bsd-3)))
+(define-public suitesparse-btf
+ (package
+ (name "suitesparse-btf")
+ (version "2.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "BTF")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../BTF/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Library for permuting matrices into block upper triangular form")
+ (description "BTF (Block Triangular Form) is a C library for permuting a
+matrix into block upper triangular form.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 05/20] gnu: Add suitesparse-camd.
2023-10-05 21:33 ` David Elsing
` (3 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 04/20] gnu: Add suitesparse-btf David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 06/20] gnu: Add suitesparse-colamd David Elsing
` (15 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-camd): New variable.
---
gnu/packages/maths.scm | 45 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 1b1a39688b..e2c0492ccb 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5201,6 +5201,51 @@ (define-public suitesparse-btf
matrix into block upper triangular form.")
(license license:lgpl2.1+)))
+(define-public suitesparse-camd
+ (package
+ (name "suitesparse-camd")
+ (version "3.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "CAMD")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../CAMD/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../CAMD/Doc/CAMD_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../CAMD/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Sparse matrix ordering for Cholesky factorization with constraints")
+ (description "CAMD is a set of routines for ordering a sparse matrix prior
+to Cholesky factorization (or for LU factorization with diagonal pivoting).
+It is a variant of AMD which has the the option to apply constraints to the
+ordering.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 06/20] gnu: Add suitesparse-colamd.
2023-10-05 21:33 ` David Elsing
` (4 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 05/20] gnu: Add suitesparse-camd David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 07/20] gnu: Add suitesparse-ccolamd David Elsing
` (14 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-colamd): New variable.
---
gnu/packages/maths.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e2c0492ccb..fade383ca7 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5246,6 +5246,39 @@ (define-public suitesparse-camd
ordering.")
(license license:bsd-3)))
+(define-public suitesparse-colamd
+ (package
+ (name "suitesparse-colamd")
+ (version "3.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "COLAMD")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../COLAMD/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Column Approximate Minimum Degree Ordering")
+ (description "COLAMD is library for computing a permutation vector for a
+matrix with which the LU factorization becomes sparser.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 07/20] gnu: Add suitesparse-ccolamd.
2023-10-05 21:33 ` David Elsing
` (5 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 06/20] gnu: Add suitesparse-colamd David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 08/20] gnu: Add gklib David Elsing
` (13 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-ccolamd): New variable.
---
gnu/packages/maths.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index fade383ca7..30d6351a0a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5279,6 +5279,40 @@ (define-public suitesparse-colamd
matrix with which the LU factorization becomes sparser.")
(license license:bsd-3)))
+(define-public suitesparse-ccolamd
+ (package
+ (name "suitesparse-ccolamd")
+ (version "3.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "CCOLAMD")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../CCOLAMD/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Column Approximate Minimum Degree Ordering with constraints")
+ (description "CCOLAMD is library for computing a permutation vector for a
+matrix with which the LU factorization becomes sparser. It is a variant of
+COLAMD which has the the option to apply constraints to the ordering.")
+ (license license:bsd-3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 08/20] gnu: Add gklib.
2023-10-05 21:33 ` David Elsing
` (6 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 07/20] gnu: Add suitesparse-ccolamd David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 09/20] gnu: Add metis-5.2 David Elsing
` (12 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (gklib): New variable.
---
gnu/packages/maths.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 30d6351a0a..cef899fc8a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4344,6 +4344,42 @@ (define-public scotch-shared
(define-public pt-scotch-shared
(deprecated-package "pt-scotch-shared" pt-scotch))
+(define-public gklib
+ (let ((commit "8bd6bad750b2b0d90800c632cf18e8ee93ad72d7")
+ (revision "1"))
+ (package
+ (name "gklib")
+ (version (git-version "5.1.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/KarypisLab/GKlib")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "08k4zzyd7zsisdhfmnwz7zb9w3pzpgagyjq52mwk8i6sqajdxsdn"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list "-DBUILD_SHARED_LIBS=ON"
+ #$@(if (target-x86?)
+ '()
+ '("-DNO_X86=1")))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-march=native
+ (lambda _
+ (substitute* "GKlibSystem.cmake"
+ (("-march=native") "")))))))
+ (home-page "https://github.com/KarypisLab/GKlib")
+ (synopsis "Helper library for METIS")
+ (description
+ "GKlib is a library of various helper routines and frameworks used by
+software from KarypisLab, such as METIS.")
+ (license license:asl2.0))))
(define-public metis
(package
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 09/20] gnu: Add metis-5.2.
2023-10-05 21:33 ` David Elsing
` (7 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 08/20] gnu: Add gklib David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 10/20] gnu: Add gklib-suitesparse David Elsing
` (11 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (metis-5.2): New variable.
---
gnu/packages/maths.scm | 48 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index cef899fc8a..76d770466f 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4381,6 +4381,7 @@ (define-public gklib
software from KarypisLab, such as METIS.")
(license license:asl2.0))))
+;; XXX: Remove once the full SuiteSparse package is replaced.
(define-public metis
(package
(name "metis")
@@ -4414,6 +4415,53 @@ (define-public metis
schemes.")
(license license:asl2.0))) ;As of version 5.0.3
+(define-public metis-5.2
+ (package
+ (name "metis")
+ (version "5.2.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/KarypisLab/METIS")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "19vi1wsi2gp2m5vb715yfnzd2g7brm4r40qxg65ysrzgl13lpmvr"))
+ (snippet
+ #~(delete-file "manual/manual.pdf"))))
+ (build-system cmake-build-system)
+ (inputs (list gklib openblas))
+ (arguments
+ (list
+ #:tests? #f ; Tests are not automatic
+ #:configure-flags
+ #~(list "-DSHARED=ON"
+ (string-append "-DGKLIB_PATH=" #$gklib))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; The original Makefile copies some files and invokes CMake.
+ (add-before 'configure 'prepare-cmake
+ (lambda _
+ (substitute* "Makefile"
+ (("config: distclean") "config:")
+ (("BUILDDIR =.*")
+ "BUILDDIR = .\n")
+ ((".*cmake.*") ""))
+ (substitute* "CMakeLists.txt"
+ (("build/") "../source/"))
+ (invoke "make" "config"))))))
+ (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview")
+ (synopsis "Graph partitioning and fill-reducing matrix ordering library")
+ (description
+ "METIS is a set of serial programs for partitioning graphs, partitioning
+finite element meshes, and producing fill-reducing orderings for sparse
+matrices. The algorithms implemented in METIS are based on the multilevel
+recursive-bisection, multilevel k-way, and multi-constraint partitioning
+schemes.")
+ (license license:asl2.0)))
+
(define-public p4est
(package
(name "p4est")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 10/20] gnu: Add gklib-suitesparse.
2023-10-05 21:33 ` David Elsing
` (8 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 09/20] gnu: Add metis-5.2 David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 11/20] gnu: Add metis-suitesparse David Elsing
` (10 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (gklib-suitesparse): New variable.
---
gnu/packages/maths.scm | 25 ++++++++
gnu/packages/patches/gklib-suitesparse.patch | 65 ++++++++++++++++++++
2 files changed, 90 insertions(+)
create mode 100644 gnu/packages/patches/gklib-suitesparse.patch
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 76d770466f..a096b24cfe 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5397,6 +5397,31 @@ (define-public suitesparse-ccolamd
COLAMD which has the the option to apply constraints to the ordering.")
(license license:bsd-3)))
+(define-public gklib-suitesparse
+ (package/inherit gklib
+ (name "gklib-suitesparse")
+ (source (origin
+ (inherit (package-source gklib))
+ (patches (cons
+ (search-patch
+ "gklib-suitesparse.patch")
+ (origin-patches (package-source gklib))))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments gklib)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'patch-cmake
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("add_library\\(GKlib.*" all)
+ (string-append
+ all
+ "target_link_libraries(GKlib PUBLIC"
+ " ${SUITESPARSE_CONFIG_LIBRARIES} m)\n")))))))))
+ (inputs
+ (modify-inputs (package-inputs gklib)
+ (prepend suitesparse-config)))))
+
(define-public suitesparse
(package
(name "suitesparse")
diff --git a/gnu/packages/patches/gklib-suitesparse.patch b/gnu/packages/patches/gklib-suitesparse.patch
new file mode 100644
index 0000000000..8b6c708b6a
--- /dev/null
+++ b/gnu/packages/patches/gklib-suitesparse.patch
@@ -0,0 +1,65 @@
+This patch contains the relevant changes to GKlib made in SuiteSparse
+(CHOLMOD) for the version 7.2.0
+(https://github.com/DrTimothyAldenDavis/SuiteSparse/commit/8a7641cdb4809533c681417e94f98058c07c5da2).
+The disabling of signal handling when MATLAB_MEX_FILE is defined is omitted.
+
+diff -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,6 +3,8 @@
+
+ option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF)
+
++find_package ( SuiteSparse_config 7.1.0 REQUIRED )
++
+ get_filename_component(abs "." ABSOLUTE)
+ set(GKLIB_PATH ${abs})
+ unset(abs)
+diff -ur a/GKlib.h b/GKlib.h
+--- a/GKlib.h
++++ b/GKlib.h
+@@ -59,6 +59,24 @@
+ #include <omp.h>
+ #endif
+
++/* -------------------------------------------------------------------------- */
++/* Added for incorporation into SuiteSparse.
++ Tim Davis, Oct 31, 2022, Texas A&M University. */
++#include "SuiteSparse_config.h"
++#define malloc SuiteSparse_config_malloc
++#define calloc SuiteSparse_config_calloc
++#define realloc SuiteSparse_config_realloc
++#define free(p) \
++{ \
++ if ((p) != NULL) \
++ { \
++ SuiteSparse_config_free (p) ; \
++ (p) = NULL ; \
++ } \
++}
++
++/* -------------------------------------------------------------------------- */
++
+
+
+
+diff -ur a/memory.c b/memory.c
+--- a/memory.c
++++ b/memory.c
+@@ -108,6 +108,8 @@
+ /*************************************************************************/
+ int gk_malloc_init()
+ {
++ gkmcore = NULL;
++#if 0
+ if (gkmcore == NULL)
+ gkmcore = gk_gkmcoreCreate();
+
+@@ -115,6 +117,7 @@
+ return 0;
+
+ gk_gkmcorePush(gkmcore);
++#endif
+
+ return 1;
+ }
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 11/20] gnu: Add metis-suitesparse.
2023-10-05 21:33 ` David Elsing
` (9 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 10/20] gnu: Add gklib-suitesparse David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 12/20] gnu: Add suitesparse-cholmod David Elsing
` (9 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (metis-suitesparse): New variable.
---
gnu/packages/maths.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a096b24cfe..e2018d4540 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5422,6 +5422,32 @@ (define-public gklib-suitesparse
(modify-inputs (package-inputs gklib)
(prepend suitesparse-config)))))
+(define-public metis-suitesparse
+ (package/inherit metis-5.2
+ (name "metis-suitesparse")
+ (arguments
+ (substitute-keyword-arguments (package-arguments metis-5.2)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-before 'prepare-cmake 'set-idxwidth
+ (lambda _
+ (substitute* "Makefile"
+ (("IDXWIDTH.*=.*")
+ "IDXWIDTH = \"\\#define IDXTYPEWIDTH 64\"\n"))))
+ (add-before 'prepare-cmake 'link-suitesparse-config
+ (lambda _
+ (substitute* "programs/CMakeLists.txt"
+ (("include_directories.*" all)
+ (string-append
+ all "find_package(SuiteSparse_config REQUIRED)\n"))
+ (("(target_link_libraries.*)GKlib(.*)" _ start end)
+ (string-append
+ start "GKlib ${SUITESPARSE_CONFIG_LIBRARIES}" end)))))))
+ ((#:configure-flags _)
+ #~(list "-DSHARED=ON"
+ (string-append "-DGKLIB_PATH=" #$gklib-suitesparse)))))
+ (inputs (list suitesparse-config gklib-suitesparse))))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 12/20] gnu: Add suitesparse-cholmod.
2023-10-05 21:33 ` David Elsing
` (10 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 11/20] gnu: Add metis-suitesparse David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 13/20] gnu: Add suitesparse-cxsparse David Elsing
` (8 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-cholmod): New variable.
---
gnu/packages/maths.scm | 85 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e2018d4540..ad08f36931 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5448,6 +5448,91 @@ (define-public metis-suitesparse
(string-append "-DGKLIB_PATH=" #$gklib-suitesparse)))))
(inputs (list suitesparse-config gklib-suitesparse))))
+(define-public suitesparse-cholmod
+ (package
+ (name "suitesparse-cholmod")
+ (version "4.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "CHOLMOD")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n"))
+ (("add_subdirectory.*GPU.*") "\n")
+ ((".*cmake_modules/FindCHOLMOD_CUDA.cmake.*") "\n"))))
+ (add-after 'chdir 'use-external-metis
+ (lambda _
+ (let ((port (open-file "CMakeLists.txt" "a")))
+ (display
+ (string-append
+ "find_library(METIS_LIBRARY NAME metis PATHS ENV LIBRARY_PATH)
+get_filename_component(METIS_LIBRARY ${METIS_LIBRARY} REALPATH)
+find_library(GKLIB_LIBRARY NAME GKlib PATHS ENV LIBRARY_PATH)
+get_filename_component(GKLIB_LIBRARY ${GKLIB_LIBRARY} REALPATH)
+target_link_libraries(CHOLMOD PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY})
+target_link_libraries(CHOLMOD_static PRIVATE ${METIS_LIBRARY} ${GKLIB_LIBRARY})")
+ port)
+ (close-port port))
+ (delete-file "Partition/cholmod_metis_wrapper.c")
+ (delete-file "Partition/cholmod_metis_wrapper.h")
+ (substitute* "Partition/cholmod_metis.c"
+ (("#include \"cholmod_metis_wrapper\\.h\"") "")
+ (("#include \"SuiteSparse_metis/include/metis.h\"")
+ "#include <metis.h>")
+ (("SuiteSparse_metis_METIS") "METIS"))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../CHOLMOD/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../CHOLMOD/Doc/CHOLMOD_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((out (string-append #$output
+ "/share/doc/" #$name "-" #$version)))
+ (install-file "../CHOLMOD/Doc/License.txt" out)
+ (install-file "../CHOLMOD/Core/lesser.txt" out)
+ (install-file "../CHOLMOD/MatrixOps/gpl.txt" out)))))))
+ (inputs
+ (list gklib-suitesparse
+ metis-suitesparse
+ openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Library for solving sparse symmetric positive definite linear
+equations")
+ (description "CHOLMOD is a set of routins for factorizing sparse symmetrix
+positive definite matrices, updating/downdating sparse Cholesky factorizations
+and other related operations.")
+ (license (list license:gpl2+ license:lgpl2.1+))))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 13/20] gnu: Add suitesparse-cxsparse.
2023-10-05 21:33 ` David Elsing
` (11 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 12/20] gnu: Add suitesparse-cholmod David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 14/20] gnu: Add suitesparse-klu David Elsing
` (7 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-cxsparse): New variable.
---
gnu/packages/maths.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ad08f36931..b2da54239f 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5533,6 +5533,40 @@ (define-public suitesparse-cholmod
and other related operations.")
(license (list license:gpl2+ license:lgpl2.1+))))
+(define-public suitesparse-cxsparse
+ (package
+ (name "suitesparse-cxsparse")
+ (version "4.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "CXSparse")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((out (string-append #$output
+ "/share/doc/" #$name "-" #$version)))
+ (install-file "../CXSparse/Doc/License.txt" out)
+ (install-file "../CXSparse/Doc/lesser.txt" out)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Concise eXtended Sparse Matrix Package")
+ (description "CXSparse is a collection of sparse matrix algorithms for
+direct methods on both real and complex matrices.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 14/20] gnu: Add suitesparse-klu.
2023-10-05 21:33 ` David Elsing
` (12 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 13/20] gnu: Add suitesparse-cxsparse David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 15/20] gnu: Add suitesparse-ldl David Elsing
` (6 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-klu): New variable.
---
gnu/packages/maths.scm | 63 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b2da54239f..9e52207512 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5567,6 +5567,69 @@ (define-public suitesparse-cxsparse
direct methods on both real and complex matrices.")
(license license:lgpl2.1+)))
+(define-public suitesparse-klu
+ (package
+ (name "suitesparse-klu")
+ (version "2.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "KLU")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-btf
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-cholmod
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (substitute* "../KLU/Doc/Makefile"
+ (("\\.\\./\\.\\./BTF/Include/btf.h")
+ (string-append #$suitesparse-btf "/include/btf.h")))
+ (with-directory-excursion "../KLU/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../KLU/Doc/KLU_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../KLU/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list suitesparse-amd
+ suitesparse-btf
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Routines for solving sparse linear problems with a LU factorization")
+ (description "KLU is a method for computing the LU factorization of sparse
+for real and complex matrices.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 15/20] gnu: Add suitesparse-ldl.
2023-10-05 21:33 ` David Elsing
` (13 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 14/20] gnu: Add suitesparse-klu David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 16/20] gnu: Add suitesparse-rbio David Elsing
` (5 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-ldl): New variable.
---
gnu/packages/maths.scm | 54 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 9e52207512..988bf28ac2 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5630,6 +5630,60 @@ (define-public suitesparse-klu
for real and complex matrices.")
(license license:lgpl2.1+)))
+(define-public suitesparse-ldl
+ (package
+ (name "suitesparse-ldl")
+ (version "3.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "LDL")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (substitute* "../LDL/Doc/Makefile"
+ (("\\.\\./\\.\\./BTF/Include/btf.h")
+ (string-append #$suitesparse-btf "/include/btf.h")))
+ (with-directory-excursion "../LDL/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../LDL/Doc/ldl_userguide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../LDL/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list suitesparse-amd
+ suitesparse-config))
+ (native-inputs (list (texlive-updmap.cfg '())))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "LDL' factorization method for sparse, symmetric matrices")
+ (description "This package contains a set of routines for computing the
+LDL' factorization of sparse, symmetric matrices. Its focus lies on concise
+code.")
+ (license license:lgpl2.1+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 16/20] gnu: Add suitesparse-rbio.
2023-10-05 21:33 ` David Elsing
` (14 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 15/20] gnu: Add suitesparse-ldl David Elsing
@ 2023-10-05 21:34 ` David Elsing
2023-10-05 21:35 ` [bug#66129] [PATCH v3 17/20] gnu: Add suitesparse-mongoose David Elsing
` (4 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:34 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-rbio): New variable.
---
gnu/packages/maths.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 988bf28ac2..2cb1f01358 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5684,6 +5684,44 @@ (define-public suitesparse-ldl
code.")
(license license:lgpl2.1+)))
+(define-public suitesparse-rbio
+ (package
+ (name "suitesparse-rbio")
+ (version "4.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "RBio")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((out (string-append #$output
+ "/share/doc/" #$name "-" #$version)))
+ (install-file "../RBio/Doc/License.txt" out)
+ (install-file "../RBio/Doc/gpl.txt" out)))))))
+ (inputs (list suitesparse-config))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Library for the Rutherford/Boeing sparse matrix format")
+ (description "This package provides the C library of RBio. It can be used
+for reading and writing sparse matrices in the Rutherford/Boeing format.")
+ (license license:gpl2+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 17/20] gnu: Add suitesparse-mongoose.
2023-10-05 21:33 ` David Elsing
` (15 preceding siblings ...)
2023-10-05 21:34 ` [bug#66129] [PATCH v3 16/20] gnu: Add suitesparse-rbio David Elsing
@ 2023-10-05 21:35 ` David Elsing
2023-10-05 21:35 ` [bug#66129] [PATCH v3 18/20] gnu: Add suitesparse-spex David Elsing
` (3 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:35 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-mongoose): New variable.
---
gnu/packages/maths.scm | 75 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 2cb1f01358..9a013825de 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5722,6 +5722,81 @@ (define-public suitesparse-rbio
for reading and writing sparse matrices in the Rutherford/Boeing format.")
(license license:gpl2+)))
+(define-public suitesparse-mongoose
+ (package
+ (name "suitesparse-mongoose")
+ (version "3.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "Mongoose")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append "set(CMAKE_MODULE_PATH "
+ #$suitesparse-config "/lib/cmake/SuiteSparse)\n"
+ "set(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ ;; XeLaTeX fails with .eps graphics
+ (with-directory-excursion "../Mongoose/Doc"
+ (for-each
+ (lambda (name)
+ (invoke "epstopdf" name))
+ (find-files "Figures" "\\.eps$"))
+ (substitute* "Mongoose_UserGuide.tex"
+ (("\\.eps") ".pdf"))
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../Mongoose/Doc/Mongoose_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../Mongoose/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs (list suitesparse-config))
+ (native-inputs
+ (list texlive-epstopdf
+ (texlive-updmap.cfg
+ (list texlive-algorithmicx
+ texlive-booktabs
+ texlive-lastpage
+ texlive-multirow
+ texlive-pgf
+ texlive-caption
+ texlive-etoolbox
+ texlive-csquotes
+ texlive-fancybox
+ texlive-enumitem
+ texlive-microtype
+ texlive-cancel
+ texlive-sourcecodepro
+ texlive-xkeyval
+ texlive-fontspec
+ texlive-wasy
+ texlive-wasysym
+ texlive-float
+ texlive-tcolorbox
+ texlive-environ
+ texlive-xcolor
+ texlive-xetex
+ texlive-listings))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Graph partitioning library")
+ (description "Mongoose is a library for graph partitioning by computing
+edge cuts using a coarsening and refinement framework.")
+ (license license:gpl3)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 18/20] gnu: Add suitesparse-spex.
2023-10-05 21:33 ` David Elsing
` (16 preceding siblings ...)
2023-10-05 21:35 ` [bug#66129] [PATCH v3 17/20] gnu: Add suitesparse-mongoose David Elsing
@ 2023-10-05 21:35 ` David Elsing
2023-10-05 21:35 ` [bug#66129] [PATCH v3 19/20] gnu: Add suitesparse-spqr David Elsing
` (2 subsequent siblings)
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:35 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-spex): New variable.
---
gnu/packages/maths.scm | 70 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 9a013825de..b41b2be6e9 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5797,6 +5797,76 @@ (define-public suitesparse-mongoose
edge cuts using a coarsening and refinement framework.")
(license license:gpl3)))
+(define-public suitesparse-spex
+ (package
+ (name "suitesparse-spex")
+ (version "2.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "SPEX")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../SPEX/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../SPEX/Doc/SPEX_UserGuide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list gmp
+ mpfr
+ suitesparse-amd
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs
+ (list (texlive-updmap.cfg
+ (list texlive-paralist
+ texlive-comment
+ texlive-psfrag
+ texlive-soul
+ texlive-multirow
+ texlive-algorithms
+ texlive-float
+ texlive-algorithmicx
+ texlive-cprotect
+ texlive-bigfoot
+ texlive-caption
+ texlive-listings
+ texlive-xcolor
+ texlive-framed
+ texlive-mdframed
+ texlive-etoolbox
+ texlive-zref
+ texlive-needspace))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Package for SParse EXact algebra")
+ (description "SPEX is a set of routines for sparse exact linear algebra.
+It contains the SPEX Left LU library for computing a sparse exact left-looking
+LU factorization for solving unsymmetric sparse linear systems.")
+ ;; Dual licensed.
+ (license (list license:lgpl3+ license:gpl2+))))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 19/20] gnu: Add suitesparse-spqr.
2023-10-05 21:33 ` David Elsing
` (17 preceding siblings ...)
2023-10-05 21:35 ` [bug#66129] [PATCH v3 18/20] gnu: Add suitesparse-spex David Elsing
@ 2023-10-05 21:35 ` David Elsing
2023-10-05 21:35 ` [bug#66129] [PATCH v3 20/20] gnu: Add suitesparse-umfpack David Elsing
2023-10-06 10:31 ` bug#66129: [PATCH 00/20] Split SuiteSparse into subpackages Ludovic Courtès
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:35 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-spqr): New variable.
---
gnu/packages/maths.scm | 62 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b41b2be6e9..fa0bd2d406 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5867,6 +5867,68 @@ (define-public suitesparse-spex
;; Dual licensed.
(license (list license:lgpl3+ license:gpl2+))))
+(define-public suitesparse-spqr
+ (package
+ (name "suitesparse-spqr")
+ (version "4.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "SPQR")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-cholmod
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../SPQR/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (install-file "../SPQR/Doc/spqr_user_guide.pdf"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version))))
+ (replace 'install-license-files
+ (lambda _
+ (install-file "../SPQR/Doc/License.txt"
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))))))
+ (inputs
+ (list openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs
+ (list (texlive-updmap.cfg
+ (list texlive-epsf))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Sparse QR factorization method")
+ (description "The SPQR (SuiteSparseQR) package provides sparse QR
+factorization based on the multifrontal method, using BLAS for the frontal
+matrices.")
+ (license license:gpl2+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 20/20] gnu: Add suitesparse-umfpack.
2023-10-05 21:33 ` David Elsing
` (18 preceding siblings ...)
2023-10-05 21:35 ` [bug#66129] [PATCH v3 19/20] gnu: Add suitesparse-spqr David Elsing
@ 2023-10-05 21:35 ` David Elsing
2023-10-06 10:31 ` bug#66129: [PATCH 00/20] Split SuiteSparse into subpackages Ludovic Courtès
20 siblings, 0 replies; 69+ messages in thread
From: David Elsing @ 2023-10-05 21:35 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-umfpack): New variable.
---
gnu/packages/maths.scm | 71 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index fa0bd2d406..e648d43748 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5929,6 +5929,77 @@ (define-public suitesparse-spqr
matrices.")
(license license:gpl2+)))
+(define-public suitesparse-umfpack
+ (package
+ (name "suitesparse-umfpack")
+ (version "6.2.0")
+ (source suitesparse-source)
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "UMFPACK")))
+ (add-after 'chdir 'set-cmake-module-path
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("set.*CMAKE_MODULE_PATH.*")
+ (string-append
+ "set(CMAKE_MODULE_PATH "
+ (string-join
+ (map (lambda (path)
+ (string-append path "/lib/cmake/SuiteSparse"))
+ (list #$suitesparse-amd
+ #$suitesparse-camd
+ #$suitesparse-ccolamd
+ #$suitesparse-cholmod
+ #$suitesparse-colamd
+ #$suitesparse-config)))
+ ")\nset(DUMMY\n")))))
+ (add-after 'build 'build-doc
+ (lambda _
+ (with-directory-excursion "../UMFPACK/Doc"
+ (invoke "make"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (let ((outdir
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))
+ (install-file "../UMFPACK/Doc/UMFPACK_UserGuide.pdf" outdir)
+ (install-file "../UMFPACK/Doc/UMFPACK_QuickStart.pdf" outdir))))
+ (replace 'install-license-files
+ (lambda _
+ (let ((outdir
+ (string-append #$output "/share/doc/"
+ #$name "-" #$version)))
+ (install-file "../UMFPACK/Doc/License.txt" outdir)
+ (install-file "../UMFPACK/Doc/gpl.txt" outdir)))))))
+ (inputs
+ (list openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd
+ suitesparse-config))
+ (native-inputs
+ (list (texlive-updmap.cfg
+ (list texlive-etoolbox
+ texlive-framed
+ texlive-mdframed
+ texlive-needspace
+ texlive-xcolor
+ texlive-zref))))
+ (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+ (synopsis "Routines for solving sparse linear problems via LU factorization")
+ (description "UMFPACK is a set of routines for solving unsymmetric sparse
+linear systems using the Unsymmetric MultiFrontal method and direct sparse LU
+factorization.")
+ (license license:gpl2+)))
+
(define-public suitesparse
(package
(name "suitesparse")
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* bug#66129: [PATCH 00/20] Split SuiteSparse into subpackages
2023-10-05 21:33 ` David Elsing
` (19 preceding siblings ...)
2023-10-05 21:35 ` [bug#66129] [PATCH v3 20/20] gnu: Add suitesparse-umfpack David Elsing
@ 2023-10-06 10:31 ` Ludovic Courtès
20 siblings, 0 replies; 69+ messages in thread
From: Ludovic Courtès @ 2023-10-06 10:31 UTC (permalink / raw)
To: David Elsing; +Cc: 66129-done
Hi David,
David Elsing <david.elsing@posteo.net> skribis:
> I changed the packages to use the same source. With the autogenerated
> files removed, it is somewhat less unwieldy than the original checkout
> (90 MB instead of 165 MB).
Awesome.
I pushed the whole series as 1b5067c0d002c5d019ab69c5fbc22fac68acda3d.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 03/20] gnu: Add suitesparse-amd.
2023-10-05 21:34 ` [bug#66129] [PATCH v3 03/20] gnu: Add suitesparse-amd David Elsing
@ 2023-10-19 6:58 ` Ludovic Courtès
2023-10-19 22:29 ` David Elsing
0 siblings, 1 reply; 69+ messages in thread
From: Ludovic Courtès @ 2023-10-19 6:58 UTC (permalink / raw)
To: David Elsing; +Cc: 66129
Hi David,
David Elsing <david.elsing@posteo.net> skribis:
> +(define-public suitesparse-amd
> + (package
> + (name "suitesparse-amd")
[...]
> + (inputs (list suitesparse-config))
One issue that I discovered is that, most of the time, dependencies on
other SuiteSparse packages should be propagated because headers include
one another.
For example, public headers of ‘suitesparse-amd’ include those from
‘suitesparse-config’:
--8<---------------cut here---------------start------------->8---
$ grep config $(guix build suitesparse-amd)/include/*.h
/gnu/store/kiq1bwzx4dlmmpqv14l9crqrjwigmgns-suitesparse-amd-3.2.0/include/amd.h:#include "SuiteSparse_config.h"
--8<---------------cut here---------------end--------------->8---
We should check and probably change most ‘inputs’ to
‘propagated-inputs’.
Could you take a look?
TIA,
Ludo’.
^ permalink raw reply [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH v3 03/20] gnu: Add suitesparse-amd.
2023-10-19 6:58 ` Ludovic Courtès
@ 2023-10-19 22:29 ` David Elsing
2023-10-19 22:31 ` [bug#66129] [PATCH] gnu: Propagate suitesparse-* inputs referenced in header files David Elsing
0 siblings, 1 reply; 69+ messages in thread
From: David Elsing @ 2023-10-19 22:29 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 66129
Ludovic Courtès <ludovic.courtes@inria.fr> writes:
> Hi David,
Hi,
> We should check and probably change most ‘inputs’ to
> ‘propagated-inputs’.
yes I agree.
Before, I put all packages searched for in the
CMakeLists.txt file into 'inputs'. Of these, I now moved the packages
referenced in the header files into 'propagated-inputs'.
> TIA,
> Ludo’.
Cheers,
David
^ permalink raw reply [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH] gnu: Propagate suitesparse-* inputs referenced in header files.
2023-10-19 22:29 ` David Elsing
@ 2023-10-19 22:31 ` David Elsing
2023-10-20 8:39 ` Ludovic Courtès
0 siblings, 1 reply; 69+ messages in thread
From: David Elsing @ 2023-10-19 22:31 UTC (permalink / raw)
To: 66129; +Cc: David Elsing
* gnu/packages/maths.scm (suitesparse-amd, suitesparse-btf, suitesparse-camd,
suitesparse-colamd, suitesparse-ccolamd, gklib-suitesparse,
suitesparse-cholmod, suitesparse-cxsparse, suitesparse-klu, suitesparse-ldl,
suitesparse-rbio, suitesparse-mongoose, suitesparse-spex, suitesparse-spqr,
suitesparse-umfpack)[inputs]: Move relevant suitesparse-* packages ...
[propagated-inputs]: ... to here.
---
gnu/packages/maths.scm | 75 +++++++++++++++++++-----------------------
1 file changed, 34 insertions(+), 41 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 683acd96e1..8fba8beaa8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5283,7 +5283,7 @@ (define-public suitesparse-amd
(install-file "../AMD/Doc/License.txt"
(string-append #$output "/share/doc/"
#$name "-" #$version)))))))
- (inputs (list suitesparse-config))
+ (propagated-inputs (list suitesparse-config))
(native-inputs (list gfortran (texlive-updmap.cfg '())))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "Sparse matrix ordering for Cholesky factorization")
@@ -5317,7 +5317,7 @@ (define-public suitesparse-btf
(install-file "../BTF/Doc/License.txt"
(string-append #$output "/share/doc/"
#$name "-" #$version)))))))
- (inputs (list suitesparse-config))
+ (propagated-inputs (list suitesparse-config))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "Library for permuting matrices into block upper triangular form")
(description "BTF (Block Triangular Form) is a C library for permuting a
@@ -5359,7 +5359,7 @@ (define-public suitesparse-camd
(install-file "../CAMD/Doc/License.txt"
(string-append #$output "/share/doc/"
#$name "-" #$version)))))))
- (inputs (list suitesparse-config))
+ (propagated-inputs (list suitesparse-config))
(native-inputs (list (texlive-updmap.cfg '())))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "Sparse matrix ordering for Cholesky factorization with constraints")
@@ -5395,7 +5395,7 @@ (define-public suitesparse-colamd
(install-file "../COLAMD/Doc/License.txt"
(string-append #$output "/share/doc/"
#$name "-" #$version)))))))
- (inputs (list suitesparse-config))
+ (propagated-inputs (list suitesparse-config))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "Column Approximate Minimum Degree Ordering")
(description "COLAMD is library for computing a permutation vector for a
@@ -5428,7 +5428,7 @@ (define-public suitesparse-ccolamd
(install-file "../CCOLAMD/Doc/License.txt"
(string-append #$output "/share/doc/"
#$name "-" #$version)))))))
- (inputs (list suitesparse-config))
+ (propagated-inputs (list suitesparse-config))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "Column Approximate Minimum Degree Ordering with constraints")
(description "CCOLAMD is library for computing a permutation vector for a
@@ -5457,9 +5457,7 @@ (define-public gklib-suitesparse
all
"target_link_libraries(GKlib PUBLIC"
" ${SUITESPARSE_CONFIG_LIBRARIES} m)\n")))))))))
- (inputs
- (modify-inputs (package-inputs gklib)
- (prepend suitesparse-config)))))
+ (propagated-inputs (list suitesparse-config))))
(define-public metis-suitesparse
(package/inherit metis-5.2
@@ -5561,8 +5559,8 @@ (define-public suitesparse-cholmod
suitesparse-amd
suitesparse-camd
suitesparse-ccolamd
- suitesparse-colamd
- suitesparse-config))
+ suitesparse-colamd))
+ (propagated-inputs (list suitesparse-config))
(native-inputs (list (texlive-updmap.cfg '())))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "Library for solving sparse symmetric positive definite linear
@@ -5599,7 +5597,7 @@ (define-public suitesparse-cxsparse
"/share/doc/" #$name "-" #$version)))
(install-file "../CXSparse/Doc/License.txt" out)
(install-file "../CXSparse/Doc/lesser.txt" out)))))))
- (inputs (list suitesparse-config))
+ (propagated-inputs (list suitesparse-config))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "Concise eXtended Sparse Matrix Package")
(description "CXSparse is a collection of sparse matrix algorithms for
@@ -5655,13 +5653,14 @@ (define-public suitesparse-klu
(string-append #$output "/share/doc/"
#$name "-" #$version)))))))
(inputs
- (list suitesparse-amd
- suitesparse-btf
- suitesparse-camd
+ (list suitesparse-camd
suitesparse-ccolamd
- suitesparse-cholmod
suitesparse-colamd
suitesparse-config))
+ (propagated-inputs
+ (list suitesparse-amd
+ suitesparse-btf
+ suitesparse-cholmod))
(native-inputs (list (texlive-updmap.cfg '())))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "Routines for solving sparse linear problems with a LU factorization")
@@ -5712,9 +5711,8 @@ (define-public suitesparse-ldl
(install-file "../LDL/Doc/License.txt"
(string-append #$output "/share/doc/"
#$name "-" #$version)))))))
- (inputs
- (list suitesparse-amd
- suitesparse-config))
+ (inputs (list suitesparse-amd))
+ (propagated-inputs (list suitesparse-config))
(native-inputs (list (texlive-updmap.cfg '())))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "LDL' factorization method for sparse, symmetric matrices")
@@ -5754,7 +5752,7 @@ (define-public suitesparse-rbio
"/share/doc/" #$name "-" #$version)))
(install-file "../RBio/Doc/License.txt" out)
(install-file "../RBio/Doc/gpl.txt" out)))))))
- (inputs (list suitesparse-config))
+ (propagated-inputs (list suitesparse-config))
(home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
(synopsis "Library for the Rutherford/Boeing sparse matrix format")
(description "This package provides the C library of RBio. It can be used
@@ -5803,7 +5801,7 @@ (define-public suitesparse-mongoose
(install-file "../Mongoose/Doc/License.txt"
(string-append #$output "/share/doc/"
#$name "-" #$version)))))))
- (inputs (list suitesparse-config))
+ (propagated-inputs (list suitesparse-config))
(native-inputs
(list texlive-epstopdf
(texlive-updmap.cfg
@@ -5872,12 +5870,8 @@ (define-public suitesparse-spex
(install-file "../SPEX/Doc/SPEX_UserGuide.pdf"
(string-append #$output "/share/doc/"
#$name "-" #$version)))))))
- (inputs
- (list gmp
- mpfr
- suitesparse-amd
- suitesparse-colamd
- suitesparse-config))
+ (inputs (list suitesparse-amd suitesparse-colamd))
+ (propagated-inputs (list gmp mpfr suitesparse-config))
(native-inputs
(list (texlive-updmap.cfg
(list texlive-paralist
@@ -5950,14 +5944,13 @@ (define-public suitesparse-spqr
(install-file "../SPQR/Doc/License.txt"
(string-append #$output "/share/doc/"
#$name "-" #$version)))))))
- (inputs
- (list openblas
- suitesparse-amd
- suitesparse-camd
- suitesparse-ccolamd
- suitesparse-cholmod
- suitesparse-colamd
- suitesparse-config))
+ (inputs (list openblas
+ suitesparse-amd
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-colamd
+ suitesparse-config))
+ (propagated-inputs (list suitesparse-cholmod))
(native-inputs
(list (texlive-updmap.cfg
(list texlive-epsf))))
@@ -6016,13 +6009,13 @@ (define-public suitesparse-umfpack
#$name "-" #$version)))
(install-file "../UMFPACK/Doc/License.txt" outdir)
(install-file "../UMFPACK/Doc/gpl.txt" outdir)))))))
- (inputs
- (list openblas
- suitesparse-amd
- suitesparse-camd
- suitesparse-ccolamd
- suitesparse-cholmod
- suitesparse-colamd
+ (inputs (list openblas
+ suitesparse-camd
+ suitesparse-ccolamd
+ suitesparse-cholmod
+ suitesparse-colamd))
+ (propagated-inputs
+ (list suitesparse-amd
suitesparse-config))
(native-inputs
(list (texlive-updmap.cfg
--
2.41.0
^ permalink raw reply related [flat|nested] 69+ messages in thread
* [bug#66129] [PATCH] gnu: Propagate suitesparse-* inputs referenced in header files.
2023-10-19 22:31 ` [bug#66129] [PATCH] gnu: Propagate suitesparse-* inputs referenced in header files David Elsing
@ 2023-10-20 8:39 ` Ludovic Courtès
0 siblings, 0 replies; 69+ messages in thread
From: Ludovic Courtès @ 2023-10-20 8:39 UTC (permalink / raw)
To: David Elsing; +Cc: 66129
Hi,
David Elsing <david.elsing@posteo.net> skribis:
> * gnu/packages/maths.scm (suitesparse-amd, suitesparse-btf, suitesparse-camd,
> suitesparse-colamd, suitesparse-ccolamd, gklib-suitesparse,
> suitesparse-cholmod, suitesparse-cxsparse, suitesparse-klu, suitesparse-ldl,
> suitesparse-rbio, suitesparse-mongoose, suitesparse-spex, suitesparse-spqr,
> suitesparse-umfpack)[inputs]: Move relevant suitesparse-* packages ...
> [propagated-inputs]: ... to here.
Applied, thanks!
(Next time please create a separate issue to make sure we keep track of it.)
Ludo’.
^ permalink raw reply [flat|nested] 69+ messages in thread
end of thread, other threads:[~2023-10-20 8:41 UTC | newest]
Thread overview: 69+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 01/20] gnu: suitesparse: Tweak description David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 02/20] gnu: Add suitesparse-config David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 03/20] gnu: Add suitesparse-amd David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 04/20] gnu: Add suitesparse-btf David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 05/20] gnu: Add suitesparse-camd David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 06/20] gnu: Add suitesparse-colamd David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 07/20] gnu: Add suitesparse-ccolamd David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 08/20] gnu: Add gklib David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 09/20] gnu: Add metis-5.2 David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 10/20] gnu: Add gklib-suitesparse David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 11/20] gnu: Add metis-suitesparse David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 12/20] gnu: Add suitesparse-cholmod David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 13/20] gnu: Add suitesparse-cxsparse David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 14/20] gnu: Add suitesparse-klu David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 15/20] gnu: Add suitesparse-ldl David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 16/20] gnu: Add suitesparse-rbio David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 17/20] gnu: Add suitesparse-mongoose David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 18/20] gnu: Add suitesparse-spex David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 19/20] gnu: Add suitesparse-spqr David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 20/20] gnu: Add suitesparse-umfpack David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 02/20] gnu: Add suitesparse-config David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 03/20] gnu: Add suitesparse-amd David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 04/20] gnu: Add suitesparse-btf David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 05/20] gnu: Add suitesparse-camd David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 06/20] gnu: Add suitesparse-colamd David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 07/20] gnu: Add suitesparse-ccolamd David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 08/20] gnu: Add gklib David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 09/20] gnu: Add metis-5.2 David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 10/20] gnu: Add gklib-suitesparse David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 11/20] gnu: Add metis-suitesparse David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 12/20] gnu: Add suitesparse-cholmod David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 13/20] gnu: Add suitesparse-cxsparse David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 14/20] gnu: Add suitesparse-klu David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 15/20] gnu: Add suitesparse-ldl David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 16/20] gnu: Add suitesparse-rbio David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 17/20] gnu: Add suitesparse-mongoose David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 18/20] gnu: Add suitesparse-spex David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 19/20] gnu: Add suitesparse-spqr David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 20/20] gnu: Add suitesparse-umfpack David Elsing
2023-10-05 13:20 ` [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages Ludovic Courtès
2023-10-05 14:09 ` Ludovic Courtès
2023-10-05 21:33 ` David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 01/20] gnu: suitesparse: Tweak description David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 02/20] gnu: Add suitesparse-config David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 03/20] gnu: Add suitesparse-amd David Elsing
2023-10-19 6:58 ` Ludovic Courtès
2023-10-19 22:29 ` David Elsing
2023-10-19 22:31 ` [bug#66129] [PATCH] gnu: Propagate suitesparse-* inputs referenced in header files David Elsing
2023-10-20 8:39 ` Ludovic Courtès
2023-10-05 21:34 ` [bug#66129] [PATCH v3 04/20] gnu: Add suitesparse-btf David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 05/20] gnu: Add suitesparse-camd David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 06/20] gnu: Add suitesparse-colamd David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 07/20] gnu: Add suitesparse-ccolamd David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 08/20] gnu: Add gklib David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 09/20] gnu: Add metis-5.2 David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 10/20] gnu: Add gklib-suitesparse David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 11/20] gnu: Add metis-suitesparse David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 12/20] gnu: Add suitesparse-cholmod David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 13/20] gnu: Add suitesparse-cxsparse David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 14/20] gnu: Add suitesparse-klu David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 15/20] gnu: Add suitesparse-ldl David Elsing
2023-10-05 21:34 ` [bug#66129] [PATCH v3 16/20] gnu: Add suitesparse-rbio David Elsing
2023-10-05 21:35 ` [bug#66129] [PATCH v3 17/20] gnu: Add suitesparse-mongoose David Elsing
2023-10-05 21:35 ` [bug#66129] [PATCH v3 18/20] gnu: Add suitesparse-spex David Elsing
2023-10-05 21:35 ` [bug#66129] [PATCH v3 19/20] gnu: Add suitesparse-spqr David Elsing
2023-10-05 21:35 ` [bug#66129] [PATCH v3 20/20] gnu: Add suitesparse-umfpack David Elsing
2023-10-06 10:31 ` bug#66129: [PATCH 00/20] Split SuiteSparse into subpackages Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).