|
From: | Mario Lavezzi |
Subject: | Re: Degree sequence game segfault, was: Re: [igraph] problems with parameters in barabasi.game() |
Date: | Thu, 11 Sep 2008 18:25:01 +0200 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080724) |
Only little problem: the degree.sequence.game() function actually does not generate the graph quite often as I increase the power-law exponent. With the exponent set to 2 I found no particular problems, with the exponent set to 2.6 I find quite difficult to obtain a graph.
For the moment, I am circumventing this by running simulations with different seeds (using the R instruction set.seed()), until I obtain a graph.
I am simulating networks with 1000 agents, and I am not quite sure that, by augmenting the number of agents, the difficulty for the code to generate a graph with exponents higher than two will disappear.
Mario Csardi Gabor wrote:
Mario, please read this for a workaround: http://lists.gnu.org/archive/html/igraph-help/2008-09/msg00083.html Gabor On Wed, Sep 10, 2008 at 06:12:37PM +0200, Csardi Gabor wrote:Mario, no, it is not supposed to "work" like this, this is a bug, possibly in igraph, possibly in the C++ code we use for the graph generation. Sorry about this, I'll try to correct it.G. On Wed, Sep 10, 2008 at 05:59:10PM +0200, Mario Lavezzi wrote:Gabor, thanks a lot. It seems to work but, most of the times, after following your suggestions, I get a message like this:-------------------------------------------------------------------- *** caught segfault *** address (nil), cause 'memory not mapped' Traceback:1: .Call("R_igraph_degree_sequence_game", as.numeric(out.deg), as.numeric(in.deg), as.numeric(method), PACKAGE = "igraph")2: degree.sequence.game(degreeSeq, method = "vl") Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace ----------------------------------------------------------- ...and have to stop..I understand this has to do with the way R works, but I have not found any useful help on this in the web(by the way, I use R 2.6.2 on Linux Ubuntu 8.04) MarioMario, I would try 'sample' first, e.g.degs <- sample(1:1000, 1000, replace=TRUE, prob=(1:1000)^-2) g <- degree.sequence.game(degs, method="vl") Note that it is not always possible to realize a given degree sequence, e.g. if the sum of degrees is odd, then it is trivially impossible. G.-- Andrea Mario Lavezzi Dipartimento di Studi su Politica, Diritto e Società Università di Palermo Piazza Bologni 8 90134 Palermo, Italy tel. ++39 091 6625600 fax ++39 091 6112023 skype: lavezzimario email: lavezzi (at) unipa.it web: http://www.unipa.it/~lavezzi _______________________________________________ igraph-help mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/igraph-help-- Csardi Gabor <address@hidden> MTA RMKI, ELTE TTK _______________________________________________ igraph-help mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/igraph-help
-- Andrea Mario Lavezzi Dipartimento di Studi su Politica, Diritto e Società Università di Palermo Piazza Bologni 8 90134 Palermo, Italy tel. ++39 091 6625600 fax ++39 091 6112023 skype: lavezzimario email: lavezzi (at) unipa.it web: http://www.unipa.it/~lavezzi
[Prev in Thread] | Current Thread | [Next in Thread] |