Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/bench: add bcast benchmark #7157

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

test/bench: add bcast benchmark #7157

wants to merge 2 commits into from

Conversation

hzhou
Copy link
Contributor

@hzhou hzhou commented Oct 2, 2024

Pull Request Description

Following #6907, this PR adds collective benchmarks, starting with bcast.

On my desktop:

$ export MPITEST_VERBOSE=1
$ mpirun -l -n 8 ./bcast -memtype=device
[7] Allocating buffer: memtype=device, device=7, size=5000000
[0] Allocating buffer: memtype=device, device=0, size=5000000
[0] TEST bcast:
[6] Allocating buffer: memtype=device, device=6, size=5000000
[2] Allocating buffer: memtype=device, device=2, size=5000000
[3] Allocating buffer: memtype=device, device=3, size=5000000
[5] Allocating buffer: memtype=device, device=5, size=5000000
[1] Allocating buffer: memtype=device, device=1, size=5000000
[4] Allocating buffer: memtype=device, device=4, size=5000000
[0] Barrier latency 33.098 +/- 0.743 us
[0]            1    283.896      4.881            0.004
[0]            2    282.667      0.864            0.007
[0]            4    282.172      0.955            0.014
[0]            8    282.547      0.987            0.028
[0]           16    281.973      0.960            0.057
[0]           32    258.795      0.529            0.124
[0]           64    258.640      1.185            0.247
[0]          128    258.742      0.917            0.495
[0]          256    288.946      3.025            0.886
[0]          512    275.079     10.361            1.861
[0]         1024    278.241      3.867            3.680
[0]         2048    276.950      3.892            7.395
[0]         4096    279.772      4.040           14.641
[0]         8192    284.587      3.501           28.786
[0]        16384    293.846      5.354           55.757
[0]        32768    112.957      2.848          290.093
[0]        65536    176.461     26.542          371.392
[0]       131072    279.492     12.952          468.965
[0]       262144    471.296     17.447          556.219
[0]       524288   1091.045     17.324          480.537
[0]      1048576   2338.931     39.098          448.314
[0]      2097152   3355.044     36.571          625.074
[0]      4194304   6950.164     71.623          603.483
[0]
[0]  No Errors[0]

[skip warnings]

Author Checklist

  • Provide Description
    Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
  • Commits Follow Good Practice
    Commits are self-contained and do not do two things at once.
    Commit message is of the form: module: short description
    Commit message explains what's in the commit.
  • Passes All Tests
    Whitespace checker. Warnings test. Additional tests via comments.
  • Contribution Agreement
    For non-Argonne authors, check contribution agreement.
    If necessary, request an explicit comment from your companies PR approval manager.

* Add or improve some comments
* Move MAX_BUFSIZE and NUM_REPEAT to bench_frame.def since it is
not specific to p2p tests
* Make grank and gsize global so we don't need to pass between
functions.
* Add MEM_TYPES macro to different ways of setting memtype and memory
devices.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant