GraphChi  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t > Class Template Reference

#include <graphchi_dynamicgraph_engine.hpp>

Inheritance diagram for graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >:
graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >

List of all members.

Public Types

typedef graphchi_engine
< VertexDataType, EdgeDataType > 
base_engine
typedef edge_buffer_flat
< EdgeDataType > 
edge_buffer
- Public Types inherited from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >
typedef sliding_shard
< VertexDataType, EdgeDataType,
svertex_t > 
slidingshard_t
typedef memory_shard
< VertexDataType, EdgeDataType,
svertex_t > 
memshard_t

Public Member Functions

 graphchi_dynamicgraph_engine (std::string base_filename, int nshards, bool selective_scheduling, metrics &_m)
size_t num_edges_safe ()
size_t num_buffered_edges ()
bool add_edge (vid_t src, vid_t dst, EdgeDataType edata)
void add_task (vid_t vid)
void finish_after_iters (int extra_iters)
std::string get_info_json ()
- Public Member Functions inherited from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >
 graphchi_engine (std::string _base_filename, int _nshards, bool _selective_scheduling, metrics &_m)
virtual std::pair< vid_t, vid_t > get_interval (int i)
vid_t get_interval_start (int i)
vid_t get_interval_end (int i)
virtual size_t num_vertices ()
graphchi_contextget_context ()
size_t num_updates ()
bool is_any_vertex_scheduled (vid_t st, vid_t en)
void run (GraphChiProgram< VertexDataType, EdgeDataType, svertex_t > &userprogram, int _niters)
stripedioget_iomanager ()
virtual void set_modifies_inedges (bool b)
virtual void set_modifies_outedges (bool b)
virtual void set_only_adjacency (bool b)
void set_blocksize (size_t blocksize_in_bytes)
void set_membudget_mb (int mbs)
void set_load_threads (int lt)
void set_exec_threads (int et)
void set_enable_deterministic_parallelism (bool b)
void set_json (std::string key, std::string value)
template<typename T >
void set_json (std::string key, T val)

Protected Member Functions

virtual bool disable_preloading ()
virtual degree_datacreate_degree_handler ()
virtual size_t num_edges ()
void init_buffers ()
size_t cp (std::string origfile, std::string dstfile, bool zeroout=false)
virtual base_engine::memshard_tcreate_memshard (vid_t interval_st, vid_t interval_en)
virtual void initialize_sliding_shards ()
void prepare_clean_slate ()
int get_shard_for (vid_t dst)
void incorporate_buffered_edges (int window, vid_t window_st, vid_t window_en, std::vector< svertex_t > &vertices)
bool incorporate_new_edge_degrees (int window, vid_t window_st, vid_t window_en)
void adjust_degrees_for_deleted (std::vector< svertex_t > &vertices, vid_t window_st)
virtual vid_t determine_next_window (vid_t iinterval, vid_t fromvid, vid_t maxvid, size_t membudget)
virtual void load_before_updates (std::vector< svertex_t > &vertices)
virtual void init_vertices (std::vector< svertex_t > &vertices, graphchi_edge< EdgeDataType > *&edata)
virtual void initialize_iter ()
virtual void iteration_finished ()
virtual void initialize_before_run ()
virtual void load_after_updates (std::vector< svertex_t > &vertices)
void commit_graph_changes ()
template<typename T >
void bwrite (int f, char *buf, char *&bufptr, T val)
- Protected Member Functions inherited from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >
void print_config ()
int discover_shard_num ()
virtual void initialize_scheduler ()
size_t num_edges_subinterval (vid_t st, vid_t en)
void exec_updates (GraphChiProgram< VertexDataType, EdgeDataType, svertex_t > &userprogram, std::vector< svertex_t > &vertices)
void save_vertices (std::vector< svertex_t > &vertices)
virtual void write_delta_log ()
virtual void load_vertex_intervals ()

Protected Attributes

std::vector< std::vector
< edge_buffer * > > 
new_edge_buffers
std::vector< int > deletecounts
std::vector< std::string > shard_suffices
vid_t max_vertex_id
size_t max_edge_buffer
size_t last_commit
size_t added_edges
std::string state
size_t maxshardsize
size_t edges_in_shards
mutex modification_lock
mutex schedulerlock
mutex shardlock
- Protected Attributes inherited from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >
std::string base_filename
int nshards
stripedioiomgr
std::vector< slidingshard_t * > sliding_shards
memshard_tmemoryshard
std::vector< std::pair< vid_t,
vid_t > > 
intervals
degree_datadegree_handler
vertex_data_store
< VertexDataType > * 
vertex_data_handler
graphchi_context chicontext
bitset_schedulerscheduler
bool modifies_outedges
bool modifies_inedges
bool only_adjacency
bool use_selective_scheduling
bool enable_deterministic_parallelism
bool store_inedges
size_t blocksize
int membudget_mb
int load_threads
int exec_threads
vid_t sub_interval_st
vid_t sub_interval_en
int iter
int niters
int exec_interval
size_t nupdates
size_t nedges
size_t work
metricsm
mutex httplock
std::map< std::string,
std::string > 
json_params

Detailed Description

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
class graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >

The actual engine


Member Function Documentation

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
void graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::commit_graph_changes ( )
inlineprotected

Code for committing changes to disk.

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
size_t graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::cp ( std::string  origfile,
std::string  dstfile,
bool  zeroout = false 
)
inlineprotected

In the beginning of run, we copy the shards into dynamic versions.

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
virtual degree_data* graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::create_degree_handler ( )
inlineprotectedvirtual

Create a dynamic version of the degree file.

Reimplemented from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >.

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
virtual vid_t graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::determine_next_window ( vid_t  iinterval,
vid_t  fromvid,
vid_t  maxvid,
size_t  membudget 
)
inlineprotectedvirtual

Extends the window to fill the memory budget, but not over maxvid

Reimplemented from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >.

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
virtual bool graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::disable_preloading ( )
inlineprotectedvirtual

Preloading will interfere with the operation.

Reimplemented from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >.

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
std::string graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::get_info_json ( )
inline

HTTP admin

FIXME: too much duplicate with graphchi_engine

Reimplemented from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >.

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
virtual void graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::initialize_sliding_shards ( )
inlineprotectedvirtual

Initialize streaming shards in the start of each iteration.

Reimplemented from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >.

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
virtual size_t graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::num_edges ( )
inlineprotectedvirtual

Counts the number of edges from shard sizes.

Reimplemented from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >.

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
size_t graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::num_edges_safe ( )
inlinevirtual

Thread-safe version of num_edges

Reimplemented from graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >.


Member Data Documentation

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
mutex graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::modification_lock
protected

Concurrency control

template<typename VertexDataType , typename EdgeDataType , typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>
std::vector< std::vector< edge_buffer * > > graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >::new_edge_buffers
protected

Bookkeeping of buffered and deleted edges.


The documentation for this class was generated from the following file: