Giter Site home page Giter Site logo

parallel-graph-traversal's Introduction

To generate an input graph :
	1. Compile inpGraphGenerate.cpp with 'g++ inpGraphGenerate.cpp -o generateInp'
	2. This will print the graph in a particular format on stdout
	3. It will ask for two inputs. One is the total number of nodes in the graph and the other is the maximum out-degree of the graph.

The form of the graphical input is: 
Number of nodes(n), followd by 2n lines
In the first line, the number of neighbours of i and 
in the second, the node number of these neighbours.

To run the bfs_sequential file :
	1. Compile bfs_sequential.c with 'gcc bfs_sequential.c -o sequentialBFS'
	2. Give it input generated from the input graph generator. 

To run the bfs_parallel file :
	1. Compile bfs_sequential.c with 'gcc -fopenmp bfs_parallel.c -o parallelBFS'
	2. Give it input generated from the input graph generator. 
	3. To change the number of threads, one can go to the file and change the NUM_THREADS macro accordingly.

To run the dfs_sequential file :
	1. Compile dfs_sequential.c with 'gcc dfs_sequential.c -o sequentialDFS'
	2. Give it input generated from the input graph generator. 

To run the runner.sh, simple run './runner.sh'
	1. We will have to change the variables l and filename with every run. filename has the input graph and changing l will ensure that your output goes to different files.

parallel-graph-traversal's People

Watchers

James Cloos avatar Suyash Bhatkar avatar

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.