Changeset 3628
- Timestamp:
- Sep 20, 2006, 11:03:02 AM (18 years ago)
- Location:
- anuga_core/source/anuga_parallel
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga_parallel/parallel_api.py
r3624 r3628 5 5 6 6 # Parallelism 7 import pypar # The Python-MPI interface 7 # The Python-MPI interface 8 from pypar import size, rank, get_processor_name, finalize, send, receive 9 from anuga_parallel.parallel_abstraction import size, rank, get_processor_name, finalize #,send, receive 8 10 from anuga_parallel.pmesh_divide import pmesh_divide_metis 9 11 from anuga_parallel.build_submesh import build_submesh … … 17 19 #------------------------------------------------------------------------------ 18 20 19 numprocs = pypar.size()20 myid = pypar.rank()21 processor_name = pypar.Get_processor_name()21 numprocs = size() 22 myid = rank() 23 processor_name = get_processor_name() 22 24 print 'I am processor %d of %d on node %s' %(myid, numprocs, processor_name) 23 25 … … 37 39 38 40 for p in range(1, numprocs): 39 pypar.send((domain_name, domain_dir), p)41 send((domain_name, domain_dir), p) 40 42 else: 41 43 if verbose: print 'P%d: Receiving domain attributes' %(myid) 42 44 43 domain_name, domain_dir = pypar.receive(0)45 domain_name, domain_dir = receive(0) 44 46 45 47 … … 51 53 boundary_map = domain.boundary_map 52 54 for p in range(1, numprocs): 53 pypar.send(boundary_map, p)55 send(boundary_map, p) 54 56 else: 55 57 if verbose: print 'P%d: Receiving boundary map' %(myid) 56 58 57 boundary_map = pypar.receive(0)59 boundary_map = receive(0) 58 60 59 61
Note: See TracChangeset
for help on using the changeset viewer.