Customized Ingress Issue

User 287 | 5/2/2014, 9:32:27 PM

Hi,

We made a simple modification to make our ingress class: class distributedouringress: public distributedingressbase<VertexData, EdgeData> { ... void addedge(vertexidtype source, vertexidtype target, const EdgeData& edata) { typedef typename basetype::edgebufferrecord edgebufferrecord; procidt owningproc = 0; const edgebufferrecord record(source, target, edata); basetype::edgeexchange.send(owning_proc, record);

}

void add_vertex(vertex_id_type vid, const VertexData& vdata)  
{ 
	typedef typename base_type::vertex_buffer_record vertex_buffer_record;
	const procid_t owning_proc = 0;
	const vertex_buffer_record record(vid, vdata);
	base_type::vertex_exchange.send(owning_proc, record);
}

} Basically, we put all edges and vertices in proc 0. However, we still don't get replica factor = 1. For example we added two vertices and an edge between them in a system with 2 processor (mpiexec -n 2) and we get this:

INFO: distributedingressbase.hpp(finalize:185): Finalizing Graph... .. INFO: distributedingressbase.hpp(finalize:293): Local graph info: nverts: 0 nedges: 0 ... INFO: distributedingressbase.hpp(finalize:293): Local graph info: nverts: 2 nedges: 1 .. INFO: distributedingressbase.hpp(exchangeglobalinfo:532): Graph info: nverts: 2 nedges: 1 nreplicas: 3 replication factor: 1.5

We are using Graphlab v2.2 on Ubuntu 14.

Comments

User 33 | 5/3/2014, 5:37:05 AM

GraphLab enforces the master of vertex is located at its hashed node (even there is no its edge at that node).

For example Graph: vertex 0 and 1, and an edge from 0 to 1 Hash: v-id mod #node

node0: master of vertex 0, replica of vertex 1, and edge from 0 to 1 node1: master of vertex 1

nverts:2 nedges:1 nreplicas: 3 replication factor: 1.5

This design will increase the replication factor, but is more friendly to external query. You can directly find the master of vertex by hashing. (only the master has all data of vertex)


User 287 | 5/7/2014, 11:15:00 PM

Thanks! It helped.