[superlu-dist] 01/02: create debian patch parmetis_null_op.patch
Drew Parsons
dparsons at moszumanska.debian.org
Tue Nov 14 10:02:18 UTC 2017
This is an automated email from the git hooks/post-receive script.
dparsons pushed a commit to branch master
in repository superlu-dist.
commit 9e281e438e82ac6dce0b3b193ff846f39d572db5
Author: Drew Parsons <dparsons at debian.org>
Date: Tue Nov 14 17:14:19 2017 +0800
create debian patch parmetis_null_op.patch
works around build of parmetis when parmetis is disabled (disabled in
the Debian build since it is nonfree).
Creates a null op (more precisely, aborts) when the parmetis function
is called.
Likewise for metis support.
---
debian/changelog | 1 +
debian/patches/parmetis_null_op.patch | 70 +++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 72 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 3d21759..c34e45f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,5 +3,6 @@ superlu-dist (5.2.2-1) UNRELEASED; urgency=medium
* Initial release (Closes: #735679).
- debian patch mc64ad_dist-stub.patch provides stubs for
mc64ad_dist.c (removed, since non-free)
+ * Parmetis/Metis is not supported in this build (non-free)
-- Drew Parsons <Drew Parsons <dparsons at debian.org>> Wed, 13 Sep 2017 12:04:10 +0800
diff --git a/debian/patches/parmetis_null_op.patch b/debian/patches/parmetis_null_op.patch
new file mode 100644
index 0000000..8266d72
--- /dev/null
+++ b/debian/patches/parmetis_null_op.patch
@@ -0,0 +1,70 @@
+superlu-dist still attempts to build against parmetis even if it is
+disabled. This patch provides a null-op alternative if HAS_PARMETIS
+is not defined.
+Index: superlu-dist/SRC/get_perm_c_parmetis.c
+===================================================================
+--- superlu-dist.orig/SRC/get_perm_c_parmetis.c
++++ superlu-dist/SRC/get_perm_c_parmetis.c
+@@ -24,9 +24,11 @@ at the top-level directory.
+ /* limits.h: the largest positive integer (INT_MAX) */
+ #include <limits.h>
+ #include <math.h>
+-#include "parmetis.h"
+ #include "superlu_ddefs.h"
+
++#ifdef HAS_PARMETIS
++#include "parmetis.h"
++
+ /*
+ * Internal protypes
+ */
+@@ -918,3 +920,17 @@ a_plus_at_CompRow_loc
+ } /* a_plus_at_CompRow_loc */
+
+
++#else
++
++float
++get_perm_c_parmetis (SuperMatrix *A, int_t *perm_r, int_t *perm_c,
++ int nprocs_i, int noDomains,
++ int_t **sizes, int_t **fstVtxSep,
++ gridinfo_t *grid, MPI_Comm *metis_comm)
++
++{
++ ABORT("parmetis is not supported in this build of SuperLU-dist");
++ return 0;
++}
++
++#endif
+Index: superlu-dist/SRC/get_perm_c.c
+===================================================================
+--- superlu-dist.orig/SRC/get_perm_c.c
++++ superlu-dist/SRC/get_perm_c.c
+@@ -25,6 +25,7 @@ at the top-level directory.
+ #include "superlu_ddefs.h"
+ #include "colamd.h"
+
++#ifdef HAS_METIS
+
+ void
+ get_metis(
+@@ -102,6 +103,19 @@ get_metis(
+ #endif
+ SUPERLU_FREE(perm);
+ }
++#else
++void
++get_metis(
++ int_t n, /* dimension of matrix B */
++ int_t bnz, /* number of nonzeros in matrix A. */
++ int_t *b_colptr, /* column pointer of size n+1 for matrix B. */
++ int_t *b_rowind, /* row indices of size bnz for matrix B. */
++ int_t *perm_c /* out - the column permutation vector. */
++ )
++{
++ ABORT("Metis is not supported in this build of SuperLU-Dist. Sorry.");
++}
++#endif
+
+ void
+ get_colamd_dist(
diff --git a/debian/patches/series b/debian/patches/series
index 7e9220a..6456dbb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
mc64ad_dist-stub.patch
+parmetis_null_op.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/superlu-dist.git
More information about the debian-science-commits
mailing list