]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpi/example/python/hello_world.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / mpi / example / python / hello_world.py
1 # Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com>.
2
3 # Use, modification and distribution is subject to the Boost Software
4 # License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 # http://www.boost.org/LICENSE_1_0.txt)
6
7 import boost.parallel.mpi as mpi
8
9 if mpi.world.rank == 0:
10 mpi.world.send(1, 0, 'Hello')
11 msg = mpi.world.recv(1, 1)
12 print msg,'!'
13 else:
14 msg = mpi.world.recv(0, 0)
15 print msg,', ',
16 mpi.world.send(0, 1, 'world')