Sha256: 6a6147f081052d435824e188e86f4ef77ffe2b12012075cf69f4313d0b7af88d

Contents?: true

Size: 263 Bytes

Versions: 2

Compression:

Stored size: 263 Bytes

Contents

require "mpi"

MPI.Init


world = MPI::Comm::WORLD
rank = world.rank

if rank == 0
  (world.size-1).times do |i|
    str ="\x00"*100
    world.Recv(str, i+1, 0) 
    p str
  end
else
  message = "Hello from #{rank}"
  world.Send(message, 0, 0)
end


MPI.Finalize

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-mpi-0.2.0 samples/hello.rb
ruby-mpi-0.1.0 samples/hello.rb