Coder Social home page Coder Social logo

narayanan2004 / graphmat Goto Github PK

View Code? Open in Web Editor NEW
99.0 9.0 41.0 5.38 MB

GraphMat graph analytics framework

License: Other

Makefile 0.39% C++ 98.84% C 0.77%
graphs graph graph-processing distributed pagerank shortest-paths breadth-first-search latent-dirichlet-allocation collaborative-filtering triangle-counting

graphmat's People

Contributors

btbytes avatar mihaic avatar narayanan2004 avatar xoltar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphmat's Issues

Does not build using icpc 15.0.2

When attempting to build on a 64-bit Linux Ubuntu distribution using the Intel 15 compiler

I get an error which begins with the following message:

                 from src/Graph.cpp(36),
                 from src/GraphMatRuntime.cpp(45),
                 from src/PageRank.cpp(31):
/usr/include/c++/5/bits/stl_iterator_base_types.h(154): error: class "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>" has no member "iterator_category"
        typedef typename _Iterator::iterator_category iterator_category;

This does not change if I set export debug=1 and then make.

An error answer got from testing Triangle Counting

Hello,
When I ran the below cmd to test Triangle Counting in GraphMat:

./bin/TriangleCounting ../data/soc-LiveJournal1.mtx

I've got the below output:

Reading file: ../data/soc-LiveJournal1.mtx0
Could not open file: ../data/soc-LiveJournal1.mtx1
Got: 4847571 by 4847571 vertices
Got: 68993773 edges
Rank 0: Before shuffle 68993773 edges
Rank 0: After shuffle 68993773 edges
Rank 0: Before shuffle 68993773 edges
Rank 0: After shuffle 68993773 edges
Finished GraphMat read + construction, time: 5.78043
Completed 1 iterations
Time = 3011.534 ms
Total triangles = 0
1 : 0 :
2 : 0 :
3 : 0 :
4 : 0 :
5 : 0 :
6 : 0 :
7 : 0 :
8 : 0 :
9 : 0 :
10 : 0 :

It seems like an error answer. And I do not know the reason.
Please give me some help. Any info will help.

Thank you!

Core Dump with SSSP

This was built using icpc 17.0 and I converted a graph using bin/graph_converter.

When running bin/SSSP with OMP_NUM_THREADS=2 and export KMP_AFFINITY=scatter the output is:

bin/SSSP Knowledge_Repo.graphmat 10
num threads got: 2
Starting file read of Knowledge_Repo.graphmat
Got graph with m=138613	n=138613	nnz=929884
Finished file read of Knowledge_Repo.graphmat, time: 0.013574
Finished setting ids, time: 0.012866
Starting sort
Finished sort, time: 0.091563
Finished setting edge pointers, time: 1.1e-05
Starting build_dcsc
Finished build_dcsc, time: 0.003931
Finished setting ids, time: 0.004313
Starting sort
Finished sort, time: 0.059026
Finished setting edge pointers, time: 1.1e-05
Starting build_dcsc
Finished build_dcsc, time: 0.003771
Completed reading A from memory in 0.176794 seconds.
Completed reading A from file in 0.190481 seconds.
Segmentation fault (core dumped)

I get the following error from the gdb backtraces:

Thread 1:

#0  0x0000000000407619 in void BlockingHypersparse_GEMV<unsigned int, unsigned int, BFSD2, int>(MatrixDC<int> const*, BFSD2 const*, SparseVector<unsigned int> const&, SparseVector<unsigned int>&, GraphProgram<unsigned int, unsigned int, BFSD2, int> const*) ()
#1  0x000000000040633d in void run_graph_program<unsigned int, unsigned int, BFSD2, int>(GraphProgram<unsigned int, unsigned int, BFSD2, int>*, Graph<BFSD2, int>&, int, run_graph_program_temp_structure<unsigned int, unsigned int, BFSD2>*)
    ()
#2  0x00007fe219483413 in __kmp_invoke_microtask ()
   from /packages/intel/17/linux/compiler/lib/intel64/libiomp5.so
#3  0x00007fe219453187 in __kmp_invoke_task_func (gtid=23278576)
    at ../../src/kmp_runtime.c:7055
