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
067f0628
Commit
067f0628
authored
Jan 14, 2015
by
Aggelos Giantsios
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make dist script skip previous executions
parent
bc89514f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
14 deletions
+27
-14
dist.py
dist.py
+27
-14
No files found.
dist.py
View file @
067f0628
...
...
@@ -2,9 +2,18 @@
# -*- coding: utf-8 -*-
from
__future__
import
print_function
import
sys
,
subprocess
,
time
import
sys
,
subprocess
,
time
,
os
.
path
f
=
open
(
'dist.log'
,
'a+'
)
fname
=
'dist.log'
fexists
=
os
.
path
.
isfile
(
fname
)
if
fexists
:
f
=
open
(
fname
,
'r'
)
ls
=
f
.
read
()
.
splitlines
()
f
.
close
()
else
:
ls
=
[]
f
=
open
(
fname
,
'a+'
)
def
print_all
(
s
):
print
(
s
,
file
=
f
)
f
.
flush
()
...
...
@@ -20,27 +29,31 @@ slaves = []
for
port
in
range
(
5051
,
5051
+
64
):
slaves
.
append
({
"host"
:
"127.0.0.1"
,
"port"
:
port
})
print_all
(
"Parallel Orbit"
)
print_all
(
"----------------------------------------------------------------------"
)
print_all
(
"Versions:
%
s"
%
versions
)
print_all
(
"Parallel Image Computation:
%
s"
%
iwps
)
print_all
(
"Repetitions per Configuration:
%
s"
%
reps
)
print_all
(
"Using Cores:
%
s"
%
cores
)
print_all
(
"Workers Per Core:
%
s"
%
workersPerCore
)
print_all
(
"Master @
%
s"
%
master
)
print_all
(
"Slaves @
%
s"
%
slaves
)
print_all
(
"======================================================================"
)
if
len
(
ls
)
==
0
:
print_all
(
"Parallel Orbit"
)
print_all
(
"----------------------------------------------------------------------"
)
print_all
(
"Versions:
%
s"
%
versions
)
print_all
(
"Parallel Image Computation:
%
s"
%
iwps
)
print_all
(
"Repetitions per Configuration:
%
s"
%
reps
)
print_all
(
"Using Cores:
%
s"
%
cores
)
print_all
(
"Workers Per Core:
%
s"
%
workersPerCore
)
print_all
(
"Master @
%
s"
%
master
)
print_all
(
"Slaves @
%
s"
%
slaves
)
print_all
(
"======================================================================"
)
for
iwp
in
iwps
:
for
vsn
in
versions
:
for
n
in
range
(
2
,
42
+
1
,
2
):
for
n
in
range
(
2
,
60
+
1
,
2
):
for
core
in
cores
:
for
rep
in
range
(
reps
):
time
.
sleep
(
2
)
workers
=
workersPerCore
*
core
slvs
=
slaves
[
0
:
n
]
l
=
"Slaves:
%
s, Version:
%
s, IWP:
%
s, Cores:
%
s, Workers:
%
s, Execution:
%
s"
%
(
n
,
vsn
,
iwp
,
core
,
workers
,
rep
)
if
l
in
ls
:
continue
print_all
(
"Slaves:
%
s, Version:
%
s, IWP:
%
s, Cores:
%
s, Workers:
%
s, Execution:
%
s"
%
(
n
,
vsn
,
iwp
,
core
,
workers
,
rep
))
time
.
sleep
(
2
)
for
slv
in
slvs
:
cmd
=
"./orbit +RTS -N
%
s -RTS dist slave
%
s
%
s > /dev/null"
%
(
core
,
slv
[
"host"
],
slv
[
"port"
])
prcs
=
subprocess
.
Popen
(
cmd
,
shell
=
True
)
...
...
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