[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#986752: unblock: petsc/3.14.5+dfsg1-3



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package petsc

[ Reason ]

petsc 3.14.5+dfsg1-2 has a packaging bug #985659. (potential dangling
symlinks in docs).

petsc 3.14.6 has just been released, and is a final bugfix release for 3.14
before the petsc 3.15 series.

This releases fixes #985659 (a trivial update to Depends),
and cherry-picks four specific patches from 3.14.6 which may be
anticipated to affect bullseye 3.14.5 users.

The specific bug fixes cherry-picked from PETSc 3.14.6 are pulled from
the separate upstream Pull Releases and applies as separate patches in
debian/patches. 
    
- PR3681_scalapack_block_size.diff

  sets block size of transposed ScalAPACK matrices
  
  source: PR3681  https://gitlab.com/petsc/petsc/-/merge_requests/3681
          3.14.6 commit 59172f18

- PR3686_DMPlex_missing_PetscSFSetUp.diff

  adds PetscSFSetUp() to DM plexcreate.c
  
  source: PR3686  https://gitlab.com/petsc/petsc/-/merge_requests/3686
          3.14.6 commit 07a779fe

- PR3722_umfpack_ordering.diff

  use default umfpack ordering since much faster than PETSc ordering
  
  source: PR3722  https://gitlab.com/petsc/petsc/-/merge_requests/3722
          3.14.6 commit 07a4507b

- PR3728_DM_anchor_initialize.diff

  initialize variable in DM anchor calculation
  
  source: PR3728  https://gitlab.com/petsc/petsc/-/merge_requests/3728
          3.14.6 commit 326b8f31


[ Impact ]

Bug#985659 affects general policy of providing packages without
dangling links.
 
The bugs fixed by the PRs from 3.14.6 can be expected to badly affects
users accessing those functionalities, with data blocks not correctly
initialized (PR3681, PR3686, PR3728).

PR3722 is a trivial patch that significantly improves performance when
using the umfpack solver (which is often used to solve linear systems).

[ Tests ]

petsc/3.14.5+dfsg1-3 debci tests are passing.

debci tests for client packages (dolfin, deal.ii) are also
passing against petsc/3.14.5+dfsg1-3, as are petsc4py, slepc

[ Risks ]

#985659 is fixed simply by adding "Depends: sphinx-common" to
petsc3.14-doc 

Each patch is a one line change only, or in the case of
PR3681_scalapack_block_size.diff, reducing code complexity by
reducing 4 lines to 1 line (in 3 locations)

For that reason the risk of the patches is low.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]

PETSc 3.15.0 is now released. I expect 3.14.6 to be the final bugfix
release in the petsc 3.14 series.  The debian release here pulls the
crucial fixes from 3.14.6, making the 3.14.5 version in bullseye as
robust as the final upstream bugfix release.

unblock petsc/3.14.5+dfsg1-3
diff -Nru petsc-3.14.5+dfsg1/debian/changelog petsc-3.14.5+dfsg1/debian/changelog
--- petsc-3.14.5+dfsg1/debian/changelog	2021-03-10 12:21:59.000000000 +0100
+++ petsc-3.14.5+dfsg1/debian/changelog	2021-04-09 13:28:02.000000000 +0200
@@ -1,3 +1,21 @@
+petsc (3.14.5+dfsg1-3) unstable; urgency=medium
+
+  * petsc3.14-doc Depends: sphinx-common.
+    Required since upstream tarball provides pregenerated docs, so
+    dh_sphinxdoc does not automatically add sphinx-common.
+    Closes: #985659.
+  * cherry-pick specific bug fixes from PETSc 3.14.6
+    - PR3681_scalapack_block_size.diff, sets block size of transposed
+      ScalAPACK matrices
+    - PR3686_DMPlex_missing_PetscSFSetUp.diff, adds PetscSFSetUp()
+      to DM plexcreate.c
+    - PR3722_umfpack_ordering.diff, use default umfpack ordering
+      since much faster than PETSc ordering
+    - PR3728_DM_anchor_initialize.diff, initialize variable in DM
+      anchor calculation
+
+ -- Drew Parsons <dparsons@debian.org>  Fri, 09 Apr 2021 13:28:02 +0200
+
 petsc (3.14.5+dfsg1-2) unstable; urgency=medium
 
   * upload new bugfix release to unstable
