Alternative vertex id type?

24 views
Skip to first unread message

Huahang Liu

unread,
May 21, 2013, 11:22:52 PM5/21/13
to graph...@googlegroups.com
Good day to you all. 

I am new to GraphLab so please forgive me if this is a stupid question. 

I have noticed that the vertex id type of GraphLab is 32-bit unsigned integer. But in my application, many of the object id's are long or even string. One possible option is to generate a 32-bit id for each object as a preprocessing since the number of objects in total isn't really beyond 4 billion (2^32). But is there any alternative way of solving this problem right now? In the future, will GraphLab support alternative vertex types and thus will be able to process graphs with more than 4 billion vertices?

Thanks,
Huahang

Yucheng Low

unread,
May 21, 2013, 11:24:23 PM5/21/13
to graph...@googlegroups.com
Hi,

We defaulted to 32-bit integers to save on memory space; but we are extending to 64-bit integers by default in v2.2. 
(96-bit is under consideration since that will make it safe to use hashed vertex IDs for up to about 2^48 vertices).

Right now, a simple change of a line in src/graphlab/graph/graph_basic_types.hpp (http://code.google.com/p/graphlabapi/source/browse/src/graphlab/graph/graph_basic_types.hpp)

From 
typedef uint32_t vertex_id_type
typedef uint32_t lvid_type

to 
typedef uint64_t vertex_id_type;
typedef uint64_t lvid_type;

will allow the use of full 64-bit vertex IDs.

Yucheng


--
You received this message because you are subscribed to the Google Groups "GraphLab API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to graphlabapi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Huahang Liu

unread,
May 21, 2013, 11:31:19 PM5/21/13
to graph...@googlegroups.com
Thank you Yucheng for your quick response! 
:-)

Joseph Gonzalez

unread,
May 22, 2013, 1:05:39 AM5/22/13
to graph...@googlegroups.com
Since 64bit vertex ids have been a popular request, I just added a configure option:

   ./configure --vid64

which will switch to 64bit vertex ids (by defining USE_VID64).  I pushed the change to the main branch on google code. 

Joey



Reply all
Reply to author
Forward
0 new messages