GraphChi 0.1

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t > Class Template Reference
Inheritance diagram for graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >:

List of all members.

## Public Types
typedef sliding_shard < VertexDataType, EdgeDataType, svertex_t > | slidingshard_t
typedef memory_shard < VertexDataType, EdgeDataType, svertex_t > | memshard_t

## Public Member Functions
| 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_context & | get_context ()
size_t | num_updates ()
virtual size_t | num_edges_safe ()
virtual size_t | num_buffered_edges ()
virtual size_t | num_edges ()
bool | is_any_vertex_scheduled (vid_t st, vid_t en)
virtual void | initialize_iter ()
virtual void | initialize_before_run ()
virtual memshard_t * | create_memshard (vid_t interval_st, vid_t interval_en)
void | run (GraphChiProgram< VertexDataType, EdgeDataType, svertex_t > &userprogram, int _niters)
virtual void | iteration_finished ()
stripedio * | get_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)
std::string | get_info_json ()

## Protected Member Functions
void | print_config ()
virtual degree_data * | create_degree_handler ()
virtual bool | disable_preloading ()
int | discover_shard_num ()
virtual void | initialize_sliding_shards ()
virtual void | initialize_scheduler ()
virtual vid_t | determine_next_window (vid_t iinterval, vid_t fromvid, vid_t maxvid, size_t membudget)
size_t | num_edges_subinterval (vid_t st, vid_t en)
virtual void | load_before_updates (std::vector< svertex_t > &vertices)
void | exec_updates (GraphChiProgram< VertexDataType, EdgeDataType, svertex_t > &userprogram, std::vector< svertex_t > &vertices)
virtual void | init_vertices (std::vector< svertex_t > &vertices, graphchi_edge< EdgeDataType > *&edata)
void | save_vertices (std::vector< svertex_t > &vertices)
virtual void | load_after_updates (std::vector< svertex_t > &vertices)
virtual void | write_delta_log ()
virtual void | load_vertex_intervals ()

## Protected Attributes
std::string | base_filename
int | nshards
stripedio * | iomgr
std::vector< slidingshard_t * > | sliding_shards
memshard_t * | memoryshard
std::vector< std::pair< vid_t, vid_t > > | intervals
degree_data * | degree_handler
vertex_data_store < VertexDataType > * | vertex_data_handler
graphchi_context | chicontext
bitset_scheduler * | scheduler
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
metrics & | m
mutex | httplock
std::map< std::string, std::string > | json_params

## Constructor & Destructor Documentation

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::graphchi_engine | ( | std::string | _base_filename,
|  | int | _nshards,
|  | bool | _selective_scheduling,
|  | metrics & | _m
| ) |  |
| inline

Initialize GraphChi engine

Parameters:

  base_filename | prefix of the graph files
  nshards | number of shards
  selective_scheduling | if true, uses selective scheduling

## Member Function Documentation

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

virtual vid_t graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::determine_next_window | ( | vid_t | iinterval,
|  | vid_t | fromvid,
|  | vid_t | maxvid,
|  | size_t | membudget
| ) |  |
| inline protected virtual

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

Reimplemented in graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >.

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

int graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::discover_shard_num | ( |  | ) |
| inline protected

Try to find suitable shards by trying with different shard numbers. Looks up to shard number 2000.

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

bool graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::is_any_vertex_scheduled | ( | vid_t | st,
|  | vid_t | en
| ) |  |
| inline

Checks whether any vertex is scheduled in the given interval. If no scheduler is configured, returns always true.

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

virtual void graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::load_vertex_intervals | ( |  | ) |
| inline protected virtual

Loads vertex intervals.

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

virtual size_t graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::num_edges | ( |  | ) |
| inline virtual

Counts the number of edges from shard sizes.

Reimplemented in graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >.

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

virtual size_t graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::num_edges_safe | ( |  | ) |
| inline virtual

Thread-safe version of num_edges

Reimplemented in graphchi::graphchi_dynamicgraph_engine< VertexDataType, EdgeDataType, svertex_t >.

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

size_t graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::num_edges_subinterval | ( | vid_t | st,
|  | vid_t | en
| ) |  |
| inline protected

Calculates the exact number of edges required to load in the subinterval.

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

void graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::run | ( | GraphChiProgram< VertexDataType, EdgeDataType, svertex_t > & | userprogram,
|  | int | _niters
| ) |  |
| inline

Run GraphChi program, specified as a template parameter.

Parameters:

  niters | number of iterations

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

void graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::set_blocksize | ( | size_t | blocksize_in_bytes | ) |
| inline

Configure the blocksize used when loading shards. Default is one megabyte.

Parameters:

  blocksize_in_bytes | the blocksize in bytes

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

void graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::set_enable_deterministic_parallelism | ( | bool | b | ) |
| inline

Sets whether the engine is run in the deterministic mode. Default true.

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

void graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::set_json | ( | std::string | key,
|  | std::string | value
| ) |  |
| inline

HTTP admin management

template<typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType>>

void graphchi::graphchi_engine< VertexDataType, EdgeDataType, svertex_t >::set_membudget_mb | ( | int | mbs | ) |
| inline

Set the amount of memory available for loading graph data. Default is 1000 megabytes.

Parameters:

  mbs | amount of memory to be used.

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

- src/engine/graphchi_engine.hpp