{"id":27918771,"url":"https://github.com/juliaparallel/mpibenchmarks.jl","last_synced_at":"2025-09-12T21:18:13.179Z","repository":{"id":40324123,"uuid":"489674724","full_name":"JuliaParallel/MPIBenchmarks.jl","owner":"JuliaParallel","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-18T14:39:54.000Z","size":93,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-11-18T16:01:53.023Z","etag":null,"topics":["benchmark","hpc","julia","mpi"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaParallel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-07T13:01:32.000Z","updated_at":"2024-11-18T14:40:08.000Z","dependencies_parsed_at":"2024-05-12T20:20:03.002Z","dependency_job_id":"9d84a8db-f09e-46e1-ad70-65a07ccd1f20","html_url":"https://github.com/JuliaParallel/MPIBenchmarks.jl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaParallel%2FMPIBenchmarks.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaParallel%2FMPIBenchmarks.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaParallel%2FMPIBenchmarks.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaParallel%2FMPIBenchmarks.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaParallel","download_url":"https://codeload.github.com/JuliaParallel/MPIBenchmarks.jl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252742691,"owners_count":21797294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","hpc","julia","mpi"],"created_at":"2025-05-06T18:25:28.832Z","updated_at":"2025-05-06T18:25:29.501Z","avatar_url":"https://github.com/JuliaParallel.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MPIBenchmarks\n\n\u003c!-- [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaParallel.github.io/MPIBenchmarks.jl/stable) --\u003e\n\u003c!-- [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaParallel.github.io/MPIBenchmarks.jl/dev) --\u003e\n[![Build Status](https://github.com/JuliaParallel/MPIBenchmarks.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaParallel/MPIBenchmarks.jl/actions/workflows/CI.yml?query=branch%3Amain)\n[![Coverage](https://codecov.io/gh/JuliaParallel/MPIBenchmarks.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaParallel/MPIBenchmarks.jl)\n\n`MPIBenchmarks.jl` is a collection of benchmarks for\n[`MPI.jl`](https://github.com/JuliaParallel/MPI.jl), the\n[Julia](https://julialang.org/) wrapper for the Message Passing Interface\n([MPI](https://www.mpi-forum.org/)).\n\nThe goal is to have a suite of benchmarks which will allow `MPI.jl` users to\n\n* compare performance of different MPI libraries used with `MPI.jl`;\n* compare performance of `MPI.jl` with analogue benchmarks written in other languages, like\n  C/C++.\n\nFor this purpose we have benchmarks inspired by [Intel(R) MPI\nBenchmarks](https://www.intel.com/content/www/us/en/develop/documentation/imb-user-guide/top.html)\n(IMB) and [OSU Micro-Benchmarks](http://mvapich.cse.ohio-state.edu/benchmarks/), to make it\neasier to compare results with established MPI benchmarks suites.\n\n_**NOTE: `MPIBenchmarks.jl` is a work in progress.  Contributions are very much welcome!**_\n\n## Installation\n\nTo install `MPIBenchmarks.jl`, open a Julia REPL, type `]` to enter the Pkg REPL mode and\nrun the command\n\n```\nadd https://github.com/JuliaParallel/MPIBenchmarks.jl\n```\n\n`MPIBenchmarks.jl` currently requires Julia v1.6 and `MPI.jl` v0.20.\n\n## Usage\n\n`MPIBenchmarks.jl` currently provides the following benchmark types\n\n* collective\n  * `IMBAllreduce()`: inspired by IMB Allreduce\n  * `IMBAlltoall()`: inspired by IMB Alltoall\n  * `IMBGatherv()`: inspired by IMB Gatherv\n  * `IMBReduce()`: inspired by IMB Reduce\n  * `OSUAllreduce()`: inspired by OSU Allreduce\n  * `OSUAlltoall()`: inspired by OSU Alltoall\n  * `OSUReduce()`: inspired by OSU Reduce\n* point-to-point:\n  * `IMBPingPong()`: inspired by IMB PingPong\n  * `IMBPingPing()`: inspired by IMB PingPing\n  * `OSULatency()`: inspired by OSU Latency\n\nAfter loading the package\n\n```julia\nusing MPIBenchmarks\n```\n\nto run a benchmark use the function `benchmark(\u003cBENCHMARK TYPE\u003e)`, replacing `\u003cBENCHMARK TYPE\u003e`\nwith the name of the benchmark you want to run, from the list above.  The benchmarking types\ntake the following arguments:\n\n* optional positional argument:\n  * `T::Type`: data type to use for the communication.  It must be a bits type, with size in\n\tbytes which is a power of 2.  Default is `UInt8`\n* keyword arguments:\n  * `verbose::Bool`: whether to print to `stdout` some information.  Default is `true`.\n  * `max_size::Int`: maximum size of the data to transmit, in bytes.  It must be\n    a power of 2 and larger than the size of the datatype `T`.\n  * `filename::Union{String,Nothing}`: name of the output CSV file where to save the results\n\tof the benchmark.  If `nothing`, the file is not written.  Default is a string with the\n\tname of the given benchmark (e.g., `\"julia_imb_pingpong.csv\"` for `IMBPingPong`).\n\n_**NOTE: kernels of the benchmarks in the IMB and OSU suites are usually very\nsimilar, if not identical.  After all, they benchmark the same MPI functions.\nHowever, there are usually subtle differences, for example with regards to the\nnumber of iterations, datatypes used, how buffers are initialized, etc, which\ncan slightly affect the results.  `MPIBenchmarks.jl` tries to match what the\noriginal benchmarks do, but there is no guarantee about this and there may still\nbe unwanted differences.  If you spot any, please open an issue or submit a pull\nrequest.  As a rule of thumb, OSU benchmarks tend be easier to follow than the\nIMB's, so our implementations of their benchmarks should generally be more\nfaithful than compared to the IMB ones.**_\n\n### Example\n\nWrite a script like the following:\n\n```julia\nusing MPIBenchmarks\n\n# Collective benchmarks\nbenchmark(IMBAllreduce())\nbenchmark(IMBAlltoall())\nbenchmark(IMBGatherv())\nbenchmark(IMBReduce())\nbenchmark(OSUAllreduce())\nbenchmark(OSUAlltoall())\nbenchmark(OSUReduce())\n\n# Point-to-point benchmarks.\n# NOTE: they require exactly two MPI processes.\nbenchmark(IMBPingPong())\nbenchmark(IMBPingPing())\nbenchmark(OSULatency())\n```\n\nThen execute it with the following command\n\n```\nmpiexecjl -np 2 julia --project mpi_benchmarks.jl\n```\n\nwhere\n\n* `mpiexecjl` is [`MPI.jl`'s wrapper for\n  `mpiexec`](https://juliaparallel.org/MPI.jl/dev/usage/#Julia-wrapper-for-mpiexec),\n* `2` is the number of MPI process to launch.  Use any other suitable number for\n  your benchmarks, typically at least 2.  Note that point-to-point benchmarks\n  require exactly 2 processes, so if you want to use more processes for the\n  collective operations you will have to run them in a separate script,\n* `mpi_benchmarks.jl` is the name of the script you created.\n\n## License\n\nThe `MPIBenchmarks.jl` package is licensed under the MIT \"Expat\" License.  The original\nauthor is Mosè Giordano.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaparallel%2Fmpibenchmarks.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliaparallel%2Fmpibenchmarks.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaparallel%2Fmpibenchmarks.jl/lists"}