Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-orbit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Katerina Roukounaki
cloud-orbit
Commits
aabc1ad0
Commit
aabc1ad0
authored
Nov 20, 2014
by
Yiannis Tsiouris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set-up all nodes in main
parent
d0e50428
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
Bench.hs
Bench.hs
+21
-7
No files found.
Bench.hs
View file @
aabc1ad0
...
@@ -9,9 +9,8 @@ module Bench( -- sequential benchmarks
...
@@ -9,9 +9,8 @@ module Bench( -- sequential benchmarks
import
Control.Distributed.Process
import
Control.Distributed.Process
import
Control.Distributed.Process.Node
import
Control.Distributed.Process.Node
import
qualified
Control.Distributed.Process.Backend.SimpleLocalnet
as
SLN
import
Prelude
hiding
(
seq
)
import
Prelude
hiding
(
seq
)
import
System.Environment
(
getArgs
)
import
Network.Transport.TCP
import
MasterWorker
import
MasterWorker
import
Utils
import
Utils
...
@@ -62,11 +61,26 @@ sz (mainStats : _) =
...
@@ -62,11 +61,26 @@ sz (mainStats : _) =
Nothing
->
"false"
Nothing
->
"false"
Just
s
->
"{size,"
++
s
++
"}"
Just
s
->
"{size,"
++
s
++
"}"
rtable
::
RemoteTable
rtable
=
MasterWorker
.
__remoteTable
initRemoteTable
main
::
IO
()
main
::
IO
()
main
=
do
main
=
do
Right
t1
<-
createTransport
"127.0.0.1"
"5050"
defaultTCPParameters
node1
<-
newLocalNode
t1
rtable
Right
t2
<-
createTransport
"127.0.0.1"
"5051"
defaultTCPParameters
node2
<-
newLocalNode
t2
rtable
Right
t3
<-
createTransport
"127.0.0.1"
"5052"
defaultTCPParameters
node3
<-
newLocalNode
t3
rtable
runProcess
node1
$
do
res
<-
dist
gg13
11
2
[
localNodeId
node1
,
localNodeId
node2
,
localNodeId
node3
]
liftIO
$
print
res
where
rtable
::
RemoteTable
rtable
=
MasterWorker
.
__remoteTable
initRemoteTable
{-
import qualified Control.Distributed.Process.Backend.SimpleLocalnet as SLN
import System.Environment (getArgs)
args <- getArgs
args <- getArgs
case args of
case args of
...
@@ -81,7 +95,7 @@ main = do
...
@@ -81,7 +95,7 @@ main = do
b <- SLN.initializeBackend host port rtable
b <- SLN.initializeBackend host port rtable
print $ "Starting slave @ " ++ host ++ ":" ++ port
print $ "Starting slave @ " ++ host ++ ":" ++ port
SLN.startSlave b
SLN.startSlave b
-}
-- 1 second wait. Otherwise the main thread can terminate before
-- 1 second wait. Otherwise the main thread can terminate before
-- our messages reach the logging process or get flushed to stdio
-- our messages reach the logging process or get flushed to stdio
--threadDelay (1 * 1000000)
--threadDelay (1 * 1000000)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment