• Stars
    star
    106
  • Rank 318,901 (Top 7 %)
  • Language
    Haskell
  • Created over 12 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of different packages for CAS based data structures.

Build Status and unit tests

  • Jenkins: Build Status -- Basic primops only, i.e. atomic-primops package:
  • Jenkins: Build Status -- all Queue and Deque data structures in this package.
  • Travis: Build Status -- combined build&test for all packages in the repo.

Contents of this Repository

This is a multi-package repository. The following directories each correspond to exactly one cabal package:

  • [abstract-deque]: AbstractDeque - abstract interface for single and double ended queues, plus reference implementation in pure Haskell
  • [lockefree-queue]: classic Michael & Scott algorithm for single ended queues
  • [chaselev-deque]: work-stealing "1.5" ended deques.
  • [mega-deque]: a package that picks the best implementation for the interface constraints, which are expressed at the type level.
  • [atomic-primops]: safe CAS/FAA (compare-and-swap/fetch-and-add) on various kinds of mutable locations
  • [atomic-primops-foreign]: Add on package that provides an FFI based implementation of counters.

Please see the .cabal files for more detailed descriptions of each package.

How to Test and Install

First, to use compare-and-swap based data structures, you should be using GHC 7.4.1 or later. Some of these libaries will be forced to "fake it" on earlier versions of GHC.

You can install all of the packages in your user's .cabal directory with the following command:

./install_all.sh

You may also want to build the tests at the same time:

./install_all.sh --enable-tests

There are currently [2012.02.29] some problems with cabal failing to automatically install dependencies for tests (as opposed to libraries). You may have to manually install some packages via cabal (e.g. test-framework-HUnit).

If you take a look at that install_all.sh script, you'll notice you can also configure which executables for cabal and ghc it uses, for example:

GHC=ghc-7.4.1 CABAL=cabal-0.10.2 ./install_all.sh --enable-tests

Next, you can run the tests like this:

./MichaelScott/dist/build/test-lockfree-queue/test-lockfree-queue

That test should complete successfully with a zero exit code.

Note that if you have trouble building test-suites through cabal, you can build them manually with GHC using a command like the following:

cd MichaelScott/
ghc-7.4.1 -O2 -threaded -rtsopts Test.hs -o Test.exe

Building with Profiling for debugging:

ghc-7.4.1 -prof -osuf=o_p -O2 -threaded -rtsopts Test.hs -o Test.exe

You might have to reinstall some of the dependencies with profiling enabled:

cabal install -p hostname xml regex-base regex-posix ansi-terminal ansi-wl-pprint test-framework test-framework-hunit --reinstall

Reinstalling with profiling can be REALLY annoying once the libraries are already installed. For example, if you forget a dependency above it will complete most of the compile, giving you the "profiling version not available" error only later on, resulting in a quadratic compilation process as you reinstall, add one more dep, reinstall, repeat.

KNOWN PROBLEMS

            TODO

  • It would be nice to add a binding to TBB concurrent queues or other foreign implementations (for storable types).

  • Test on windows. (It hasn't been tried.)

More Repositories

1

Haskell-CnC

Intel Concurrent Collections for Haskell. Library and parallel runtime(s). Now on github rather than darcs.
Haskell
16
star
2

WaveScript

The WaveScope/WaveScript project is migrating to github from MIT-hosted SVN.
Scheme
12
star
3

hgdata

This is now the main development repo for the handa-gdata package. It replaces an earlier repo at: https://code.google.com/p/hgdata/
Haskell
10
star
4

PhyBin

Binning (Newick) Phylogenetic Trees by Topology
Haskell
8
star
5

intel-aes

Haskell package for efficient AES encryption, including Intel AES NI support
C
8
star
6

thread-local-storage

A TLS library for GHC Haskell.
Haskell
5
star
7

pochoir-first-history-fix-attempt

A mirror of the Pochoir Stencil compiler SVN repository, including all branches.
C++
3
star
8

hydra-print

Output from parallel subprocesses is an ugly, many-headed beast. Piping though hydra-print provides a NCurses interface to a dynamic set output streams, displayed without interleaving.
Haskell
3
star
9

criterion-external

Simple demonstration of how to use Criterion to benchmark separate executables.
Haskell
3
star
10

concurrent-skiplist

An implementation of maps and sets based on a concurrent-skiplist implementation.
Haskell
3
star
11

PochoirMods

Modifications to Pochoir stencil compiler to support use an a Haskell EDSL. This uses the Pochoir 1.0 branch. It is forked from https://svn.csail.mit.edu/sct/trunk/Pochoir/ExecSpec_v1.0
C++
3
star
12

MandelMicrobench

Temporary repo to hold a tiny tiny "language shootout" benchmark.
C++
2
star
13

HSBenchThroughput

Simple Haskell utility for doing a binary search to find good benchmark inputs for measuring throughput
Haskell
2
star
14

Python-CnC

[Coming Soonish] A complete parallel programming environment based on the CnC model.
2
star
15

StreamIt

Mirror of svn.cssail.mit.edu StreamIt repository. You can find the original at https://svn.csail.mit.edu/streamit/trunk
C++
2
star
16

linear-cursors

Linear types applied to type-safe cursors into memory buffers containing dense serialized data.
Haskell
2
star
17

hgdata_trash

DONT USE THIS DIRECTLY. Mirror of https://code.google.com/p/hgdata/
Haskell
1
star
18

meta-par

temporary location until I finish pruning it
Haskell
1
star
19

cyclone

Mirror of Cyclone language repository on http://cyclone.thelanguage.org:8181/
C
1
star
20

temp-data-structure-benchmark

Benchmark from course project by Guilherme and Ahmed
C++
1
star
21

ncurses-haskell

Patches on top of bzr repository here: https://john-millikin.com/branches/haskell-ncurses/0.2/
Haskell
1
star
22

evernote_haskell

Experimenting with using the Evernote API from Haskell. Currently contains only junk.
Haskell
1
star
23

monad-par-results

Benchmark results and logs for the monad-par package.
Haskell
1
star
24

verified-haskell-tests

Playing around with different options for verifying bits of Haskell code
Agda
1
star
25

monad-par-results-full-logs

The full output of benchmarking scripts, including +RTS -s output. This is a much larger repo and you may want to avoid checking it out.
1
star
26

paragrep

Expansion of Ron Rivest's 1988 'help' program for paragraph search. Supports flexible text file partitioning methods.
JavaScript
1
star
27

unix-bytestring_MIRROR

Mirror of darcs repo for unix-bytestring at darcs get http://community.haskell.org/~wren/unix-bytestring
Haskell
1
star
28

lambdapar_interps

DEPRECATED: Interpreters and Data race detectors for the lambda-par calculus. THIS REPOSITORY HAS MOVED: https://github.com/iu-parfunc/lvars
Haskell
1
star