From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] SuiteSparse: update to 7.1.0.
Date: Sun, 02 Jul 2023 23:41:09 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44804@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]
There is a new pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages SuiteSparse
https://github.com/void-linux/void-packages/pull/44804
SuiteSparse: update to 7.1.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
octave seems to work ok with this, even the testsuite passes.
However, due to a (minor) change in `cs_complex_t` octave ftbfs which is fixed by the patch in the second commit. Rebuild of octave is not necessary IMO.
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/44804.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-SuiteSparse-44804.patch --]
[-- Type: text/x-diff, Size: 7367 bytes --]
From 7703be8c59340495bde174e138933a55ecb8f766 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 1 Jul 2023 18:06:23 -0300
Subject: [PATCH 1/2] SuiteSparse: update to 7.1.0.
---
srcpkgs/SuiteSparse/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/SuiteSparse/template b/srcpkgs/SuiteSparse/template
index 6cc6b0a232d5..3490f6f3fa7f 100644
--- a/srcpkgs/SuiteSparse/template
+++ b/srcpkgs/SuiteSparse/template
@@ -1,6 +1,6 @@
# Template file for 'SuiteSparse'
pkgname=SuiteSparse
-version=7.0.1
+version=7.1.0
revision=1
hostmakedepends="cmake gcc-fortran"
makedepends="libgomp-devel mpfr-devel
@@ -11,7 +11,7 @@ license="custom:multiple"
homepage="https://people.engr.tamu.edu/davis/suitesparse.html"
changelog="https://raw.githubusercontent.com/DrTimothyAldenDavis/SuiteSparse/master/ChangeLog"
distfiles="https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v${version}.tar.gz"
-checksum=dc2f8d5c2657c120b30cce942f634ec08fc3a4b0b10e19d3eef7790b2bec8d1e
+checksum=4cd3d161f9aa4f98ec5fa725ee5dc27bca960a3714a707a7d12b3d0abb504679
build_options="openblas"
From 59335507f9f3eb80f3ba1f0b78d094797b44b60c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 2 Jul 2023 18:00:08 -0300
Subject: [PATCH 2/2] octave: fix build with SuiteSparse-7.1.0
---
.../octave/patches/fix-suitesparse-7.1.patch | 166 ++++++++++++++++++
1 file changed, 166 insertions(+)
create mode 100644 srcpkgs/octave/patches/fix-suitesparse-7.1.patch
diff --git a/srcpkgs/octave/patches/fix-suitesparse-7.1.patch b/srcpkgs/octave/patches/fix-suitesparse-7.1.patch
new file mode 100644
index 000000000000..a9235cb386fb
--- /dev/null
+++ b/srcpkgs/octave/patches/fix-suitesparse-7.1.patch
@@ -0,0 +1,166 @@
+--- a/liboctave/numeric/sparse-qr.cc 2023-04-13 13:43:35.000000000 -0300
++++ b/liboctave/numeric/sparse-qr.cc 2023-07-02 17:56:48.485762203 -0300
+@@ -804,17 +804,17 @@
+ Matrix ret (nrows, nc);
+ cholmod_dense *q;
+
+- // I is nrows x nrows identity matrix
+- cholmod_dense *I
++ // Id is nrows x nrows identity matrix
++ cholmod_dense *Id
+ = cholmod_l_allocate_dense (nrows, nrows, nrows, CHOLMOD_REAL, &m_cc);
+
+ for (octave_idx_type i = 0; i < nrows * nrows; i++)
+- (reinterpret_cast<double *> (I->x))[i] = 0.0;
++ (reinterpret_cast<double *> (Id->x))[i] = 0.0;
+
+ for (octave_idx_type i = 0; i < nrows; i++)
+- (reinterpret_cast<double *> (I->x))[i * nrows + i] = 1.0;
++ (reinterpret_cast<double *> (Id->x))[i * nrows + i] = 1.0;
+
+- q = SuiteSparseQR_qmult<double> (SPQR_QX, m_H, m_Htau, m_HPinv, I, &m_cc);
++ q = SuiteSparseQR_qmult<double> (SPQR_QX, m_H, m_Htau, m_HPinv, Id, &m_cc);
+ spqr_error_handler (&m_cc);
+
+ double *q_x = reinterpret_cast<double *> (q->x);
+@@ -824,7 +824,7 @@
+ ret_vec[j * nrows + i] = q_x[j * nrows + i];
+
+ cholmod_l_free_dense (&q, &m_cc);
+- cholmod_l_free_dense (&I, &m_cc);
++ cholmod_l_free_dense (&Id, &m_cc);
+
+ return ret;
+
+@@ -1738,18 +1738,18 @@
+ ComplexMatrix ret (nrows, nc);
+ cholmod_dense *q;
+
+- // I is nrows x nrows identity matrix
+- cholmod_dense *I
++ // Id is nrows x nrows identity matrix
++ cholmod_dense *Id
+ = reinterpret_cast<cholmod_dense *>
+ (cholmod_l_allocate_dense (nrows, nrows, nrows, CHOLMOD_COMPLEX, &m_cc));
+
+ for (octave_idx_type i = 0; i < nrows * nrows; i++)
+- (reinterpret_cast<Complex *> (I->x))[i] = 0.0;
++ (reinterpret_cast<Complex *> (Id->x))[i] = 0.0;
+
+ for (octave_idx_type i = 0; i < nrows; i++)
+- (reinterpret_cast<Complex *> (I->x))[i * nrows + i] = 1.0;
++ (reinterpret_cast<Complex *> (Id->x))[i * nrows + i] = 1.0;
+
+- q = SuiteSparseQR_qmult<Complex> (SPQR_QX, m_H, m_Htau, m_HPinv, I,
++ q = SuiteSparseQR_qmult<Complex> (SPQR_QX, m_H, m_Htau, m_HPinv, Id,
+ &m_cc);
+ spqr_error_handler (&m_cc);
+
+@@ -1761,7 +1761,7 @@
+ ret_vec[j * nrows + i] = q_x[j * nrows + i];
+
+ cholmod_l_free_dense (&q, &m_cc);
+- cholmod_l_free_dense (&I, &m_cc);
++ cholmod_l_free_dense (&Id, &m_cc);
+
+ return ret;
+
+@@ -1786,7 +1786,7 @@
+ OCTAVE_LOCAL_BUFFER (cs_complex_t, bvec, nr);
+
+ for (octave_idx_type i = 0; i < nr; i++)
+- bvec[i] = cs_complex_t (0.0, 0.0);
++ bvec[i] = (cs_complex_t) 0.0;
+
+ OCTAVE_LOCAL_BUFFER (Complex, buf, S->m2);
+
+@@ -1794,7 +1794,7 @@
+ {
+ octave_quit ();
+
+- bvec[j] = cs_complex_t (1.0, 0.0);
++ bvec[j] = (cs_complex_t) 1.0;
+
+ volatile octave_idx_type nm = (nr < nc ? nr : nc);
+
+@@ -1813,7 +1813,7 @@
+ for (octave_idx_type i = 0; i < nr; i++)
+ vec[i+idx] = buf[i];
+
+- bvec[j] = cs_complex_t (0.0, 0.0);
++ bvec[j] = (cs_complex_t) 0.0;
+ }
+ }
+
+@@ -2073,7 +2073,7 @@
+ Xx[j] = b.xelem (j, i);
+
+ for (octave_idx_type j = nr; j < S->m2; j++)
+- buf[j] = cs_complex_t (0.0, 0.0);
++ buf[j] = (cs_complex_t) 0.0;
+
+ CXSPARSE_ZNAME (_ipvec) (S->pinv,
+ reinterpret_cast<cs_complex_t *>(Xx),
+@@ -2143,7 +2143,7 @@
+ Xx[j] = b.xelem (j, i);
+
+ for (octave_idx_type j = nr; j < nbuf; j++)
+- buf[j] = cs_complex_t (0.0, 0.0);
++ buf[j] = (cs_complex_t) 0.0;
+
+ CXSPARSE_ZNAME (_pvec) (S->q, reinterpret_cast<cs_complex_t *> (Xx),
+ buf, nr);
+@@ -2206,7 +2206,7 @@
+ Xx[j] = b.xelem (j, i);
+
+ for (octave_idx_type j = nr; j < S->m2; j++)
+- buf[j] = cs_complex_t (0.0, 0.0);
++ buf[j] = (cs_complex_t) 0.0;
+
+ CXSPARSE_ZNAME (_ipvec) (S->pinv,
+ reinterpret_cast<cs_complex_t *> (Xx),
+@@ -2304,7 +2304,7 @@
+ Xx[j] = b.xelem (j, i);
+
+ for (octave_idx_type j = nr; j < nbuf; j++)
+- buf[j] = cs_complex_t (0.0, 0.0);
++ buf[j] = (cs_complex_t) 0.0;
+
+ CXSPARSE_ZNAME (_pvec) (S->q,
+ reinterpret_cast<cs_complex_t *> (Xx),
+@@ -2392,7 +2392,7 @@
+ octave_quit ();
+
+ for (octave_idx_type j = nr; j < S->m2; j++)
+- buf[j] = cs_complex_t (0.0, 0.0);
++ buf[j] = (cs_complex_t) 0.0;
+
+ CXSPARSE_ZNAME (_ipvec) (S->pinv, bvec + bidx, buf, nr);
+
+@@ -2460,7 +2460,7 @@
+ octave_quit ();
+
+ for (octave_idx_type j = nr; j < nbuf; j++)
+- buf[j] = cs_complex_t (0.0, 0.0);
++ buf[j] = (cs_complex_t) 0.0;
+
+ CXSPARSE_ZNAME (_pvec) (S->q, bvec + bidx, buf, nr);
+ CXSPARSE_ZNAME (_utsolve) (N->U, buf);
+@@ -2522,7 +2522,7 @@
+ Xx[j] = b.xelem (j, i);
+
+ for (octave_idx_type j = nr; j < S->m2; j++)
+- buf[j] = cs_complex_t (0.0, 0.0);
++ buf[j] = (cs_complex_t) 0.0;
+
+ CXSPARSE_ZNAME (_ipvec) (S->pinv,
+ reinterpret_cast<cs_complex_t *> (Xx),
+@@ -2620,7 +2620,7 @@
+ Xx[j] = b.xelem (j, i);
+
+ for (octave_idx_type j = nr; j < nbuf; j++)
+- buf[j] = cs_complex_t (0.0, 0.0);
++ buf[j] = (cs_complex_t) 0.0;
+
+ CXSPARSE_ZNAME (_pvec) (S->q, reinterpret_cast<cs_complex_t *>(Xx),
+ buf, nr);
next reply other threads:[~2023-07-02 21:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-02 21:41 tornaria [this message]
2023-07-03 13:53 ` [PR PATCH] [Merged]: " Duncaen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44804@inbox.vuxu.org \
--to=tornaria@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).