Closed jpfairbanks closed 8 years ago
This is cool! But on running this as it is, I get a
julia> include("add_remove_bench.jl")
INFO: Setting STINGER Parameters
INFO: small run to precompile
INFO: Allocating a STINGER
Apr 29 02:11:18 stinger[16528] <Warning>: stinger_new_full 796: Resizing stinger to fit into memory (detected as 10000000)
INFO: Generating the edges
0.000022 seconds (100 allocations: 10.938 KB)
INFO: Inserting 100 edges
0.000123 seconds (100 allocations: 1.563 KB)
size(removals) = (5,100)
INFO: Removing 1/8 of the edges
0.000036 seconds (13 allocations: 208 bytes)
INFO: real becnhmark: nv=1000,ne=4000
INFO: Allocating a STINGER
Apr 29 02:11:18 stinger[16528] <Warning>: stinger_new_full 796: Resizing stinger to fit into memory (detected as 10000000)
INFO: Generating the edges
0.000905 seconds (11.39 k allocations: 552.984 KB)
INFO: Inserting 4000 edges
Assertion failed: (from < stinger_max_nv(G)), function stinger_insert_edge, file /Users/rohitvarkey/Code/gatech/stinger/lib/stinger_core/src/stinger.c, line 1275.
signal (6): Abort trap: 6
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
[1] 16528 abort julia
I tried increasing the value of STINGER_MAX_MEMSIZE
to double the current value and then it ran without a hitch.
Would it be useful to have the insert!
and remove!
functions in the package itself? I think it'll be nice to have exported functions to add and remove a set of edges, rather than having to loop through them and calling insert_edge!
and remove_edge
each time.
The amount of memory stinger needs is affected by the number of edge types and vertex types defined at compile time. I changed them using cmake before compiling, which is why it works for me. Yeah you can increase the amount of memory or change the compilation settings.
The edgetypes and vertex types are designed for modeling complex networks where there is more than one "type" of relationship and more than one "type" of entities. Facebook has people and posts twitter has mentioning and following. That type of stuff.
Yeah I think insert and remove can go in the package. I will rename them to insert_edges!
, remove_edges!
Bump. @jpfairbanks
I think you can merge it and then increase the number in a separate commit.
I can do that! 😄
I actually got this working. I just Pkg.cloned this repo then followed the directions in the stinger repo to build stinger. Make sure you do the
. ../SOURCEME.sh
part of the Stinger README then start the julia repl.output of julia test/add_remove_bench.jl looks like: