hello = "Hello, I'm #{MPI::Comm::WORLD.rank()}"

ary = MPI::Comm::WORLD.allgather(hello)
ary.each_with_index do |msg, i|
	print "#{MPI::Comm::WORLD.rank()}: #{i} said '#{msg}'\n"
end


syntax highlighted by Code2HTML, v. 0.9.1