# Is GraphDistance (and other graph analysis functions) compiled in 32bits?

Posted 4 months ago
594 Views
|
3 Replies
|
0 Total Likes
|
 I have a Windows 10 PC with 32GB RAM and currently use Mathematica 11.3 I tried to obtain the GraphDistance between two nodes in a 500,000 node 600,000 vertex graph and Mathematica crashed without warning (all the fonts went from blue or black to dark purple, like when you exit the kernel). I thought that it was because my computer ran out of memory but I repeated the process with the Task Manager open and Mathematica never used more than 2GB RAM. Is it possible that GraphDistance is compiled in 32bits and this is the reason it crashes once it reaches 2GB? Related question: is there a way to obtain my GraphDistance in Mathematica for such a large network? It is kind of a trivial network in C++. Thanks! Fernando Answer
3 Replies
Sort By:
Posted 4 months ago
 There are no differences between functions in this regard. If you installed the 64-bit version of Mathematica then it's 64-bit.I tried this on a random graph with more than 500000 nodes and more than 600000 vertices and got a response almost immediately. In:= \$Version Out= "11.3.0 for Mac OS X x86 (64-bit) (March 7, 2018)" In:= SeedRandom; In:= g = With[{g = RandomGraph[{600000, 700000}]}, Subgraph[g, First@ConnectedComponents[g]]]; In:= {VertexCount[g], EdgeCount[g]} Out= {520635, 687488} In:= RandomSample[VertexList[g], 2] Out= {382368, 532560} In:= GraphDistance[g, ##] & @@ % Out= 21 Answer
Posted 3 months ago
 Thanks! I worked hard figuring out what was going on and the crashes stop when I remove multiple-edge-vertex connections. That is, vertex A and B being connected by two edges with different speeds. When I removed the slow edge it worked fine, and obtained what I wanted in fractions of a second. So now I guess I am starting a thread asking whether multiedge graphs are supported or not. Best, Fernando Answer
Posted 3 months ago
 A crash is always a bug. You should post a minimal example that illustrates the problem, and also forward it to Wolfram support.IGraph/M has a function to combine parallel edges with a custom weight-combiner. You may be able to use this to work around the problem. See here for an example: https://mathematica.stackexchange.com/q/92360/12 Answer