Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uva
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
uva
Commits
5c46796a
Commit
5c46796a
authored
13 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
MosSim ass4 taddeus: Removed useless parameter.
parent
7e10f43e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modsim/ass4_taddeus/vibstring/benchmark.sh
+6
-5
6 additions, 5 deletions
modsim/ass4_taddeus/vibstring/benchmark.sh
modsim/ass4_taddeus/vibstring/plot_benchmark.py
+4
-8
4 additions, 8 deletions
modsim/ass4_taddeus/vibstring/plot_benchmark.py
with
10 additions
and
13 deletions
modsim/ass4_taddeus/vibstring/benchmark.sh
+
6
−
5
View file @
5c46796a
#!/bin/bash
if
[
$#
-lt
3
]
;
then
echo
"Usage: bash
$0
RESULTS_FILE
MAX STEP STRING_STEPS"
echo
"Usage: bash
$0
MAX STEP STRING_STEPS"
exit
1
fi
REPEAT
=
3
dx
=
`
echo
"1/
$4
"
| bc
-l
`
FILE
=
bench.txt
dx
=
`
echo
"1/
$3
"
| bc
-l
`
args
=
"sinus 1000 1
$dx
1 2"
# Execute sequential program
#/usr/bin/time -f "%e" --quiet ./seq $args
# Clear results file
echo
""
>
$
1
echo
""
>
$
FILE
# Execute parallel program for different numbers of nodes
for
((
i
=
2
;
i <
=
$
2
;
i +
=
$
3
))
;
do
for
((
i
=
2
;
i <
=
$
1
;
i +
=
$
2
))
;
do
for
j
in
seq
$REPEAT
;
do
/usr/bin/time
-f
"
$i
%e"
--quiet
-ao
$
1
./par.sh
$i
$args
/usr/bin/time
-f
"
$i
%e"
--quiet
-ao
$
FILE
./par.sh
$i
$args
done
done
This diff is collapsed.
Click to expand it.
modsim/ass4_taddeus/vibstring/plot_benchmark.py
+
4
−
8
View file @
5c46796a
#!/usr/bin/env python
from
sys
import
stdin
,
argv
,
exit
from
sys
import
argv
from
pylab
import
plot
,
show
,
savefig
if
len
(
argv
)
<
2
:
print
'
Usage: python %s BENCHMARK_FILE
'
%
argv
[
0
]
exit
(
1
)
# Collect data
x
=
[]
y
=
[]
results
=
open
(
argv
[
1
]
)
results
=
open
(
'
bench.txt
'
)
for
line
in
results
.
readlines
()[
1
:]:
n
,
t
=
line
[:
-
1
].
split
(
'
'
)
...
...
@@ -24,6 +20,6 @@ for line in results.readlines()[1:]:
# Plot data
plot
(
x
,
y
,
'
o-
'
)
if
len
(
argv
)
==
3
:
savefig
(
argv
[
2
])
if
len
(
argv
)
>
1
:
savefig
(
argv
[
1
])
show
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment