Changeset 8115


Ignore:
Timestamp:
Jan 25, 2011, 5:51:31 PM (14 years ago)
Author:
steve
Message:

Updating a few parallel test

Location:
trunk/anuga_core/source/anuga_parallel
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga_parallel/parallel_abstraction.py

    r8107 r8115  
    55"""
    66
     7class NullStream:
     8    def write(self,text):
     9        pass
     10       
     11
     12
     13
    714try:
    8     import pypar
     15    import sys
     16    sys.stdout = NullStream()
     17    import pypar
     18    sys.stdout = sys.__stdout__
    919except:
    1020    print 'WARNING: Could not import pypar - defining sequential interface'
  • trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py

    r8114 r8115  
    6666
    6767
     68
    6869    def update_ghosts(self):
    6970
  • trunk/anuga_core/source/anuga_parallel/run_parallel_sw_merimbula.py

    r8109 r8115  
    109109
    110110if myid == 0:
     111    print 'Number of processors %g ' %numprocs
    111112    print 'That took %.2f seconds' %(time.time()-t0)
    112113    print 'Communication time %.2f seconds'%domain.communication_time
  • trunk/anuga_core/source/anuga_parallel/test_all.py

    r8011 r8115  
    2020#List files that should be excluded from the testing process.
    2121#E.g. if they are known to fail and under development
    22 exclude_files = ['test_parallel_distribute_domain.py','test_parallel_sw_flow.py']
     22exclude_files = ['test_parallel_distribute_domain.py']
    2323
    2424# Directories that should not be searched for test files.
     
    201201        test_verbose = False
    202202    suite = regressionTest(test_verbose)
    203     runner = unittest.TextTestRunner(verbosity=2)
     203    runner = unittest.TextTestRunner(verbosity=1)
    204204    runner.run(suite)
    205205
  • trunk/anuga_core/source/anuga_parallel/test_parallel_distribute_mesh.py

    r8011 r8115  
    1515from anuga_parallel.distribute_mesh import extract_hostmesh, rec_submesh, send_submesh
    1616
    17 from anuga_parallel.interface import myid, numprocs, barrier, finalize
     17from anuga_parallel import myid, numprocs, barrier, finalize
    1818
    1919import numpy as num
  • trunk/anuga_core/source/anuga_parallel/test_parallel_file_boundary.py

    r8114 r8115  
    5656from anuga import create_domain_from_file
    5757
    58 from anuga_parallel.interface import distribute, myid, numprocs, send, receive, barrier, finalize
     58from anuga_parallel import distribute, myid, numprocs, send, receive, barrier, finalize
    5959
    6060from anuga.file.test_mux import Test_Mux
  • trunk/anuga_core/source/anuga_parallel/test_parallel_sw_flow.py

    r8114 r8115  
    2727
    2828
    29 from anuga_parallel.interface import distribute, myid, numprocs, send, receive, barrier, finalize
     29from anuga_parallel import distribute, myid, numprocs, send, receive, barrier, finalize
    3030
    3131#--------------------------------------------------------------------------
     
    3535finaltime = 6.0
    3636nprocs = 4
    37 N = 25
    38 M = 25
    39 verbose = True
     37N = 29
     38M = 29
     39verbose = False
    4040
    4141#---------------------------------
     
    4848# Setup Test
    4949##########################################################################
    50 def evolution_test(parallel=False, G = None, seq_interpolation_points=None):
     50def evolution_test(parallel=False, G = None, seq_interpolation_points=None, verbose=False):
    5151
    5252    #--------------------------------------------------------------------------
     
    103103
    104104        #if is_inside_polygon(point, domain.get_boundary_polygon()):
     105        #print "Point ", myid, i, point
    105106        try:
    106107            k = domain.get_triangle_containing_point(point)
     
    112113            tri_ids.append(-2)
    113114
    114 
     115        #print "  tri_ids ",myid, i, tri_ids[-1]
     116               
    115117    if verbose: print 'P%d has points = %s' %(myid, tri_ids)
    116118
     
    120122    for id in tri_ids:
    121123        if id<1:
    122             print 'ERROR: All interpolation points be within the sequential domain!'
     124            if verbose: print 'WARNING: Interpolation point not within the domain!'
    123125        interpolation_points.append(c_coord[id,:])
    124126           
     
    170172class Test_parallel_sw_flow(unittest.TestCase):
    171173    def test_parallel_sw_flow(self):
    172         print "Expect this test to fail if not run from the parallel directory."
     174        if verbose : print "Expect this test to fail if not run from the parallel directory."
    173175        result = os.system("mpirun -np %d python test_parallel_sw_flow.py" % nprocs)
    174176        assert_(result == 0)
Note: See TracChangeset for help on using the changeset viewer.