git.iko.soy/distributed-process
on master help sign in
Minor changes
commitc69040b21d419bc7041472466a3b792a2fa4f4b1 authorEdsko de Vries <edsko@edsko.net> dateWed 3 Oct 2012, 13:48 (14 years ago) parent523bc57
2 files changed+6−6
distributed-process-demos/distributed-process-demos.cabal+1−1 distributed-process-demos/src/MapReduce/SimpleLocalnet.hs+5−5
distributed-process-demos/distributed-process-demos.cabal+1−1
@@ -126,7 +126,7 @@ executable distributed-process-simplelocalnet-mapreduce
126126 array >= 0.4 && < 0.5,
127127 random >= 1.0 && < 1.1
128128 extensions: BangPatterns, CPP, TemplateHaskell, ScopedTypeVariables
129− ghc-options: -Wall
129+ ghc-options: -Wall -rtsopts -with-rtsopts=-K64M
130130 if flag(use-simplelocalnet)
131131 build-depends: distributed-process-simplelocalnet
132132 cpp-options: -DUSE_SIMPLELOCALNET
distributed-process-demos/src/MapReduce/SimpleLocalnet.hs+5−5
@@ -33,7 +33,7 @@ main = do
3333 print $ CountWords.localCountWords input
3434
3535 -- Distributed word count
36− "master" : "count" : host : port : files -> do
36+ "master" : host : port : "count" : files -> do
3737 input <- constructInput files
3838 backend <- initializeBackend host port rtable
3939 startMaster backend $ \slaves -> do
@@ -42,16 +42,16 @@ main = do
4242
4343 -- Local k-means
4444 "local" : "kmeans" : [] -> do
45− points <- replicateM 1000 randomPoint
45+ points <- replicateM 50000 randomPoint
4646 withFile "plot.data" WriteMode $ KMeans.createGnuPlot $
4747 KMeans.localKMeans (arrayFromList points) (take 5 points) 5
4848
4949 -- Distributed k-means
50− "master" : "kmeans" : host : port : [] -> do
51− points <- replicateM 1000 randomPoint
50+ "master" : host : port : "kmeans" : [] -> do
51+ points <- replicateM 50000 randomPoint
5252 backend <- initializeBackend host port rtable
5353 startMaster backend $ \slaves -> do
54− result <- KMeans.distrKMeans (arrayFromList points) (take 5 points) slaves 5
54+ result <- KMeans.distrKMeans (arrayFromList points) (take 5 points) slaves 5
5555 liftIO $ withFile "plot.data" WriteMode $ KMeans.createGnuPlot result
5656
5757 -- Generic slave for distributed examples