Sha256: b9b3ae3258102da3f5181986aa01575aa933e447f3eadee99940ad24b087e0af
Contents?: true
Size: 306 Bytes
Versions: 1
Compression:
Stored size: 306 Bytes
Contents
require "mpi" MPI.Init world = MPI::Comm::WORLD if world.size == 1 print "Size is one, so do nothing\n" exit end rank = world.rank if rank == 0 (world.size-1).times do |i| a = NArray.float(2) world.Recv(a, i+1, 1) p a end else world.Send(NArray[1.0,2], 0, 1) end MPI.Finalize
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-mpi-0.3.0 | samples/narray.rb |