Message Boards Message Boards

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

Posted 5 years ago
POSTED BY: Fernando Perez
3 Replies
Posted 5 years 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[18]:= $Version

Out[18]= "11.3.0 for Mac OS X x86 (64-bit) (March 7, 2018)"

In[19]:= SeedRandom[42];

In[20]:= g = 
  With[{g = RandomGraph[{600000, 700000}]}, 
   Subgraph[g, First@ConnectedComponents[g]]];

In[21]:= {VertexCount[g], EdgeCount[g]}

Out[21]= {520635, 687488}

In[22]:= RandomSample[VertexList[g], 2]

Out[22]= {382368, 532560}

In[23]:= GraphDistance[g, ##] & @@ %

Out[23]= 21
POSTED BY: Updating Name
Posted 5 years 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

POSTED BY: Fernando Perez

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

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract