Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CS3214 Project 2 - A Fork-Join Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
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
maxb24
CS3214 Project 2 - A Fork-Join Framework
Commits
a98f0870
Commit
a98f0870
authored
2 years ago
by
gback
Browse files
Options
Downloads
Patches
Plain Diff
include fib41 in benchmarks
parent
2aa9dd16
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
scripts/fjdriver.py
+13
-12
13 additions, 12 deletions
scripts/fjdriver.py
scripts/fjtests/standard.py
+2
-1
2 additions, 1 deletion
scripts/fjtests/standard.py
with
15 additions
and
13 deletions
scripts/fjdriver.py
+
13
−
12
View file @
a98f0870
...
...
@@ -44,7 +44,8 @@ benchmark_runs = 1
benchmark_times
=
{
'
nqueens 14
'
:
17.158
,
'
quicksort large
'
:
19.81442
,
'
mergesort large
'
:
22.33417
'
mergesort large
'
:
22.33417
,
'
fibonacci 41
'
:
5.000
,
}
tests
=
load_test_module
(
'
standard
'
)
...
...
@@ -61,7 +62,7 @@ Usage: %s [options]
-V Print Version and exit
-a Run benchmark anyway even if machine is not idle
-r Only run required tests.
-h Show help
-h Show help
-p <file> - Location of threadpool implementation, default ./threadpool.c
-l List available tests
-t Filter test by name, given as a comma separated list.
...
...
@@ -78,7 +79,7 @@ except getopt.GetoptError as err:
runfilter
=
lambda
test
:
True
ignore_if_not_idle
=
False
for
opt
,
arg
in
opts
:
for
opt
,
arg
in
opts
:
if
opt
==
"
-r
"
:
oldrunfilter
=
runfilter
runfilter
=
lambda
test
:
test
.
is_required
and
oldrunfilter
(
test
)
...
...
@@ -193,7 +194,7 @@ def check_software_engineering(objfile, allowedsymbols):
if
m
.
group
(
1
)
==
"
T
"
:
if
m
.
group
(
2
)
in
allowedsymbols
:
continue
if
grade_mode
:
op
=
open
(
results_file
,
'
w
'
)
op
.
write
(
json
.
dumps
({
'
error
'
:
'
defines global function %s
'
%
m
.
group
(
2
)}))
...
...
@@ -209,8 +210,8 @@ def check_software_engineering(objfile, allowedsymbols):
+
"
, but you define: %s
"
)
%
(
objfile
,
m
.
group
(
2
)))
allowedsymbols
=
[
"
future_free
"
,
"
future_get
"
,
"
thread_pool_new
"
,
"
thread_pool_shutdown_and_destroy
"
,
"
thread_pool_submit
"
]
"
thread_pool_new
"
,
"
thread_pool_shutdown_and_destroy
"
,
"
thread_pool_submit
"
]
#
# build it (like check.py)
...
...
@@ -353,7 +354,7 @@ def run_single_test(test, run, threads):
outfile
=
'
runresult.%d.json
'
%
(
proc
.
pid
)
addrundata
({
'
stdout
'
:
stdout
.
decode
()})
if
len
(
stderr
)
>
0
:
if
len
(
stderr
)
>
0
:
addrundata
({
'
stderr
'
:
stderr
.
decode
()})
if
not
os
.
access
(
outfile
,
os
.
R_OK
):
...
...
@@ -367,7 +368,7 @@ def run_single_test(test, run, threads):
addrundata
(
json
.
loads
(
data
))
os
.
unlink
(
outfile
)
return
rundata
def
average_run
(
runs
):
data
=
{
'
nthreads
'
:
runs
[
0
][
'
nthreads
'
],
...
...
@@ -476,7 +477,7 @@ def find_thread_run(perthreadresults, threadcount):
return
next
(
filter
(
lambda
result
:
result
[
'
nthreads
'
]
==
threadcount
,
perthreadresults
),
None
)
def
print_grade_table
(
results
,
tests
):
# report the results of running each tests with
# report the results of running each tests with
thread_headers
=
[
1
,
2
,
4
,
8
,
16
,
32
]
print
(
''
)
print
(
'
Test name:
'
+
(
16
*
'
'
)
+
''
.
join
(
map
(
lambda
x
:
'
%-10s
'
%
str
(
x
),
thread_headers
)))
...
...
@@ -494,7 +495,7 @@ def print_grade_table(results, tests):
print
(
'
%s: could not find test data!
'
%
test
.
name
)
res
=
results
[
test
.
name
]
print
(
'
%s:
'
%
test
.
name
.
upper
()
+
'
'
+
test
.
description
)
passed
=
True
for
run
in
test
.
runs
:
statuses
=
[]
...
...
@@ -511,7 +512,7 @@ def print_grade_table(results, tests):
statuses
.
append
(
'
[X]
'
)
print
(
'
%-23s
'
%
(
run
.
name
)
+
''
.
join
(
map
(
lambda
x
:
'
%-10s
'
%
x
,
statuses
)))
if
not
passed
and
test
.
is_required
:
minimum_requirements
=
False
...
...
@@ -530,7 +531,7 @@ if verbose:
if
not
ignore_if_not_idle
:
wait_for_load_to_go_down
()
results
=
run_tests
(
tests
)
if
verbose
:
print_results
(
results
)
...
...
This diff is collapsed.
Click to expand it.
scripts/fjtests/standard.py
+
2
−
1
View file @
a98f0870
...
...
@@ -120,7 +120,8 @@ tests = [
description
=
"
parallel fibonacci toy test
"
,
runs
=
[
test_run
(
name
=
"
fibonacci 32
"
,
args
=
[
"
32
"
],
timeout
=
60
),
test_run
(
name
=
"
fibonacci 41
"
,
args
=
[
"
41
"
],
thread_count
=
full_half
,
timeout
=
60
),
test_run
(
name
=
"
fibonacci 41
"
,
args
=
[
"
41
"
],
thread_count
=
full_half
,
is_benchmarked
=
True
,
timeout
=
60
),
]
),
]
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