[med-svn] [Git][med-team/igraph][master] 3 commits: More patches to finally pass test suite on all architectures

Andreas Tille gitlab at salsa.debian.org
Fri Apr 24 09:46:37 BST 2020



Andreas Tille pushed to branch master at Debian Med / igraph


Commits:
85c62f38 by Andreas Tille at 2020-04-24T10:38:20+02:00
More patches to finally pass test suite on all architectures

- - - - -
490291a7 by Andreas Tille at 2020-04-24T10:39:37+02:00
Provide symbols file only for amd64 to reduce maintenance burden

- - - - -
cad4df13 by Andreas Tille at 2020-04-24T10:45:47+02:00
Upload to unstable

- - - - -


5 changed files:

- debian/changelog
- debian/libigraph1.symbols → debian/libigraph1.symbols.amd64
- + debian/patches/6fb8f810e6b5aa7a1c8f48a0e86b05afedfd3f17.patch
- + debian/patches/ead7e0c59b8bb1745e0e50c892d986f9ccdb7f4f.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,11 +1,14 @@
 igraph (0.8.1+ds-2) unstable; urgency=medium
 
-  * Drop --with-external-f2c (thanks for the hint to Szabolcs Horvát)
-  
   [ Tamás Nepusz ]
   * Upstream patches relaxing tests to enable building on all architectures
+    Closes: #956821
+
+  [ Andreas Tille ]
+  * Drop --with-external-f2c (thanks for the hint to Szabolcs Horvát)
+  * Provide symbols file only for amd64 to reduce maintenance burden
 
- -- Andreas Tille <tille at debian.org>  Mon, 20 Apr 2020 21:22:20 +0200
+ -- Andreas Tille <tille at debian.org>  Fri, 24 Apr 2020 10:39:44 +0200
 
 igraph (0.8.1+ds-1) unstable; urgency=medium
 


=====================================
debian/libigraph1.symbols → debian/libigraph1.symbols.amd64
=====================================


