Coder Social home page Coder Social logo

4995-pfp's Introduction

Parallel Functional Programming: Maximal Clique

Build

Dependencies: Haskell toolchain including Cabal for building and packaging the project.
We use ThreadScope to profile parallel Haskell programs. Firstly, use cabal get threadscope to install it.

MacOS

GTK+ is required.

brew install gtk+

Then build using cabal:

cabal --project-file=cabal.project.osx v2-build # to only build the project
cabal --project-file=cabal.project.osx v2-install # to build and install the binary

Linux

GTK+2 is required to be installed. On Ubuntu-like systems:

sudo apt install libgtk2.0-dev

Then you can build threadscope using cabal:

cabal v2-build   # to only build the project, or
cabal v2-install # to build and install the binary

Run

To find all maximal cliques for a graph

# +RTS = Run Time System, -N2 = use 2 cores, flags are for the eventlog
# running the algorithm
# generate a graph
# test the output to determine if it's valid given input
cabal exec -- MaximalClique-exe compute ${input_file} ${output_file} ${mode} +RTS -N2 -lfs
cabal exec -- MaximalClique-exe gen <mode> <args>..<args> <outfile>
cabal exec -- MaximalClique-exe test <inputfile> <outputfile>

modes for computational functionality

compute ${input_file} ${output_file} seq
compute ${input_file} ${output_file} par_naive
compute ${input_file} ${output_file} par_basic
compute ${input_file} ${output_file} par_chunked chunkSize
compute ${input_file} ${output_file} par_depthLimited maxDepth

modes for generation functionality

gen random n ${output_file}
gen kclique n k ${output_file}

Then a log file with extension .eventlog should be generated, which can be accessed using

threadscope MaximalClique-exe.eventlog

4995-pfp's People

Contributors

reinakousaka avatar william-wang2 avatar

Stargazers

 avatar  avatar

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.