Skip to content

Commit 409b476

Browse files
author
Jonathan Rocher
committed
Adding a hello world for running a python script with MPI.
1 parent d3cf6d7 commit 409b476

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

MPI/hello_world.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
""" Hello world for running a python script on multiple nodes
2+
using MPI. Run it with
3+
$ mpiexec -n 4 python hello_world.py
4+
"""
5+
6+
from mpi4py import MPI
7+
import os
8+
9+
print 'Hello, World from %s!' % os.getpid()

0 commit comments

Comments
 (0)