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
b8deabc2
Commit
b8deabc2
authored
Jan 14, 2015
by
Aggelos Giantsios
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write output also to file
parent
510f8e9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
21 deletions
+35
-21
par.py
par.py
+19
-12
seq.py
seq.py
+16
-9
No files found.
par.py
View file @
b8deabc2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
subprocess
,
time
from
__future__
import
print_function
import
sys
,
subprocess
,
time
f
=
open
(
'par.log'
,
'a+'
)
def
print_all
(
s
):
print
(
s
,
file
=
f
)
f
.
flush
()
print
(
s
,
file
=
sys
.
stdout
)
reps
=
1
versions
=
[
"short"
,
"intermediate"
,
"long"
]
...
...
@@ -10,27 +17,27 @@ cores = [1,2,4]
workersPerCore
=
1
node
=
{
"host"
:
"127.0.0.1"
,
"port"
:
5050
}
print
"Parallel Orbit"
print
"----------------------------------------------------------------------"
print
"Versions:
%
s"
%
versions
print
"Parallel Image Computation:
%
s"
%
iwps
print
"Repetitions per Configuration:
%
s"
%
reps
print
"Using Cores:
%
s"
%
cores
print
"Workers Per Core:
%
s"
%
workersPerCore
print
"Node @
%
s"
%
node
print
"======================================================================"
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
(
"Node @
%
s"
%
node
)
print
_all
(
"======================================================================"
)
for
iwp
in
iwps
:
for
vsn
in
versions
:
for
core
in
cores
:
for
rep
in
range
(
reps
):
workers
=
workersPerCore
*
core
print
"Version:
%
s, IWP:
%
s, Cores:
%
s, Workers:
%
s, Execution:
%
s"
%
(
vsn
,
iwp
,
core
,
workers
,
rep
)
print
_all
(
"Version:
%
s, IWP:
%
s, Cores:
%
s, Workers:
%
s, Execution:
%
s"
%
(
vsn
,
iwp
,
core
,
workers
,
rep
)
)
t1
=
time
.
time
()
cmd
=
"./orbit +RTS -N
%
s -RTS par
%
s
%
s
%
s
%
s
%
s > /dev/null"
%
(
core
,
iwp
,
vsn
,
workers
,
node
[
"host"
],
node
[
"port"
])
p
=
subprocess
.
Popen
(
cmd
,
shell
=
True
)
p
.
wait
()
t2
=
time
.
time
()
print
"
%
s sec(s)"
%
(
t2
-
t1
)
print
_all
(
"
%
s sec(s)"
%
(
t2
-
t1
)
)
seq.py
View file @
b8deabc2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
subprocess
,
time
from
__future__
import
print_function
import
sys
,
subprocess
,
time
f
=
open
(
'seq.log'
,
'a+'
)
def
print_all
(
s
):
print
(
s
,
file
=
f
)
f
.
flush
()
print
(
s
,
file
=
sys
.
stdout
)
reps
=
1
versions
=
[
"short"
,
"intermediate"
,
"long"
]
node
=
{
"host"
:
"127.0.0.1"
,
"port"
:
5050
}
print
"Sequential Orbit"
print
"----------------------------------------------------------------------"
print
"Versions:
%
s"
%
versions
print
"Repetitions per Configuration:
%
s"
%
reps
print
"Node @
%
s"
%
node
print
"======================================================================"
print
_all
(
"Sequential Orbit"
)
print
_all
(
"----------------------------------------------------------------------"
)
print
_all
(
"Versions:
%
s"
%
versions
)
print
_all
(
"Repetitions per Configuration:
%
s"
%
reps
)
print
_all
(
"Node @
%
s"
%
node
)
print
_all
(
"======================================================================"
)
for
vsn
in
versions
:
for
rep
in
range
(
reps
):
print
"Version:
%
s, Execution:
%
s"
%
(
vsn
,
rep
)
print
_all
(
"Version:
%
s, Execution:
%
s"
%
(
vsn
,
rep
)
)
t1
=
time
.
time
()
cmd
=
"./orbit seq
%
s
%
s
%
s > /dev/null"
%
(
vsn
,
node
[
"host"
],
node
[
"port"
])
p
=
subprocess
.
Popen
(
cmd
,
shell
=
True
)
p
.
wait
()
t2
=
time
.
time
()
print
"
%
s sec(s)"
%
(
t2
-
t1
)
print
_all
(
"
%
s sec(s)"
%
(
t2
-
t1
)
)
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