GithubHelp home page GithubHelp logo

alex-unofficial / scc Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 518 KB

A program to find sccs in a graph

License: GNU General Public License v3.0

Makefile 2.63% Julia 5.36% C 92.01%
openmp parallel opencilk pthreads

scc's Introduction

scc

find number of sccs in a graph

This program was built as an assignment for my Parallel & Distributed Comp. Systems class in University.

It finds the number of SCCs in a graph given using a MatrixMarket file, using one of three parallel implementations using POSIX threads, OpenMP or OpenCilk.

Compiling

In order to compile the program you need the following dependencies: gcc and OpenCilk's clang. You also need make in order to run the Makefile

note: if you built OpenCilk's clang from source, you need to install it to $PATH before using it, or change the Makefile to point to the location of the clang binary.

To clone the repository run:

git clone https://github.com/alex-unofficial/scc
cd scc

There are three seperate implementations of the program, all living in seperate git branches. master contains the pthreads implementation, and the opencilk and openmp branches contain their respective implementations.

To build any specific implementation navigate to the branch that contains it and run make all. for example to build the openmp implementation do

git checkout openmp
make all

Running make all as opposed to just make is important after each git checkout, since I have it set up such that it runs make clean before it builds the binaries.

This is done because the compilers and libraries used for the different implementations are incopatible with each other.

After building, the binary is in ./bin/scc.

Running the program

To run the program simply do

./bin/scc mtx_file.mtx

where mtx_file.mtx is a valid matrix file.

the program accepts some command line options to display the help text run

./bin/scc -h

you can specify that you want to run just the serial or just the parallel implementation with -s and -p respectively.

./bin/scc [-s|-p] mtx_file.mtx

additionally with the -n option you can specify the number of threads to use

./bin/scc [-n nthreads] mtx_file.mtx

the program by default will run both the serial and parallel implementations, measure the time it takes to run the algorithm, then check for errors

Licence

Copyright (C) 2022  Alexandros Athanasiadis

This file is part of scc

scc is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

scc is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>. 

scc's People

Watchers

 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.