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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
maestro
maestro-core
Commits
225b2081
Commit
225b2081
authored
2 years ago
by
Ali Mohammed
Committed by
Ali Mohammed
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add run_core_bench script
parent
f357b412
No related branches found
No related tags found
1 merge request
!53
Resolve "Need CI-test using 'installed' maestro"
Pipeline
#111697
failed
2 years ago
Stage: build-and-test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/core_benchmark.c
+6
-6
6 additions, 6 deletions
examples/core_benchmark.c
examples/run_core_bench.sh
+49
-0
49 additions, 0 deletions
examples/run_core_bench.sh
with
55 additions
and
6 deletions
examples/core_benchmark.c
+
6
−
6
View file @
225b2081
...
@@ -270,12 +270,12 @@ int main(int argc, char *argv[]) {
...
@@ -270,12 +270,12 @@ int main(int argc, char *argv[]) {
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): %.5lf 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] demand-dispose time: %.5lf s
\n
"
,
rank
,
after
-
before
);
fprintf
(
stdout
,
"Bandwidth: %.5f MB/s
\n
"
,
(
double
)
(
num_CDOs
*
size_CDO
)
/
(
demand_time
/
1000000
)
/
1024
/
1024
);
//bandwidth = bytes/s
fprintf
(
stdout
,
"[Consumer %d] declare-dispose time: %.5lf s
\n
"
,
rank
,
consumer_end
-
consumer_start
);
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
();
//
assert(status == MSTRO_OK);
assert
(
status
==
MSTRO_OK
);
/*clean up*/
/*clean up*/
if
(
producers_ids
!=
NULL
){
if
(
producers_ids
!=
NULL
){
...
@@ -349,7 +349,7 @@ int main(int argc, char *argv[]) {
...
@@ -349,7 +349,7 @@ int main(int argc, char *argv[]) {
/*report time in microseconds */
/*report time in microseconds */
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,
CDO size: %"
PRId64
",
#Threads: %zu, #Attributes: %zu, Size of attributes: %zu
\n
"
,
num_CDOs
,
size_CDO
,
num_threads
,
num_attributes
,
size_attributes
);
fprintf
(
stdout
,
"Throughput (declare/offer): %.5lf 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
);
fprintf
(
stdout
,
"[Producer %d] declare-offer time: %.5lf s
\n
"
,
rank
,
after
-
before
);
...
@@ -382,7 +382,7 @@ int main(int argc, char *argv[]) {
...
@@ -382,7 +382,7 @@ int main(int argc, char *argv[]) {
free
(
CDO_data
[
i
]);
free
(
CDO_data
[
i
]);
}
}
//
assert(status == MSTRO_OK);
assert
(
status
==
MSTRO_OK
);
}
}
}
}
...
@@ -395,7 +395,7 @@ int main(int argc, char *argv[]) {
...
@@ -395,7 +395,7 @@ int main(int argc, char *argv[]) {
if
((
rank
==
0
)
&&
(
size
>
1
))
{
if
((
rank
==
0
)
&&
(
size
>
1
))
{
status
=
mstro_pm_terminate
();
status
=
mstro_pm_terminate
();
/*
if
(
status
!=
MSTRO_OK
)
{
if
(
status
!=
MSTRO_OK
)
{
ERR
(
"Simple Maestro Pool Manager: Failed to shut down pool: %d (%s)
\n
"
,
ERR
(
"Simple Maestro Pool Manager: Failed to shut down pool: %d (%s)
\n
"
,
status
,
mstro_status_description
(
status
));
status
,
mstro_status_description
(
status
));
...
@@ -403,7 +403,7 @@ int main(int argc, char *argv[]) {
...
@@ -403,7 +403,7 @@ int main(int argc, char *argv[]) {
MPI_Abort
(
MPI_COMM_WORLD
,
-
1
);
MPI_Abort
(
MPI_COMM_WORLD
,
-
1
);
}
}
*/
status
=
mstro_finalize
();
status
=
mstro_finalize
();
}
}
...
...
This diff is collapsed.
Click to expand it.
examples/run_core_bench.sh
0 → 100755
+
49
−
0
View file @
225b2081
#!/bin/sh
#SBATCH -N 3
#SBATCH -n 3
#SBATCH --time=00:10:00
#SBATCH --job-name=mstro_core_bench
#SBATCH --output=job.core_bench.%j.out
#SBATCH --error=job.core_bench.%j.err
#SBATCH --hint=nomultithread
#SBATCH --exclusive
#SBATCH --ntasks-per-node 1
# core_bench is an MPI program, where one rank acts as a pool manager, other ranks are producers and consumers.
# It tests the bandwidth of moving data (core data objects, i.e. CDOs) between producers and consumers across nodes,
# hence --ntasks-per-node 1 is needed to make sure procucers and consumers are on different nodes.
# It can also run on a single node, where it will use the local pool manager and test data movement between producers
# and consumers threads.
# number of procduer and comsumer threads
export
OMP_NUM_THREADS
=
4
#OpenMP thread pinning
export
OMP_PLACES
=
cores
export
OMP_PROC_BIND
=
close
# FI provider, e.g. sockets, gni, verbs, cxi
export
FI_PROVIDER
=
cxi
# maestro transport method, options are OFI, GFS, MIO
export
MSTRO_TRANSPORT_DEFAULT
=
OFI
export
MPICH_MAX_THREAD_SAFETY
=
multiple
# number of completion queue handler threads
export
MSTRO_OFI_CQ_NUM_THREADS
=
1
# core_bench supports multiple consumer modes
# MSTRO_CONSUMER_SINK_ALL >> One consumer sinks in all data from all producers
# MSTRO_CONSUMER_ONE2ONE >> #consumers == #procducers. each consumer is assigned CDOs from one producer
# MSTRO_CONSUMER_ONE2TEN >> one consumer sinks data from 10 producers. #producers = 10 * #consumers
# MSTRO_CONSUMER_ALL2ALL >> Each consumer sinks data from all producers
export
MSTRO_CONSUMER_MODE
=
MSTRO_CONSUMER_SINK_ALL
# total number of ranks = number of producer ranks + number of consumer ranks + 1 (pool manager rank)
# number of procducers = total number of ranks - #consumers - 1 (pool manager)
# srun <options> <core_bench> <#attributes> <attribute size> <#CDOs/thread> <#consumers> <CDO size in bytes>
srun
--exclusive
--ntasks-per-node
1
-n
3 ./core_bench 0 0 20 1 671088640
This diff is collapsed.
Click to expand it.
Ali Mohammed
@mohammed1
mentioned in issue
#101
·
2 years ago
mentioned in issue
#101
mentioned in issue #101
Toggle commit list
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