Ignore:
Timestamp:
Oct 19, 2006, 6:21:11 PM (18 years ago)
Author:
ole
Message:

Retired modify_boundary (now rolled into set_boundary).
Got okushiri_parallel to run correctly and timed the speedup (6.5 on 8 procs)

File:
1 edited

Legend:

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

    r3818 r3829  
    2828from anuga.shallow_water import Transmissive_boundary
    2929
    30 from parallel_api import distribute, myid
     30from parallel_api import distribute, myid, numprocs
    3131
    3232
     
    3636points, vertices, boundary = rectangular_cross(10, 10) # Basic mesh
    3737domain = Domain(points, vertices, boundary) # Create domain
    38 domain.set_name('runup')                    # Set sww filename
    39 domain.set_datadir('.')                     # Set output dir
    40 
    4138
    4239#--------------------------------------------------------------------------
     
    5855domain = distribute(domain, verbose=True)
    5956
     57domain.set_name('runup')                    # Set sww filename
     58domain.set_datadir('.')                     # Set output dir
     59domain.set_maximum_allowed_speed(100)       #
     60
    6061
    6162#------------------------------------------------------------------------------
    62 # Setup boundary conditions (MUST currently happen after domain has been distributed)
     63# Setup boundary conditions
     64# This must currently happen *after* domain has been distributed
    6365#------------------------------------------------------------------------------
    6466
     
    6769
    6870# Associate boundary tags with boundary objects
    69 domain.modify_boundary({'left': Br, 'right': Bd, 'top': Br, 'bottom': Br})
     71domain.set_boundary({'left': Br, 'right': Bd, 'top': Br, 'bottom': Br})
     72
    7073
    7174
     
    8588        # Need to get true boundary somehow
    8689       
    87         print 'P%d: point=[%f,%f]' %(myid, point[0], point[1])
     90        #print 'P%d: point=[%f,%f]' %(myid, point[0], point[1])
    8891        local_interpolation_points.append(i)
     92
     93# Hack
     94if numprocs == 2:
     95    if myid == 0:
     96        del local_interpolation_points[0]               
     97        #local_interpolation_points = [1,2,3]
     98
     99if numprocs == 3:
     100    if myid == 1:
     101        del local_interpolation_points[0]
     102
     103
     104if numprocs == 4:
     105    if myid == 0:
     106        del local_interpolation_points[1] #2
     107        del local_interpolation_points[1] #3               
     108    if myid == 3:
     109        del local_interpolation_points[1]
     110
     111
     112
     113print 'P%d has points = %s' %(myid, local_interpolation_points)
    89114
    90115
Note: See TracChangeset for help on using the changeset viewer.