Code Monkey home page Code Monkey logo

mpibenchmarks.jl's Introduction

MPIBenchmarks

Build Status Coverage

MPIBenchmarks.jl is a collection of benchmarks for MPI.jl, the Julia wrapper for the Message Passing Interface (MPI).

The goal is to have a suite of benchmarks which will allow MPI.jl users to

  • compare performance of different MPI libraries used with MPI.jl;
  • compare performance of MPI.jl with analogue benchmarks written in other languages, like C/C++.

For this purpose we have benchmarks inspired by Intel(R) MPI Benchmarks (IMB) and OSU Micro-Benchmarks, to make it easier to compare results with established MPI benchmarks suites.

NOTE: MPIBenchmarks.jl is a work in progress. Contributions are very much welcome!

Installation

To install MPIBenchmarks.jl, open a Julia REPL, type ] to enter the Pkg REPL mode and run the command

add https://github.com/JuliaParallel/MPIBenchmarks.jl

MPIBenchmarks.jl currently requires Julia v1.6 and MPI.jl v0.20.

Usage

MPIBenchmarks.jl currently provides the following benchmark types

  • collective
    • IMBAllreduce(): inspired by IMB Allreduce
    • IMBAlltoall(): inspired by IMB Alltoall
    • IMBGatherv(): inspired by IMB Gatherv
    • IMBReduce(): inspired by IMB Reduce
    • OSUAllreduce(): inspired by OSU Allreduce
    • OSUAlltoall(): inspired by OSU Alltoall
    • OSUReduce(): inspired by OSU Reduce
  • point-to-point:
    • IMBPingPong(): inspired by IMB PingPong
    • IMBPingPing(): inspired by IMB PingPing
    • OSULatency(): inspired by OSU Latency

After loading the package

using MPIBenchmarks

to run a benchmark use the function benchmark(<BENCHMARK TYPE>), replacing <BENCHMARK TYPE> with the name of the benchmark you want to run, from the list above. The benchmarking types take the following arguments:

  • optional positional argument:
    • T::Type: data type to use for the communication. It must be a bits type, with size in bytes which is a power of 2. Default is UInt8
  • keyword arguments:
    • verbose::Bool: whether to print to stdout some information. Default is true.
    • max_size::Int: maximum size of the data to transmit, in bytes. It must be a power of 2 and larger than the size of the datatype T.
    • filename::Union{String,Nothing}: name of the output CSV file where to save the results of the benchmark. If nothing, the file is not written. Default is a string with the name of the given benchmark (e.g., "julia_imb_pingpong.csv" for IMBPingPong).

NOTE: kernels of the benchmarks in the IMB and OSU suites are usually very similar, if not identical. After all, they benchmark the same MPI functions. However, there are usually subtle differences, for example with regards to the number of iterations, datatypes used, how buffers are initialized, etc, which can slightly affect the results. MPIBenchmarks.jl tries to match what the original benchmarks do, but there is no guarantee about this and there may still be unwanted differences. If you spot any, please open an issue or submit a pull request. As a rule of thumb, OSU benchmarks tend be easier to follow than the IMB's, so our implementations of their benchmarks should generally be more faithful than compared to the IMB ones.

Example

Write a script like the following:

using MPIBenchmarks

# Collective benchmarks
benchmark(IMBAllreduce())
benchmark(IMBAlltoall())
benchmark(IMBGatherv())
benchmark(IMBReduce())
benchmark(OSUAllreduce())
benchmark(OSUAlltoall())
benchmark(OSUReduce())

# Point-to-point benchmarks.
# NOTE: they require exactly two MPI processes.
benchmark(IMBPingPong())
benchmark(IMBPingPing())
benchmark(OSULatency())

Then execute it with the following command

mpiexecjl -np 2 julia --project mpi_benchmarks.jl

where

  • mpiexecjl is MPI.jl's wrapper for mpiexec,
  • 2 is the number of MPI process to launch. Use any other suitable number for your benchmarks, typically at least 2. Note that point-to-point benchmarks require exactly 2 processes, so if you want to use more processes for the collective operations you will have to run them in a separate script,
  • mpi_benchmarks.jl is the name of the script you created.

License

The MPIBenchmarks.jl package is licensed under the MIT "Expat" License. The original author is Mosè Giordano.

mpibenchmarks.jl's People

Contributors

giordano avatar binhudakhalid avatar ranocha avatar simonbyrne avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.