-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding bcast bench test. It will first measure the barrier overhead and account for the barrier usage in measurement. It also runs auto-warm-up by using bcast to synchronize all processes.
- Loading branch information
Showing
5 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/*.c | ||
/p2p_bw | ||
/p2p_latency | ||
/bcast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,8 @@ LDADD += -lm | |
## correctly | ||
noinst_PROGRAMS = \ | ||
p2p_latency \ | ||
p2p_bw | ||
p2p_bw \ | ||
bcast | ||
|
||
.def.c: | ||
mydef_page $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
include: macros/bench_frame.def | ||
include: macros/bench_coll.def | ||
include: macros/mtest.def | ||
|
||
page: bcast, bench_frame | ||
data: buf, size, MPI_CHAR | ||
|
||
tf_barrier = bench_barrier(comm) | ||
$for int size = 1; size < MAX_BUFSIZE; size *= 2 | ||
&call coll_warmup, 0 | ||
MPI_Bcast($(data), 0, comm) | ||
MPI_Barrier(comm) | ||
&call run_stat, NUM_REPEAT, tf_latency | ||
&call measure, iter | ||
MPI_Bcast($(data), 0, comm) | ||
MPI_Barrier(comm) | ||
tf_latency = (tf_dur / iter) - tf_barrier | ||
$if grank == 0 | ||
$call report_latency, size, 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
subcode: coll_warmup(root) | ||
$if grank == 0 | ||
&call warm_up, iter, tf_dur | ||
MPI_Bcast(&iter, 1, MPI_INT, $(root), comm) | ||
&call measure, iter | ||
BLOCK | ||
tn_zero = 0 | ||
MPI_Bcast(&tn_zero, 1, MPI_INT, $(root), comm) | ||
$else | ||
$while 1 | ||
MPI_Bcast(&iter, 1, MPI_INT, $(root), comm) | ||
$if iter == 0 | ||
break | ||
$for 0:iter | ||
BLOCK | ||
|
||
MPI_Bcast(&iter, 1, MPI_INT, $(root), comm) | ||
|
||
fncode: bench_barrier(comm) | ||
$local int iter | ||
&call coll_warmup, 0 | ||
MPI_Barrier(comm) | ||
|
||
&call run_stat, NUM_REPEAT, tf_latency | ||
&call measure, iter | ||
MPI_Barrier(comm) | ||
tf_latency = (tf_dur / iter) | ||
|
||
$if grank == 0 | ||
printf("Barrier latency %.3f +/- %.3f us\n", sum1 * 1e6, sum2 * 1e6) | ||
return sum1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
p2p_latency 2 resultTest=TestBench | ||
p2p_bw 2 resultTest=TestBench | ||
bcast 16 resultTest=TestBench |