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
f784b477
Commit
f784b477
authored
Apr 11, 2022
by
Ali Mohammed
Committed by
Ali Mohammed
Sep 9, 2022
Browse files
Options
Downloads
Patches
Plain Diff
report full consumers and producers times
parent
302e95d8
No related branches found
No related tags found
1 merge request
!53
Resolve "Need CI-test using 'installed' maestro"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/core_benchmark.c
+18
-7
18 additions, 7 deletions
examples/core_benchmark.c
with
18 additions
and
7 deletions
examples/core_benchmark.c
+
18
−
7
View file @
f784b477
...
@@ -248,12 +248,15 @@ int main(int argc, char *argv[]) {
...
@@ -248,12 +248,15 @@ int main(int argc, char *argv[]) {
/* Require CDOs */
/* Require CDOs */
before
=
omp_get_wtime
();
before
=
omp_get_wtime
();
double
consumer_start
=
before
;
status
=
require_CDOs
(
cdos
,
num_CDOs
,
producers_ids
,
num_producers
,
CDO_data
,
size_CDO
);
status
=
require_CDOs
(
cdos
,
num_CDOs
,
producers_ids
,
num_producers
,
CDO_data
,
size_CDO
);
assert
(
MSTRO_OK
==
status
);
assert
(
MSTRO_OK
==
status
);
after
=
omp_get_wtime
();
after
=
omp_get_wtime
();
require_time
=
(
after
-
before
)
*
1000
.
0
*
1000
.
0
;
//time in us seconds
require_time
=
(
after
-
before
)
*
1000
.
0
*
1000
.
0
;
//time in us seconds
fprintf
(
stdout
,
"Throughput (declare/require): %.5f us
\n
"
,
require_time
/
(
double
)
num_CDOs
);
fprintf
(
stdout
,
"Throughput (declare/require): %.5lf us
\n
"
,
require_time
/
(
double
)
num_CDOs
);
fprintf
(
stdout
,
"[Consumer %d] declare-require time: %.5lf s
\n
"
,
rank
,
after
-
before
);
/*sync producers and consumers -- avoid CDOs been withdrawn before require */
/*sync producers and consumers -- avoid CDOs been withdrawn before require */
MPI_Barrier
(
MPI_COMM_WORLD
);
MPI_Barrier
(
MPI_COMM_WORLD
);
...
@@ -263,9 +266,12 @@ int main(int argc, char *argv[]) {
...
@@ -263,9 +266,12 @@ int main(int argc, char *argv[]) {
status
=
demand_CDOs
(
cdos
,
num_CDOs
);
status
=
demand_CDOs
(
cdos
,
num_CDOs
);
assert
(
MSTRO_OK
==
status
);
assert
(
MSTRO_OK
==
status
);
after
=
omp_get_wtime
();
after
=
omp_get_wtime
();
double
consumer_end
=
after
;
demand_time
=
(
after
-
before
)
*
1000
.
0
*
1000
.
0
;
//time in us seconds
demand_time
=
(
after
-
before
)
*
1000
.
0
*
1000
.
0
;
//time in us seconds
fprintf
(
stdout
,
"Throughput (demand/dispose): %.5f us
\n
"
,
demand_time
/
(
double
)
num_CDOs
);
fprintf
(
stdout
,
"Throughput (demand/dispose): %.5lf us
\n
"
,
demand_time
/
(
double
)
num_CDOs
);
fprintf
(
stdout
,
"[Consumer %d] demand-dispose time: %.5lf s
\n
"
,
rank
,
after
-
before
);
fprintf
(
stdout
,
"[Consumer %d] declare-dispose time: %.5lf s
\n
"
,
rank
,
consumer_end
-
consumer_start
);
/* finalize Maestro */
/* finalize Maestro */
status
=
mstro_finalize
();
status
=
mstro_finalize
();
...
@@ -331,6 +337,8 @@ int main(int argc, char *argv[]) {
...
@@ -331,6 +337,8 @@ int main(int argc, char *argv[]) {
}
}
before
=
omp_get_wtime
();
before
=
omp_get_wtime
();
double
producer_start
=
before
;
/* declare CDOs loop */
/* declare CDOs loop */
status
=
inject_CDOs
(
rank
,
cdos
,
num_CDOs
,
num_attributes
,
size_attributes
,
size_CDO
,
CDO_data
);
status
=
inject_CDOs
(
rank
,
cdos
,
num_CDOs
,
num_attributes
,
size_attributes
,
size_CDO
,
CDO_data
);
...
@@ -342,7 +350,8 @@ int main(int argc, char *argv[]) {
...
@@ -342,7 +350,8 @@ int main(int argc, char *argv[]) {
declare_time
=
(
after
-
before
)
*
1000
.
0
*
1000
.
0
;
declare_time
=
(
after
-
before
)
*
1000
.
0
*
1000
.
0
;
fprintf
(
stdout
,
"#CDOs: %zu, #Threads: %zu, #Attributes: %zu, Size of attributes: %zu
\n
"
,
num_CDOs
,
num_threads
,
num_attributes
,
size_attributes
);
fprintf
(
stdout
,
"#CDOs: %zu, #Threads: %zu, #Attributes: %zu, Size of attributes: %zu
\n
"
,
num_CDOs
,
num_threads
,
num_attributes
,
size_attributes
);
fprintf
(
stdout
,
"Throughput (declare/offer): %.5f us
\n
"
,
declare_time
/
(
double
)
num_CDOs
);
fprintf
(
stdout
,
"Throughput (declare/offer): %.5lf us
\n
"
,
declare_time
/
(
double
)
num_CDOs
);
fprintf
(
stdout
,
"[Producer %d] declare-offer time: %.5lf s
\n
"
,
rank
,
after
-
before
);
/* sync producers and consumers -- avoid CDOs been withdrawn before require */
/* sync producers and consumers -- avoid CDOs been withdrawn before require */
MPI_Barrier
(
MPI_COMM_WORLD
);
MPI_Barrier
(
MPI_COMM_WORLD
);
...
@@ -360,9 +369,11 @@ int main(int argc, char *argv[]) {
...
@@ -360,9 +369,11 @@ int main(int argc, char *argv[]) {
assert
(
MSTRO_OK
==
status
);
assert
(
MSTRO_OK
==
status
);
after
=
omp_get_wtime
();
after
=
omp_get_wtime
();
double
producer_end
=
after
;
withdraw_time
=
(
after
-
before
)
*
1000
.
0
*
1000
.
0
;
//time in us seconds
withdraw_time
=
(
after
-
before
)
*
1000
.
0
*
1000
.
0
;
//time in us seconds
fprintf
(
stdout
,
"Throughput (withdraw/dispose): %.5f us
\n
"
,
withdraw_time
/
(
double
)
num_CDOs
);
fprintf
(
stdout
,
"Throughput (withdraw/dispose): %.5lf us
\n
"
,
withdraw_time
/
(
double
)
num_CDOs
);
fprintf
(
stdout
,
"[Producer %d] withdraw-dispose time: %.5lf s
\n
"
,
rank
,
after
-
before
);
fprintf
(
stdout
,
"[Producer %d] declare-dispose time: %.5lf s
\n
"
,
rank
,
producer_end
-
producer_start
);
status
=
mstro_finalize
();
status
=
mstro_finalize
();
...
...
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