packages feed

aivika-distributed 0.7.3 → 0.7.4

raw patch · 3 files changed

+19/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,4 +1,9 @@ +Version 0.7.4+-----++* A more graceful termination of the time server in case of self-destruction by time-out.+ Version 0.7.3 ----- 
Simulation/Aivika/Distributed/Optimistic/Internal/TimeServer.hs view
@@ -105,6 +105,8 @@                -- ^ whether the time server is in the initial mode                tsTerminating :: IORef Bool,                -- ^ whether the time server is in the terminating mode+               tsTerminated :: IORef Bool,+               -- ^ whether the server is terminated                tsProcesses :: IORef (M.Map DP.ProcessId LogicalProcessInfo),                -- ^ the information about logical processes                tsProcessesInFind :: IORef (S.Set DP.ProcessId),@@ -156,6 +158,7 @@ newTimeServer n ps =   do f  <- newIORef True      ft <- newIORef False+     fe <- newIORef False      m  <- newIORef M.empty      s  <- newIORef S.empty      t0 <- newIORef Nothing@@ -165,6 +168,7 @@                          tsInitQuorum = n,                          tsInInit = f,                          tsTerminating = ft,+                         tsTerminated = fe,                          tsProcesses = m,                          tsProcessesInFind = s,                          tsGlobalTime = t0,@@ -530,6 +534,11 @@                 then do tryComputeTimeServerGlobalTime server                         loop utc                 else loop utc0+         loop' utc0 =+           C.finally+           (loop utc0)+           (liftIO $+            atomicWriteIORef (tsTerminated server) True)      case tsSimulationMonitoringAction env of        Nothing  -> return ()        Just act ->@@ -537,7 +546,7 @@             monitorId <-               DP.spawnLocal $               let loop =-                    do f <- liftIO $ readIORef (tsTerminating server)+                    do f <- liftIO $ readIORef (tsTerminated server)                        unless f $                          do x <- DP.expectTimeout (tsSimulationMonitoringTimeout ps)                             case x of@@ -547,7 +556,7 @@               in C.catch loop (handleTimeServerException server)             DP.spawnLocal $               let loop =-                    do f <- liftIO $ readIORef (tsTerminating server)+                    do f <- liftIO $ readIORef (tsTerminated server)                        unless f $                          do liftIO $                               threadDelay (tsSimulationMonitoringInterval ps)@@ -555,7 +564,7 @@                             loop               in C.catch loop (handleTimeServerException server)             return ()-     C.catch (liftIO getCurrentTime >>= loop) (handleTimeServerException server) +     C.catch (liftIO getCurrentTime >>= loop') (handleTimeServerException server)   -- | Handle the process monitor notification. handleProcessMonitorNotification :: DP.ProcessMonitorNotification -> TimeServer -> DP.Process ()
aivika-distributed.cabal view
@@ -1,5 +1,5 @@ name:            aivika-distributed-version:         0.7.3+version:         0.7.4 synopsis:        Parallel distributed discrete event simulation module for the Aivika library description:     This package extends the aivika-transformers [1] package and allows running parallel distributed simulations.@@ -25,7 +25,7 @@     or a set of reports consisting of HTML pages with charts, histograms, links to CSV tables, summary statistics etc.     Please consult the AivikaSoft [3] website for more details.     .-    Regarding the speed of simulation, the rough estimations are as follows. The distributed simulation module is slower up to+    Regarding the speed of simulation, the rough estimation is as follows. The distributed simulation module is slower up to     6-9 times in comparison with the sequential aivika [2] simulation library using the equivalent sequential models.      Note that you can run up to 7 parallel logical processes on a single 8-core processor computer and run the Time Server      process too. On a 36-core processor, you can launch up to 35 logical processes simultaneously.