source: anuga_core/source/pypar-numeric/test_init.py @ 5779

Last change on this file since 5779 was 5779, checked in by steve, 16 years ago

Added the old version of pypar which works with Numeric. Necessary for parallel code until we move anuga to numpy (and then we can use pypar as distribute via sourceforge).

File size: 534 bytes
Line 
1#!/usr/bin/env python
2# Inital test of MPI module 'pypar' for Python
3#
4# Run as
5#   python test_init.py
6# or
7#   mpirun -np 2 test_init.py
8#  (perhaps try number of processors more than 2)
9#
10# To verify bandwidth of your architecture please run pytiming (and ctiming)
11#
12# OMN April 2002
13
14
15import pypar
16
17myid =    pypar.rank()
18numproc = pypar.size()
19node =    pypar.Get_processor_name()
20
21print "I am processor %d of %d on node %s" %(myid, numproc, node)
22if myid == 0:
23    print 'Maximal tag is %d' %pypar.max_tag
24pypar.Finalize()
25
Note: See TracBrowser for help on using the repository browser.