Skip to content
bjpop edited this page Sep 22, 2010 · 16 revisions

Design issue notes for Haskell MPI bindings.

Design goals

  1. Support for dynamic sized types (eg recursively defined algebraic data types, such as lists, whose size is only known at runtime).
    • Emphasises convenience and safety over absolute performance.
    • May support a subset of all of the MPI communication functions.
  2. Support for fixed sized data types (eg primitive types, and fixed size compounds, such as tuples with fixed size elements).
    • Emphasises performance over convenience and safety. For example, by avoiding data copying where possible.
    • Emphasises update-in-place where possible via mutable collections.
    • Tries to support all of the MPI communication functions, especially the collective ones.
  3. Encourage idiomatic Haskell style.
    • May diverge from C API where necessary (break collectives into send and recv parts).
    • May have different arguments to functions, and in different order to maximise currying opportunity.
    • Try to use Haskell type system features where possible, such as distinguishing Rank and Tag from Int.
    • Try to be as general as possible with message types by overloading.

Technical solutions

  1. Use Serializable class for message type representing dynamic sized types.
  2. Use Storable class for message type representing fixed sized types.

Clone this wiki locally