=====================================
debian/patches/6fb8f810e6b5aa7a1c8f48a0e86b05afedfd3f17.patch
=====================================
@@ -0,0 +1,89 @@
+From 6fb8f810e6b5aa7a1c8f48a0e86b05afedfd3f17 Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Tue, 21 Apr 2020 22:16:16 +0200
+Subject: [PATCH] scg: relax testing a bit to get rid of numeric accuracy
+ issues on i386
+
+---
+ examples/simple/scg2.c | 49 +++++++++++++++++++++---------------------
+ 1 file changed, 25 insertions(+), 24 deletions(-)
+
+--- a/examples/simple/scg2.c
++++ b/examples/simple/scg2.c
+@@ -66,28 +66,28 @@ int main() {
+     } while (0)
+ 
+ #define FIXSMALL(eps) do { \
+-	long int i, j, ncol, nrow; \
+-	ncol = igraph_vector_complex_size(&eval); \
+-	for (i = 0; i < ncol; i++) { \
+-		if (fabs((double)IGRAPH_REAL(VECTOR(eval)[i])) < eps) { \
+-			IGRAPH_REAL(VECTOR(eval)[i]) = 0; \
+-		} \
+-		if (fabs((double)IGRAPH_IMAG(VECTOR(eval)[i])) < eps) { \
+-			IGRAPH_IMAG(VECTOR(eval)[i]) = 0; \
+-		} \
+-	} \
+-	nrow = igraph_matrix_complex_nrow(&evec); \
+-	ncol = igraph_matrix_complex_ncol(&evec); \
+-	for (i = 0; i < nrow; i++) { \
+-		for (j = 0; j < ncol; j++) { \
+-			if (fabs((double)IGRAPH_REAL(MATRIX(evec, i, j))) < eps) { \
+-				IGRAPH_REAL(MATRIX(evec, i, j)) = 0; \
+-			} \
+-			if (fabs((double)IGRAPH_IMAG(MATRIX(evec, i, j))) < eps) { \
+-				IGRAPH_IMAG(MATRIX(evec, i, j)) = 0; \
+-			} \
+-		} \
+-	} \
++    long int i, j, ncol, nrow; \
++    ncol = igraph_vector_complex_size(&eval); \
++    for (i = 0; i < ncol; i++) { \
++        if (fabs((double)IGRAPH_REAL(VECTOR(eval)[i])) < eps) { \
++            IGRAPH_REAL(VECTOR(eval)[i]) = 0; \
++        } \
++        if (fabs((double)IGRAPH_IMAG(VECTOR(eval)[i])) < eps) { \
++            IGRAPH_IMAG(VECTOR(eval)[i]) = 0; \
++        } \
++    } \
++    nrow = igraph_matrix_complex_nrow(&evec); \
++    ncol = igraph_matrix_complex_ncol(&evec); \
++    for (i = 0; i < nrow; i++) { \
++        for (j = 0; j < ncol; j++) { \
++            if (fabs((double)IGRAPH_REAL(MATRIX(evec, i, j))) < eps) { \
++                IGRAPH_REAL(MATRIX(evec, i, j)) = 0; \
++            } \
++            if (fabs((double)IGRAPH_IMAG(MATRIX(evec, i, j))) < eps) { \
++                IGRAPH_IMAG(MATRIX(evec, i, j)) = 0; \
++            } \
++        } \
++    } \
+     } while (0)
+ 
+ #define PRINTRES()                      \
+@@ -110,6 +110,7 @@ int main() {
+ 
+     VECTOR(ev)[0] = 1;
+     CALLSTO();
++    FIXSMALL(1e-4);
+     PRINTRES();
+     igraph_destroy(&scg_graph);
+     igraph_sparsemat_destroy(&scg_sparsemat);
+@@ -118,7 +119,7 @@ int main() {
+ 
+     VECTOR(ev)[0] = 3;
+     CALLSTO();
+-	FIXSMALL(1e-10);
++    FIXSMALL(1e-4);
+     PRINTRES();
+     igraph_destroy(&scg_graph);
+     igraph_sparsemat_destroy(&scg_sparsemat);
+@@ -129,7 +130,7 @@ int main() {
+     VECTOR(ev)[0] = 1;
+     VECTOR(ev)[1] = 3;
+     CALLSTO();
+-	FIXSMALL(1e-10);
++    FIXSMALL(1e-4);
+     PRINTRES();
+     igraph_destroy(&scg_graph);
+     igraph_sparsemat_destroy(&scg_sparsemat);


=====================================
debian/patches/ead7e0c59b8bb1745e0e50c892d986f9ccdb7f4f.patch
=====================================
@@ -0,0 +1,63 @@
+From ead7e0c59b8bb1745e0e50c892d986f9ccdb7f4f Mon Sep 17 00:00:00 2001
+From: Tamas Nepusz <ntamas at gmail.com>
+Date: Thu, 23 Apr 2020 22:22:27 +0200
+Subject: [PATCH] implemented custom printing for matrices in test cases to
+ avoid -0
+
+---
+ examples/tests/test_utilities.inc | 30 +++++++++++++++++++++++++++++-
+ 1 file changed, 29 insertions(+), 1 deletion(-)
+
+--- a/examples/tests/test_utilities.inc
++++ b/examples/tests/test_utilities.inc
+@@ -8,6 +8,7 @@
+ 
+ #include <igraph.h>
+ #include <stdio.h>
++#include <string.h>
+ 
+ /* Print elements of a vector. Use parentheses to make it clear when a vector has size zero. */
+ void print_vector(const igraph_vector_t *v, FILE *f) {
+@@ -142,6 +143,9 @@ void print_matrix_first_row_positive(con
+ void print_matrix_complex_first_row_positive(const igraph_matrix_complex_t *matrix) {
+     igraph_matrix_complex_t copy;
+     long i, j, nrow, ncol;
++    igraph_complex_t z;
++    char buf[256];
++    size_t len;
+ 
+     igraph_matrix_complex_copy(&copy, matrix);
+ 
+@@ -164,7 +168,31 @@ void print_matrix_complex_first_row_posi
+         }
+     }
+ 
+-    igraph_matrix_complex_print(&copy);
++    for (i = 0; i < nrow; i++) {
++        for (j = 0; j < ncol; j++) {
++            z = MATRIX(copy, i, j);
++            if (j != 0) {
++                putchar(' ');
++            }
++
++            snprintf(buf, sizeof(buf), "%g%+gi", IGRAPH_REAL(z), IGRAPH_IMAG(z));
++            len = strlen(buf);
++
++            /* ensure that we don't print -0 in the imaginary part */
++            if (len > 3 && buf[len-3] == '-' && buf[len-2] == '0' && buf[len-1] == 'i') {
++              buf[len-3] = '+';
++            }
++
++            /* ensure that we don't print -0 in the real part either */
++            if (buf[0] == '-' && buf[1] == '0' && (buf[2] == '+' || buf[2] == '-')) {
++                printf("%s", buf + 1);
++            } else {
++                printf("%s", buf);
++            }
++        }
++        printf("\n");
++    }
++
+     igraph_matrix_complex_destroy(&copy);
+ }
+ 


=====================================
debian/patches/series
=====================================
@@ -10,3 +10,5 @@ enable_removing_third_party_code.patch
 07-canonical-infomap.patch
 08-infomap-test-relaxation.patch
 09-hrg-test-relaxation.patch
+6fb8f810e6b5aa7a1c8f48a0e86b05afedfd3f17.patch
+ead7e0c59b8bb1745e0e50c892d986f9ccdb7f4f.patch



View it on GitLab: https://salsa.debian.org/med-team/igraph/-/compare/8a4f570b5ef89ebb97a7cef7a0fcf142c7ca6bbd...cad4df139c06e86382548a7f998a83e4fa7610e4

-- 
View it on GitLab: https://salsa.debian.org/med-team/igraph/-/compare/8a4f570b5ef89ebb97a7cef7a0fcf142c7ca6bbd...cad4df139c06e86382548a7f998a83e4fa7610e4
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200424/cb77df9f/attachment-0001.html>


More information about the debian-med-commit mailing list