Skip to content

adrblo/MPITape.jl

 
 

Repository files navigation

MPITape.jl

Record MPI Operations on Tape

Documentation Build Status Quality

Quick Demo

using MPI
using MPITape

function your_mpi_code()
    # Your MPI Code...
end

@record your_mpi_code()

rank = MPI.Comm_rank(MPI.COMM_WORLD)
# delayed printing
sleep(rank)
MPITape.print_mytape()

# save local tapes to disk
MPITape.save()

MPI.Barrier(MPI.COMM_WORLD)
if rank == 0 # on master
    # read all tapes and merge them into one
    tape_merged = MPITape.readall_and_merge()
    # print the merged tape
    MPITape.print_merged(tape_merged)
    # plot the merged tape (beta)
    # display(MPITape.plot_sequence_merged(tape_merged))
    # MPITape.plot_merged(tape_merged)
end

See example/ for an actual example which leads to outputs like this:

Rank: 0
    Init                (Δt=1.37E-06)
    Barrier             (Δt=3.27E-06)
    Send -> 1           (Δt=2.30E-05)
    Send -> 1           (Δt=2.35E-05)
    Send -> 1           (Δt=2.36E-05)
    Send -> 2           (Δt=2.40E-05)
    Send -> 2           (Δt=2.40E-05)
    Send -> 2           (Δt=2.42E-05)
    Send -> 3           (Δt=2.44E-05)
    Send -> 3           (Δt=2.46E-05)
    Send -> 3           (Δt=2.47E-05)
    Send -> 4           (Δt=2.49E-05)
    Send -> 4           (Δt=2.51E-05)
    Send -> 4           (Δt=2.53E-05)
    Recv <- 1           (Δt=7.59E-05)
    Recv <- 2           (Δt=9.35E-05)
    Recv <- 3           (Δt=9.80E-05)
    Recv <- 4           (Δt=9.84E-05)
    Barrier             (Δt=1.30E-04)

Rank: 1
    Init                (Δt=7.99E-06)
    Barrier             (Δt=1.49E-05)
    Recv <- 0           (Δt=1.81E-05)
    Recv <- 0           (Δt=2.99E-05)
    Recv <- 0           (Δt=3.30E-05)
    Send -> 0           (Δt=9.19E-05)
    Barrier             (Δt=9.25E-05)

Rank: 2
    Init                (Δt=8.47E-06)
    Barrier             (Δt=1.59E-05)
    Recv <- 0           (Δt=1.78E-05)
    Recv <- 0           (Δt=3.18E-05)
    Recv <- 0           (Δt=3.48E-05)
    Send -> 0           (Δt=9.60E-05)
    Barrier             (Δt=9.67E-05)

Rank: 3
    Init                (Δt=8.79E-06)
    Barrier             (Δt=1.64E-05)
    Recv <- 0           (Δt=1.90E-05)
    Recv <- 0           (Δt=3.16E-05)
    Recv <- 0           (Δt=3.49E-05)
    Send -> 0           (Δt=9.23E-05)
    Barrier             (Δt=9.30E-05)

Rank: 4
    Init                (Δt=9.64E-06)
    Barrier             (Δt=1.64E-05)
    Recv <- 0           (Δt=1.81E-05)
    Recv <- 0           (Δt=3.09E-05)
    Recv <- 0           (Δt=3.39E-05)
    Send -> 0           (Δt=9.58E-05)
    Barrier             (Δt=9.63E-05)

Installation

The package is not registered. You can use

] add MPITape

to add the package to your Julia environment.

Documentation

For more information, please find the documentation here.

Acknowledgements

This package is an effort of the Paderborn Center for Parallel Computing (PC²), a national HPC center in Germany.

About

Record MPI operations on tape

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 99.6%
  • Shell 0.4%