Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
maestro-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
maestro
maestro-core
Commits
55abd01c
Commit
55abd01c
authored
Apr 21, 2020
by
Christopher Haine
Browse files
Options
Downloads
Patches
Plain Diff
visualization tools for `pool_local_multi`
parent
89068528
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
benchmark/visu_pool_local_multi.p
+10
-0
10 additions, 0 deletions
benchmark/visu_pool_local_multi.p
benchmark/visu_pool_local_multi.sh
+44
-0
44 additions, 0 deletions
benchmark/visu_pool_local_multi.sh
tests/check_pool_local_multi.c
+25
-12
25 additions, 12 deletions
tests/check_pool_local_multi.c
with
79 additions
and
12 deletions
benchmark/visu_pool_local_multi.p
0 → 100644
+
10
−
0
View file @
55abd01c
set
terminal
png
set
output
"
ju_diff100k.png
"
set
font
"
Helvetica
"
set
title
'
Juelich/issue6/1; jupiter; BW; rep1; diff100k; /=decl
\
_per
\
_cdo
'
set
key
right
set
log
y
set
xlabel
"
decl per CDO
"
set
ylabel
"
time (ms)
"
set
style
function
linespoints
plot
'
pool_local_multi.dat
'
using
2
:
xtic
(
1
)
title
"
1 thread
"
with
linespoints
,
''
using
3
title
"
4 threads
"
with
linespoints
,
''
using
4
title
"
8 threads
"
with
linespoints
,
''
using
5
title
"
12 threads
"
with
linespoints
,
''
using
8
title
"
24 threads
"
with
linespoints
This diff is collapsed.
Click to expand it.
benchmark/visu_pool_local_multi.sh
0 → 100755
+
44
−
0
View file @
55abd01c
#!/usr/bin/env bash
#
# Post-treatment and visualization of ../tests/check_pool_local_multi
#
# Copyright (C) 2020 Cray Computer GmbH
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
output
=
"pool_local_multi.dat"
gnuplot_script
=
"visu_pool_local_multi.p"
../tests/check_pool_local_multi
>
tmp
# remove the first two lines and the last three lines (written by `cheat`)
head
-n
-3
tmp |
sed
-e
'1,2d'
>
$output
gnuplot
$gnuplot_script
This diff is collapsed.
Click to expand it.
tests/check_pool_local_multi.c
+
25
−
12
View file @
55abd01c
...
@@ -102,7 +102,7 @@ CHEAT_DECLARE(
...
@@ -102,7 +102,7 @@ CHEAT_DECLARE(
return
NULL
;
return
NULL
;
}
}
#define MAX_THREADS
9
/* power-of-two + 1 and >1 */
#define MAX_THREADS
25
)
)
CHEAT_TEST
(
cdo_local_pool_works
,
CHEAT_TEST
(
cdo_local_pool_works
,
...
@@ -111,16 +111,25 @@ CHEAT_TEST(cdo_local_pool_works,
...
@@ -111,16 +111,25 @@ CHEAT_TEST(cdo_local_pool_works,
srandom
(
42
);
srandom
(
42
);
cheat_assert
(
MSTRO_OK
==
mstro_init
(
"Tests"
,
"POOL"
,
0
));
cheat_assert
(
MSTRO_OK
==
mstro_init
(
"Tests"
,
"POOL"
,
0
));
for
(
size_t
numthr
=
1
;
numthr
<
MAX_THREADS
;
numthr
*=
2
)
{
fprintf
(
stdout
,
"# num_diff=100k; time /= decl_per_cdo"
);
pthread_t
threads
[
MAX_THREADS
];
for
(
size_t
num_diff
=
1
;
num_diff
<
100001
;
num_diff
*=
10
)
{
for
(
size_t
numdecl
=
1
;
numdecl
<
129
;
numdecl
*=
2
)
{
for
(
size_t
numdecl
=
1
;
numdecl
<
129
;
numdecl
*=
2
)
{
struct
thread_args
args
;
// for(size_t num_diff=1; num_diff<100001; num_diff*=10) {
size_t
num_diff
=
100000
;
struct
thread_args
args
;
args
.
num_repeats
=
100000
/
num_diff
;
args
.
num_repeats
=
100000
/
num_diff
;
args
.
num_different_cdos
=
num_diff
;
args
.
num_different_cdos
=
num_diff
;
args
.
num_max_declares_per_cdo
=
numdecl
;
args
.
num_max_declares_per_cdo
=
numdecl
;
fprintf
(
stdout
,
"%8zu "
,
args
.
num_max_declares_per_cdo
);
for
(
size_t
numthr
=
1
;
numthr
<
MAX_THREADS
;
numthr
+=
4
)
{
if
(
numthr
==
5
)
numthr
--
;
// yes that's ugly
pthread_t
threads
[
MAX_THREADS
];
mstro_nanosec_t
before
=
mstro_clock
();
mstro_nanosec_t
before
=
mstro_clock
();
for
(
size_t
i
=
0
;
i
<
numthr
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
numthr
;
i
++
)
{
...
@@ -136,12 +145,16 @@ CHEAT_TEST(cdo_local_pool_works,
...
@@ -136,12 +145,16 @@ CHEAT_TEST(cdo_local_pool_works,
mstro_nanosec_t
after
=
mstro_clock
();
mstro_nanosec_t
after
=
mstro_clock
();
double
duration
=
after
-
before
;
double
duration
=
after
-
before
;
double
ms
=
duration
/
(
1000
.
0
*
1000
.
0
);
double
ms
=
duration
/
(
1000
.
0
*
1000
.
0
);
fprintf
(
stdout
,
"%8zu reps, %8zu different, %8zu per CDO, %3zu threads: %.2f ms
\n
"
,
/*
fprintf(stdout, "%8zu reps, %8zu different, %8zu per CDO, %3zu threads: %.2f ms\n",
args.num_repeats, args.num_different_cdos, args.num_max_declares_per_cdo,
args.num_repeats, args.num_different_cdos, args.num_max_declares_per_cdo,
numthr,
numthr,
ms);
ms);
*/
fprintf
(
stdout
,
"%.5f "
,
ms
/
(
double
)
args
.
num_max_declares_per_cdo
);
}
}
}
// }
fprintf
(
stdout
,
"
\n
"
);
}
}
cheat_assert
(
global_result
==
MSTRO_OK
);
cheat_assert
(
global_result
==
MSTRO_OK
);
...
...
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
sign in
to comment