-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | MPI bindings for Haskell
--
-- MPI (the Message Passinag Interface) is a widely used standard
-- for distributed-memory programming on HPC (High Performance Computing)
-- systems. MPI allows exchanging data (_messages_) between programs
-- running in parallel. There are several high-quality open source MPI
-- implementations (e.g. MPICH, MVAPICH, OpenMPI) as well as a variety of
-- closed-source implementations. These libraries can typically make use
-- of high-bandwidth low-latency communication hardware such as
-- InfiniBand.
--
-- This library mpi-hs provides Haskell bindings for MPI. It is
-- based on ideas taken from
-- [haskell-mpi](https:/github.combjpop/haskell-mpi),
-- [Boost.MPI](https:/www.boost.orgdoclibs1_64_0dochtml/mpi.html)
-- for C++, and MPI for Python.
--
-- mpi-hs provides two API levels: A low-level API gives rather
-- direct access to the actual MPI API, apart from certain "reasonable"
-- mappings from C to Haskell (e.g. output arguments that are in C stored
-- via a pointer are in Haskell regular return values). A high-level API
-- simplifies exchanging arbitrary values that can be serialized.
--
-- Note that the automated builds on
-- [Hackage](http://hackage.haskell.org) will currently always fail since
-- no system MPI library is present there. However, builds on
-- [Stackage](https://www.stackage.org) should succeed -- if not, there
-- is an error in this package.
@package mpi-hs-binary
@version 0.1.0.0
module Control.Distributed.MPI.Binary
-- | Exception type indicating an error in a call to MPI
newtype MPIException
MPIException :: String -> MPIException
newtype Comm
Comm :: CComm -> Comm
commSelf :: Comm
commWorld :: Comm
newtype Count
Count :: CInt -> Count
fromCount :: Integral i => Count -> i
toCount :: Integral i => i -> Count
newtype Rank
Rank :: CInt -> Rank
anySource :: Rank
commRank :: Comm -> IO Rank
commSize :: Comm -> IO Rank
fromRank :: Enum e => Rank -> e
rootRank :: Rank
toRank :: Enum e => e -> Rank
-- | The status of a finished communication, indicating rank and tag of the
-- other communication end point.
data Status
Status :: !Rank -> !Tag -> Status
[msgRank] :: Status -> !Rank
[msgTag] :: Status -> !Tag
newtype Tag
Tag :: CInt -> Tag
anyTag :: Tag
fromTag :: Enum e => Tag -> e
toTag :: Enum e => e -> Tag
unitTag :: Tag
-- | A communication request, usually created by a non-blocking
-- communication function.
data Request a
abort :: Comm -> Int -> IO ()
-- | Convenience function to initialize and finalize MPI. This initializes
-- MPI with ThreadMultiple thread support.
mainMPI :: IO () -> IO ()
-- | Receive an object.
recv :: CanSerialize a => Rank -> Tag -> Comm -> IO (Status, a)
-- | Receive an object without returning a status.
recv_ :: CanSerialize a => Rank -> Tag -> Comm -> IO a
-- | Send an object.
send :: CanSerialize a => a -> Rank -> Tag -> Comm -> IO ()
-- | Send and receive objects simultaneously.
sendrecv :: (CanSerialize a, CanSerialize b) => a -> Rank -> Tag -> Rank -> Tag -> Comm -> IO (Status, b)
-- | Send and receive objects simultaneously, without returning a status
-- for the received message.
sendrecv_ :: (CanSerialize a, CanSerialize b) => a -> Rank -> Tag -> Rank -> Tag -> Comm -> IO b
-- | Begin to receive an object. Call test or wait to finish
-- the communication, and to obtain the received object.
irecv :: CanSerialize a => Rank -> Tag -> Comm -> IO (Request a)
-- | Begin to send an object. Call test or wait to finish the
-- communication.
isend :: CanSerialize a => a -> Rank -> Tag -> Comm -> IO (Request ())
-- | Check whether a communication has finished, and return the
-- communication result if so.
test :: Request a -> IO (Maybe (Status, a))
-- | Check whether a communication has finished, and return the
-- communication result if so, without returning a message status.
test_ :: Request a -> IO (Maybe a)
-- | Wait for a communication to finish and return the communication
-- result.
wait :: Request a -> IO (Status, a)
-- | Wait for a communication to finish and return the communication
-- result, without returning a message status.
wait_ :: Request a -> IO a
barrier :: Comm -> IO ()
-- | Broadcast a message from one process (the "root") to all other
-- processes in the communicator. The send object must be present
-- (Just) on the root, and is ignored on all non-root processes.
bcast :: CanSerialize a => Maybe a -> Rank -> Comm -> IO a
-- | Broadcast a message from one process (the "root") to all other
-- processes in the communicator. Call this function on all non-root
-- processes. Call bcastSend instead on the root process.
bcastRecv :: CanSerialize a => Rank -> Comm -> IO a
-- | Broadcast a message from one process (the "root") to all other
-- processes in the communicator. Call this function on the root process.
-- Call bcastRecv instead on all non-root processes.
bcastSend :: CanSerialize a => a -> Rank -> Comm -> IO a
-- | Broadcast a message from one process (the "root") to all other
-- processes in the communicator. Call this function on the root process.
-- Call bcastRecv instead on all non-root processes.
bcastSend_ :: CanSerialize a => a -> Rank -> Comm -> IO ()
-- | Begin a barrier. Call test or wait to finish the
-- communication.
ibarrier :: Comm -> IO (Request ())
ibcast :: CanSerialize a => Maybe a -> Rank -> Comm -> IO (Request a)
ibcastRecv :: CanSerialize a => Rank -> Comm -> IO (Request a)
ibcastSend :: CanSerialize a => a -> Rank -> Comm -> IO (Request a)
ibcastSend_ :: CanSerialize a => a -> Rank -> Comm -> IO (Request ())
instance GHC.Show.Show Control.Distributed.MPI.Binary.Status
instance GHC.Read.Read Control.Distributed.MPI.Binary.Status
instance GHC.Classes.Ord Control.Distributed.MPI.Binary.Status
instance GHC.Classes.Eq Control.Distributed.MPI.Binary.Status
instance GHC.Show.Show Control.Distributed.MPI.Binary.MPIException
instance GHC.Read.Read Control.Distributed.MPI.Binary.MPIException
instance GHC.Classes.Ord Control.Distributed.MPI.Binary.MPIException
instance GHC.Classes.Eq Control.Distributed.MPI.Binary.MPIException
instance GHC.Exception.Type.Exception Control.Distributed.MPI.Binary.MPIException
instance Data.Binary.Class.Binary Foreign.C.Types.CInt
instance Data.Binary.Class.Binary Control.Distributed.MPI.Rank