Skip to content
This repository
Browse code

print message and exit if process size is one in the samples

  • Loading branch information...
commit b40caffa0f8ef4330a9e71e341f6decc3a8dddf8 1 parent d301ebb
Seiya Nishizawa authored

Showing 2 changed files with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. +6 0 samples/hello.rb
  2. +6 0 samples/narray.rb
6 samples/hello.rb
@@ -4,6 +4,12 @@
4 4
5 5
6 6 world = MPI::Comm::WORLD
  7 +
  8 +if world.size == 1
  9 + print "Size is one, so do nothing\n"
  10 + exit
  11 +end
  12 +
7 13 rank = world.rank
8 14
9 15 if rank == 0
6 samples/narray.rb
@@ -4,6 +4,12 @@
4 4
5 5
6 6 world = MPI::Comm::WORLD
  7 +
  8 +if world.size == 1
  9 + print "Size is one, so do nothing\n"
  10 + exit
  11 +end
  12 +
7 13 rank = world.rank
8 14
9 15 if rank == 0

0 comments on commit b40caff

Please sign in to comment.
Something went wrong with that request. Please try again.