Ignore:
Timestamp:
Oct 13, 2006, 2:43:30 PM (18 years ago)
Author:
ole
Message:

Made parallel abstraction work on sequential machine without pypar.
Work on simple parallel example (plotting)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga_parallel/parallel_api.py

    r3635 r3776  
    55
    66# Parallelism
    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
     7
     8# The abstract Python-MPI interface
     9from anuga_parallel.parallel_abstraction import size, rank, get_processor_name
     10from anuga_parallel.parallel_abstraction import finalize, send, receive
     11from anuga_parallel.parallel_abstraction import pypar_available
     12
     13# Mesh partitioning
    1014from anuga_parallel.pmesh_divide  import pmesh_divide_metis
    1115from anuga_parallel.build_submesh import build_submesh
    1216from anuga_parallel.build_local   import build_local_mesh
    13 from anuga_parallel.build_commun  import send_submesh, rec_submesh, extract_hostmesh
    14 from anuga_parallel.parallel_shallow_water import Parallel_Domain
     17
     18# ANUGA parallel engine (only load if pypar can)
     19if pypar_available:
     20    from anuga_parallel.build_commun  import send_submesh
     21    from anuga_parallel.build_commun  import rec_submesh
     22    from anuga_parallel.build_commun  import extract_hostmesh
     23    from anuga_parallel.parallel_shallow_water import Parallel_Domain
    1524
    1625
     
    3039    """ Distribute the domain to all processes
    3140    """
     41
     42    if not pypar_available: return domain # Bypass
    3243
    3344    # For some obscure reason this communication must happen prior to
Note: See TracChangeset for help on using the changeset viewer.