diff -Nru petsc-3.14.5+dfsg1/debian/control petsc-3.14.5+dfsg1/debian/control
--- petsc-3.14.5+dfsg1/debian/control	2021-03-10 12:21:59.000000000 +0100
+++ petsc-3.14.5+dfsg1/debian/control	2021-04-09 13:28:02.000000000 +0200
@@ -198,7 +198,7 @@
 Architecture: all
 Multi-Arch: foreign
 Section: doc
-Depends: ${misc:Depends}, ${sphinxdoc:Depends}
+Depends: sphinx-common, ${misc:Depends}, ${sphinxdoc:Depends}
 Suggests: libpetsc-real3.14-dev (= ${binary:Version}), illuminator-doc
 Description: Documentation and examples for PETSc
  PETSc is the "Portable Extensible Toolkit for Scientific
diff -Nru petsc-3.14.5+dfsg1/debian/patches/PR3681_scalapack_block_size.diff petsc-3.14.5+dfsg1/debian/patches/PR3681_scalapack_block_size.diff
--- petsc-3.14.5+dfsg1/debian/patches/PR3681_scalapack_block_size.diff	1970-01-01 01:00:00.000000000 +0100
+++ petsc-3.14.5+dfsg1/debian/patches/PR3681_scalapack_block_size.diff	2021-04-09 13:28:02.000000000 +0200
@@ -0,0 +1,45 @@
+diff --git a/src/mat/impls/scalapack/matscalapack.c b/src/mat/impls/scalapack/matscalapack.c
+index a8a118e26dd0f698fa6cbdb89549f7268532dae7..b6389dd1e527e89e50b6727ba95bcd06d2918f8f 100644
+--- a/src/mat/impls/scalapack/matscalapack.c
++++ b/src/mat/impls/scalapack/matscalapack.c
+@@ -617,10 +617,7 @@ static PetscErrorCode MatTranspose_ScaLAPACK(Mat A,MatReuse reuse,Mat *B)
+ 
+   PetscFunctionBegin;
+   if (reuse == MAT_INITIAL_MATRIX) {
+-    ierr = MatCreate(PetscObjectComm((PetscObject)A),&Bs);CHKERRQ(ierr);
+-    ierr = MatSetSizes(Bs,A->cmap->n,A->rmap->n,PETSC_DECIDE,PETSC_DECIDE);CHKERRQ(ierr);
+-    ierr = MatSetType(Bs,MATSCALAPACK);CHKERRQ(ierr);
+-    ierr = MatSetUp(Bs);CHKERRQ(ierr);
++    ierr = MatCreateScaLAPACK(PetscObjectComm((PetscObject)A),a->nb,a->mb,a->N,a->M,a->csrc,a->rsrc,&Bs);CHKERRQ(ierr);
+     *B = Bs;
+   } else SETERRQ(PetscObjectComm((PetscObject)A),PETSC_ERR_SUP,"Only MAT_INITIAL_MATRIX supported");
+   b = (Mat_ScaLAPACK*)Bs->data;
+@@ -653,10 +650,7 @@ static PetscErrorCode MatHermitianTranspose_ScaLAPACK(Mat A,MatReuse reuse,Mat *
+ 
+   PetscFunctionBegin;
+   if (reuse == MAT_INITIAL_MATRIX) {
+-    ierr = MatCreate(PetscObjectComm((PetscObject)A),&Bs);CHKERRQ(ierr);
+-    ierr = MatSetSizes(Bs,A->cmap->n,A->rmap->n,PETSC_DECIDE,PETSC_DECIDE);CHKERRQ(ierr);
+-    ierr = MatSetType(Bs,MATSCALAPACK);CHKERRQ(ierr);
+-    ierr = MatSetUp(Bs);CHKERRQ(ierr);
++    ierr = MatCreateScaLAPACK(PetscObjectComm((PetscObject)A),a->nb,a->mb,a->N,a->M,a->csrc,a->rsrc,&Bs);CHKERRQ(ierr);
+     *B = Bs;
+   } else SETERRQ(PetscObjectComm((PetscObject)A),PETSC_ERR_SUP,"Only MAT_INITIAL_MATRIX supported");
+   b = (Mat_ScaLAPACK*)Bs->data;
+@@ -841,14 +835,12 @@ PetscErrorCode MatFactorGetSolverType_scalapack_scalapack(Mat A,MatSolverType *t
+ static PetscErrorCode MatGetFactor_scalapack_scalapack(Mat A,MatFactorType ftype,Mat *F)
+ {
+   Mat            B;
++  Mat_ScaLAPACK  *a = (Mat_ScaLAPACK*)A->data;
+   PetscErrorCode ierr;
+ 
+   PetscFunctionBegin;
+   /* Create the factorization matrix */
+-  ierr = MatCreate(PetscObjectComm((PetscObject)A),&B);CHKERRQ(ierr);
+-  ierr = MatSetSizes(B,A->rmap->n,A->cmap->n,PETSC_DECIDE,PETSC_DECIDE);CHKERRQ(ierr);
+-  ierr = MatSetType(B,MATSCALAPACK);CHKERRQ(ierr);
+-  ierr = MatSetUp(B);CHKERRQ(ierr);
++  ierr = MatCreateScaLAPACK(PetscObjectComm((PetscObject)A),a->mb,a->nb,a->M,a->N,a->rsrc,a->csrc,&B);CHKERRQ(ierr);
+   B->factortype = ftype;
+   ierr = PetscFree(B->solvertype);CHKERRQ(ierr);
+   ierr = PetscStrallocpy(MATSOLVERSCALAPACK,&B->solvertype);CHKERRQ(ierr);
diff -Nru petsc-3.14.5+dfsg1/debian/patches/PR3686_DMPlex_missing_PetscSFSetUp.diff petsc-3.14.5+dfsg1/debian/patches/PR3686_DMPlex_missing_PetscSFSetUp.diff
--- petsc-3.14.5+dfsg1/debian/patches/PR3686_DMPlex_missing_PetscSFSetUp.diff	1970-01-01 01:00:00.000000000 +0100
+++ petsc-3.14.5+dfsg1/debian/patches/PR3686_DMPlex_missing_PetscSFSetUp.diff	2021-04-09 13:28:02.000000000 +0200
@@ -0,0 +1,12 @@
+diff --git a/src/dm/impls/plex/plexcreate.c b/src/dm/impls/plex/plexcreate.c
+index 920ccc69c0999efffad3c143417038565f8e6465..50c7bf11d367c9ce50c6a25324505d47dffdfc9a 100644
+--- a/src/dm/impls/plex/plexcreate.c
++++ b/src/dm/impls/plex/plexcreate.c
+@@ -2623,6 +2623,7 @@ static PetscErrorCode DMGetNeighbors_Plex(DM dm, PetscInt *nranks, const PetscMP
+   PetscFunctionBegin;
+   ierr = DMGetPointSF(dm, &sf);CHKERRQ(ierr);
+   if (!data->neighbors) {
++    ierr = PetscSFSetUp(sf);CHKERRQ(ierr);
+     ierr = PetscSFGetRootRanks(sf, &njranks, &jranks, NULL, NULL, NULL);CHKERRQ(ierr);
+     ierr = PetscSFGetLeafRanks(sf, &niranks, &iranks, NULL, NULL);CHKERRQ(ierr);
+     ierr = PetscMalloc1(njranks + niranks + 1, &data->neighbors);CHKERRQ(ierr);
diff -Nru petsc-3.14.5+dfsg1/debian/patches/PR3722_umfpack_ordering.diff petsc-3.14.5+dfsg1/debian/patches/PR3722_umfpack_ordering.diff
--- petsc-3.14.5+dfsg1/debian/patches/PR3722_umfpack_ordering.diff	1970-01-01 01:00:00.000000000 +0100
+++ petsc-3.14.5+dfsg1/debian/patches/PR3722_umfpack_ordering.diff	2021-04-09 13:28:02.000000000 +0200
@@ -0,0 +1,13 @@
+diff --git a/src/mat/impls/aij/seq/umfpack/umfpack.c b/src/mat/impls/aij/seq/umfpack/umfpack.c
+index 4f33f3a5d69c75ebed7c1a69e523fed9ea592283..6238e211e860815a8863569f24236428eb0ce68a 100644
+--- a/src/mat/impls/aij/seq/umfpack/umfpack.c
++++ b/src/mat/impls/aij/seq/umfpack/umfpack.c
+@@ -397,7 +397,7 @@ PETSC_EXTERN PetscErrorCode MatGetFactor_seqaij_umfpack(Mat A,MatFactorType ftyp
+ 
+   ierr = PetscFree(B->solvertype);CHKERRQ(ierr);
+   ierr = PetscStrallocpy(MATSOLVERUMFPACK,&B->solvertype);CHKERRQ(ierr);
+-  B->useordering = PETSC_TRUE;
++  B->useordering = PETSC_FALSE;
+ 
+   /* initializations */
+   /* ------------------------------------------------*/
diff -Nru petsc-3.14.5+dfsg1/debian/patches/PR3728_DM_anchor_initialize.diff petsc-3.14.5+dfsg1/debian/patches/PR3728_DM_anchor_initialize.diff
--- petsc-3.14.5+dfsg1/debian/patches/PR3728_DM_anchor_initialize.diff	1970-01-01 01:00:00.000000000 +0100
+++ petsc-3.14.5+dfsg1/debian/patches/PR3728_DM_anchor_initialize.diff	2021-04-09 13:28:02.000000000 +0200
@@ -0,0 +1,12 @@
+diff --git a/src/dm/impls/plex/plex.c b/src/dm/impls/plex/plex.c
+index 805fc6950e08596c4fff226c3111f2030033c11b..857d0d7826fd023ab64b47930613947bf860df57 100644
+--- a/src/dm/impls/plex/plex.c
++++ b/src/dm/impls/plex/plex.c
+@@ -8454,6 +8454,7 @@ static PetscErrorCode DMPlexCreateConstraintMatrix_Anchors(DM dm, PetscSection s
+     }
+     else {
+       annz = 0;
++      ierr = PetscSectionGetDof(cSec,p,&dof);CHKERRQ(ierr);
+       for (q = 0; q < dof; q++) {
+         a = anchors[off + q];
+         ierr = PetscSectionGetDof(section,a,&aDof);CHKERRQ(ierr);
diff -Nru petsc-3.14.5+dfsg1/debian/patches/series petsc-3.14.5+dfsg1/debian/patches/series
--- petsc-3.14.5+dfsg1/debian/patches/series	2021-03-10 12:21:59.000000000 +0100
+++ petsc-3.14.5+dfsg1/debian/patches/series	2021-04-09 13:28:02.000000000 +0200
@@ -13,3 +13,7 @@
 superlu-dist-no_test.patch
 configure_python3.patch
 petscmatmod_split.patch
+PR3681_scalapack_block_size.diff
+PR3686_DMPlex_missing_PetscSFSetUp.diff
+PR3722_umfpack_ordering.diff
+PR3728_DM_anchor_initialize.diff

Reply to: