Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
uva
Commits
0558a9ac
Commit
0558a9ac
authored
Jul 10, 2011
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ModSim ass4 taddeus: Added benchmark plot.
parent
5f73cde5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
7 deletions
+25
-7
modsim/ass4_taddeus/vibstring/benchmark.sh
modsim/ass4_taddeus/vibstring/benchmark.sh
+4
-1
modsim/ass4_taddeus/vibstring/par.sh
modsim/ass4_taddeus/vibstring/par.sh
+1
-1
modsim/ass4_taddeus/vibstring/plot_benchmark.py
modsim/ass4_taddeus/vibstring/plot_benchmark.py
+14
-4
modsim/ass4_taddeus/vibstring/report/benchmark.pdf
modsim/ass4_taddeus/vibstring/report/benchmark.pdf
+0
-0
modsim/ass4_taddeus/vibstring/report/report.tex
modsim/ass4_taddeus/vibstring/report/report.tex
+6
-1
No files found.
modsim/ass4_taddeus/vibstring/benchmark.sh
View file @
0558a9ac
...
...
@@ -10,7 +10,10 @@ dx=`echo "1/$1" | bc -l`
args
=
"sinus 10000 1
$dx
1 2"
# Execute sequential program
/usr/bin/time
-f
"%e"
-o
$FILE
./seq
$args
/usr/bin/time
-f
"1 %e"
-o
$FILE
./seq
$args
for
i
in
`
seq
2
$REPEAT
`
;
do
/usr/bin/time
-f
"1 %e"
-ao
$FILE
./seq
$args
done
# Execute parallel program for different numbers of nodes
for
i
in
`
seq
2 13
`
;
do
...
...
modsim/ass4_taddeus/vibstring/par.sh
View file @
0558a9ac
modsim/ass4_taddeus/vibstring/plot_benchmark.py
View file @
0558a9ac
#!/usr/bin/env python
from
sys
import
argv
from
pylab
import
plot
,
xlabel
,
ylabel
,
show
,
savefig
from
scipy
import
polyfit
,
polyval
# Collect data
x
=
[]
y
=
[]
results
=
open
(
'bench.txt'
)
for
line
in
results
.
readlines
()[
1
:]:
for
line
in
results
.
readlines
():
n
,
t
=
line
[:
-
1
].
split
(
' '
)
# Use the minimum of all measurements
...
...
@@ -19,8 +19,18 @@ for line in results.readlines()[1:]:
x
.
append
(
int
(
n
))
y
.
append
(
float
(
t
))
# Plot data
plot
(
x
,
y
,
'o-'
)
seq
=
[
x
[
0
],
y
[
0
]]
x
=
x
[
1
:]
y
=
y
[
1
:]
# Least squares data fit
c
=
tuple
(
polyfit
(,
y
,
2
).
tolist
())
fit
=
polyval
(
c
,
x
)
# Plot and optionally save data
plot
(
x
,
y
,
'x'
)
plot
(
seq
[
0
],
seq
[
1
],
'x'
)
plot
(
x
,
fit
,
'-'
)
xlabel
(
'Aantal processen'
)
ylabel
(
'Tijd (s)'
)
if
len
(
argv
)
>
1
:
...
...
modsim/ass4_taddeus/vibstring/report/benchmark.pdf
0 → 100644
View file @
0558a9ac
File added
modsim/ass4_taddeus/vibstring/report/report.tex
View file @
0558a9ac
...
...
@@ -366,10 +366,15 @@ geconcludeerd dat ook het parallelle programma correct is geïmplementeerd..
\begin
{
figure
}
[
H
]
\includegraphics
[
width
=
10
cm
]
{
benchmark.pdf
}
\caption
{
Runtime met parameters
\texttt
{
sinus
10000
1
.
00002
1
2
}
.
}
\end
{
figure
}
\pagebreak
\appendix
\section
{
Uitvoer test
t
s
}
\section
{
Uitvoer tests
}
\subsection
{
Test
1
}
\label
{
app:test
-
1
}
...
...
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