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.
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
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
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