#4  0x00007fe219452865 in __kmp_launch_thread (this_thr=0x16333f0)
    at ../../src/kmp_runtime.c:5662
#5  0x00007fe219483793 in __kmp_launch_worker (thr=0x16333f0)
    at ../../src/z_Linux_util.c:773
#6  0x00007fe218fb26ba in start_thread (arg=0x7fe146ff4880)
    at pthread_create.c:333
#7  0x00007fe218ce882d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

And thread 2:

#0  __kmp_yield (cond=0) at ../../src/z_Linux_util.c:1918
#1  0x00007fe21942846c in __kmp_wait_template<kmp_flag_64> (
    this_thr=<optimized out>, flag=<optimized out>, 
    final_spin=<optimized out>, itt_sync_obj=<optimized out>)
    at ../../src/kmp_wait_release.h:235
#2  kmp_flag_64::wait (this=<optimized out>, this_thr=<optimized out>, 
    final_spin=<optimized out>, itt_sync_obj=<optimized out>)
    at ../../src/kmp_wait_release.h:536
#3  __kmp_hyper_barrier_release (bt=bs_plain_barrier, this_thr=0x7fe2189af900, 
    gtid=0, tid=416070727, propagate_icvs=426738816, itt_sync_obj=0x0)
    at ../../src/kmp_barrier.cpp:790
#4  0x00007fe2194299d4 in __kmp_fork_barrier (gtid=0, tid=412809472)
    at ../../src/kmp_barrier.cpp:1951
#5  0x00007fe2194527b0 in __kmp_launch_thread (this_thr=0x0)
    at ../../src/kmp_runtime.c:5620
#6  0x00007fe219483793 in __kmp_launch_worker (thr=0x0)
    at ../../src/z_Linux_util.c:773
#7  0x00007fe218fb26ba in start_thread (arg=0x7fe217fda880)
    at pthread_create.c:333
#8  0x00007fe218ce882d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

compile error with gcc + MPICH

make MPICXX=mpic++ CXX=g++
mpic++ -cxx=g++ -fopenmp --std=c++11 -I/usr/include/mpi/ -I./include -I./include/GMDP -O3 -flto -fwhole-program -march=native -o bin/BFS src/BFS.cpp -lboost_serialization
g++: error: unrecognized command-line option โ€˜-cxx=g++โ€™
make: *** [Makefile:54: bin/BFS] Error 1

The differences between Degree and InDegree

I read the definition about Degree in PageRank.cpp and InDegree in TopologicalSort.cpp.
I guess they are both used to get in-degrees for all vertexes, but I do not understand that , why it uses
this->order = GraphMat::IN_EDGES; in PageRank , and it uses this->order = GraphMat::OUT_EDGES; in TopologicalSort. What is the differences?

template<class V, class E=int>
class Degree : public GraphMat::GraphProgram<int, int, V, E> {
  public:

  Degree() {
    this->order = GraphMat::IN_EDGES;
    this->process_message_requires_vertexprop = false;
  }

  bool send_message(const V& vertexprop, int& message) const {
    message = 1;
    return true;
  }

  void process_message(const int& message, const E edge_value, const V& vertexprop, int& result) const {
    result = message;
  }

  void reduce_function(int& a, const int& b) const {
    a += b;
  }

  void apply(const int& message_out, V& vertexprop) {
    vertexprop.degree = message_out; 
  }

};
class InDegree : public GraphMat::GraphProgram<int, int, V, E> {
  public:

  InDegree() {
    this->activity = GraphMat::ALL_VERTICES;
    this->order = GraphMat::OUT_EDGES;
    this->process_message_requires_vertexprop = false;
  }

  bool send_message(const V& vertex, int& message) const {
    message = 1;
    return true;
  }

  void process_message(const int& message, const E edge_value, const V& vertex, int& result) const {
    result = message;
  }

  void reduce_function(int& a, const int& b) const {
    a += b;
  }

  void apply(const int& message_out, V& vertex) {
    vertex.in_degree = message_out; 
  }

};

Please give me some suggestion or solution. Any info will help, thank you !!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.