Skip to content
Commits on Source (5)
igraph (0.7.1-4) UNRELEASED; urgency=medium
* use a different starting vector for
igraph_community_leading_eigenvector() to prevent errors
with ARPACK 3.6.3 (Thanks for the patch to Tamás Nepusz)
Closes: #902760
* Drop Tamás Nepusz <ntamas@gmail.com> from uploaders (Tamás, thanks
for your previous work on the Debian package and the support you
provide on upstream code)
* debhelper 12
* Standards-Version: 4.3.0
-- Andreas Tille <tille@debian.org> Thu, 10 Jan 2019 21:22:59 +0100
igraph (0.7.1-3) unstable; urgency=medium
[ Mathieu Malaterre ]
......
Source: igraph
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Uploaders: Andreas Tille <tille@debian.org>,
Tamás Nepusz <ntamas@gmail.com>
Uploaders: Andreas Tille <tille@debian.org>
Section: libs
Priority: optional
Build-Depends: debhelper (>= 11~),
Build-Depends: debhelper (>= 12~),
libtool,
libxml2-dev,
libgmp-dev,
......@@ -14,7 +13,7 @@ Build-Depends: debhelper (>= 11~),
automake,
libglpk-dev,
libf2c2-dev
Standards-Version: 4.2.1
Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/med-team/igraph
Vcs-Git: https://salsa.debian.org/med-team/igraph.git
Homepage: http://igraph.org/c/
......
From: Tamas Nepusz <ntamas@gmail.com>
Date: Wed, 2 Jan 2019 16:51:48 +0100
Origin: https://github.com/igraph/igraph/commit/17cc5be8.patch
Bug-Debian: https://bugs.debian.org/902760
Bug-Upstream: https://github.com/igraph/igraph/issues/1107
Subject: [PATCH] use a different starting vector for
igraph_community_leading_eigenvector() to prevent errors with ARPACK 3.6.3
---
src/community.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
--- a/src/community.c
+++ b/src/community.c
@@ -1736,13 +1736,19 @@ int igraph_community_leading_eigenvector
igraph_set_error_handler(errh);
igraph_set_warning_handler(warnh);
if (options->nconv < 1) {
- /* Call again, from a fixed starting point */
+ /* Call again from a fixed starting point. Note that we cannot use a
+ * fixed all-1 starting vector as sometimes ARPACK would return a
+ * 'starting vector is zero' error -- this is of course not true but
+ * it's a result of ARPACK >= 3.6.3 trying to force the starting vector
+ * into the range of OP (i.e. the matrix being solved). The initial
+ * vector we use here seems to work, but I have no theoretical argument
+ * for its usage; it just happens to work. */
options->start=1;
options->info=0;
options->ncv=0;
options->lworkl = 0; /* we surely have enough space */
for (i=0; i < options->n ; i++) {
- storage.resid[i] = 1;
+ storage.resid[i] = i % 2 ? 1 : -1;
}
IGRAPH_CHECK(igraph_arpack_rssolve(arpcb2, &extra, options, &storage,
/*values=*/ 0, /*vectors=*/ 0));
@@ -1774,12 +1780,13 @@ int igraph_community_leading_eigenvector
/*values=*/ 0, /*vectors=*/ 0);
igraph_set_error_handler(errh);
if (options->nconv < 1) {
- /* Call again from a fixed starting point */
+ /* Call again from a fixed starting point. See the comment a few lines
+ * above about the exact choice of this starting vector */
options->start=1;
options->info=0;
options->ncv=0;
options->lworkl = 0; /* we surely have enough space */
- for (i=0; i < options->n; i++) { storage.resid[i] = 1; }
+ for (i=0; i < options->n; i++) { storage.resid[i] = i % 2 ? 1 : -1; }
IGRAPH_CHECK(igraph_arpack_rssolve(arpcb1, &extra, options, &storage,
/*values=*/ 0, /*vectors=*/ 0));
options->start=0;
......@@ -5,3 +5,4 @@ drl_spelling_fix.patch
skip_tests_accessing_remote.patch
fix_test_arpack-3.6.patch
fix_broken_graph_ml.patch
different_starting_vector.patch
......@@ -19,7 +19,7 @@ CONF_FLAGS=\
override_dh_auto_configure:
dh_auto_configure -- $(CONF_FLAGS)
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test || true
endif
#override_dh_auto_test:
#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# dh_auto_test || true
#endif