Sha256: 7e3076cd8a7b4ac35f519c1645d1d2a33fcb49288885ad8c04b5d47924c1b810
Contents?: true
Size: 353 Bytes
Versions: 3
Compression:
Stored size: 353 Bytes
Contents
require "mpi" if defined?(NumRu::NArray) include NumRu end 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruby-mpi-0.4.0 | samples/narray.rb |
ruby-mpi-0.3.2 | samples/narray.rb |
ruby-mpi-0.3.1 | samples/narray.rb |