]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpi/example/python/hello_world.py
1 # Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com>.
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)
7 import boost
.parallel
.mpi
as mpi
9 if mpi
.world
.rank
== 0:
10 mpi
.world
.send(1, 0, 'Hello')
11 msg
= mpi
.world
.recv(1, 1)
14 msg
= mpi
.world
.recv(0, 0)
16 mpi
.world
.send(0, 1, 'world')