igraph-help
[Top][All Lists]
Advanced

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

[igraph] trunk #2467: test suite 66 failed


From: Minh Nguyen
Subject: [igraph] trunk #2467: test suite 66 failed
Date: Sun, 15 May 2011 17:12:49 +1000

Hi folks,

Revision #2456 at

http://bazaar.launchpad.net/~igraph/igraph/0.6-main/revision/2456

added the following test suite:

examples/simple/watts_strogatz_game.c

I commented out all test cases in that file, except for this one:

  /* No loops, multiple edges possible */
  seen_multiple=0;
  for (i=0; i<N; i++) {
    SEED();
    igraph_watts_strogatz_game(&ws, /*dim=*/ 1, /*size=*/ 5, /*nei=*/ 1,
                               /*p=*/ 0.5, /*loops=*/ 0, /*multiple=*/ 1);
    if (has_loops(&ws)) { ERR(); return 3; }
    seen_multiple = seen_multiple || has_multiple(&ws);
    igraph_destroy(&ws);
  }
  if (!seen_multiple) { ERR(); return 4; }

I compiled that one file and repeatedly ran the resulting executable.
Sometimes I would get a failure, but most times I don't. I repeatedly
ran the executable under Valgrind as follows; in this case the failure
is apparent:

address@hidden simple]$ valgrind -v --leak-resolution=high
--log-file=./valgrind.log --leak-check=full --num-callers=25 ./test
Seed: 128
test: vector.pmt:457: igraph_vector_size: Assertion `v->stor_begin !=
((void *)0)' failed.
Aborted

The resulting valgrind log shows the following trace:

==21860== Process terminating with default action of signal 6 (SIGABRT)
==21860==    at 0x5348095: raise (in /lib/libc-2.7.so)
==21860==    by 0x5349AEF: abort (in /lib/libc-2.7.so)
==21860==    by 0x53412DE: __assert_fail (in /lib/libc-2.7.so)
==21860==    by 0x4EEFD5D: igraph_vector_size (vector.pmt:457)
==21860==    by 0x4EBBC7C: igraph_ecount (type_indexededgelist.c:690)
==21860==    by 0x4E93B12: igraph_i_eit_create_allfromto (iterators.c:1538)
==21860==    by 0x4E93E77: igraph_eit_create (iterators.c:1731)
==21860==    by 0x4EC22EF: igraph_write_graph_edgelist (foreign.c:1450)
==21860==    by 0x400B1F: main (in
/disk/scratch/mvngu/apps/igraph/examples/simple/test)
==21860==
==21860== HEAP SUMMARY:
==21860==     in use at exit: 32 bytes in 2 blocks
==21860==   total heap usage: 50,641 allocs, 50,639 frees, 1,477,320
bytes allocated
==21860==
==21860== Searching for pointers to 2 not-freed blocks
==21860== Checked 720,264 bytes
==21860==
==21860== LEAK SUMMARY:
==21860==    definitely lost: 0 bytes in 0 blocks
==21860==    indirectly lost: 0 bytes in 0 blocks
==21860==      possibly lost: 0 bytes in 0 blocks
==21860==    still reachable: 32 bytes in 2 blocks
==21860==         suppressed: 0 bytes in 0 blocks
==21860== Reachable blocks (those to which a pointer was found) are not shown.
==21860== To see them, rerun with: --leak-check=full --show-reachable=yes

This suggests to me that when creating a Watts-Strogatz graph with no
loops but having multiple edges, it is sometimes possible to have a
graph with an empty edge list. This might be a reason why I got the
above assertion failure. Thought I should report the above failure; I
don't know enough about the Watts-Strogatz implementation to debug the
problem.

-- 
Regards
Minh Van Nguyen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]