Athena Cluster

From IPRE Wiki
Revision as of 14:55, 25 October 2013 by Doug Blank (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Hello MPI in Python

Here are the steps, briefly, for running a MPI Python Script on Athena

  1. log into athena.brynmawr.edu
  2. find out which /data path you have a shared directory (either /data1, or /data2)
  3. create a python program in your /dataN/userid/ directory
  4. create a PBS script
  5. submit the PBS script
  6. check on status
  7. see the results

Step 1: Log into Athena

Step 2: Where is my /data?

Step 3: Create a Python script

# More tutorials available at:
# http://mpi4py.scipy.org/docs/usrman/tutorial.html

from mpi4py import MPI
import platform

comm = MPI.COMM_WORLD
rank = comm.Get_rank()
size = comm.Get_size()
machine = platform.node()

print("Hello MPI from %s %d of %d" % (machine, rank, size))

Step 4: Submit PBS script

Step 5: Check status

Step 6: Get Results