source: pypar/test_init.py @ 85

Last change on this file since 85 was 85, checked in by ole, 19 years ago

Added pypar files

File size: 534 bytes
RevLine 
[85]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.