Changeset 8115
- Timestamp:
- Jan 25, 2011, 5:51:31 PM (14 years ago)
- 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 5 5 """ 6 6 7 class NullStream: 8 def write(self,text): 9 pass 10 11 12 13 7 14 try: 8 import pypar 15 import sys 16 sys.stdout = NullStream() 17 import pypar 18 sys.stdout = sys.__stdout__ 9 19 except: 10 20 print 'WARNING: Could not import pypar - defining sequential interface' -
trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py
r8114 r8115 66 66 67 67 68 68 69 def update_ghosts(self): 69 70 -
trunk/anuga_core/source/anuga_parallel/run_parallel_sw_merimbula.py
r8109 r8115 109 109 110 110 if myid == 0: 111 print 'Number of processors %g ' %numprocs 111 112 print 'That took %.2f seconds' %(time.time()-t0) 112 113 print 'Communication time %.2f seconds'%domain.communication_time -
trunk/anuga_core/source/anuga_parallel/test_all.py
r8011 r8115 20 20 #List files that should be excluded from the testing process. 21 21 #E.g. if they are known to fail and under development 22 exclude_files = ['test_parallel_distribute_domain.py' ,'test_parallel_sw_flow.py']22 exclude_files = ['test_parallel_distribute_domain.py'] 23 23 24 24 # Directories that should not be searched for test files. … … 201 201 test_verbose = False 202 202 suite = regressionTest(test_verbose) 203 runner = unittest.TextTestRunner(verbosity= 2)203 runner = unittest.TextTestRunner(verbosity=1) 204 204 runner.run(suite) 205 205 -
trunk/anuga_core/source/anuga_parallel/test_parallel_distribute_mesh.py
r8011 r8115 15 15 from anuga_parallel.distribute_mesh import extract_hostmesh, rec_submesh, send_submesh 16 16 17 from anuga_parallel .interfaceimport myid, numprocs, barrier, finalize17 from anuga_parallel import myid, numprocs, barrier, finalize 18 18 19 19 import numpy as num -
trunk/anuga_core/source/anuga_parallel/test_parallel_file_boundary.py
r8114 r8115 56 56 from anuga import create_domain_from_file 57 57 58 from anuga_parallel .interfaceimport distribute, myid, numprocs, send, receive, barrier, finalize58 from anuga_parallel import distribute, myid, numprocs, send, receive, barrier, finalize 59 59 60 60 from anuga.file.test_mux import Test_Mux -
trunk/anuga_core/source/anuga_parallel/test_parallel_sw_flow.py
r8114 r8115 27 27 28 28 29 from anuga_parallel .interfaceimport distribute, myid, numprocs, send, receive, barrier, finalize29 from anuga_parallel import distribute, myid, numprocs, send, receive, barrier, finalize 30 30 31 31 #-------------------------------------------------------------------------- … … 35 35 finaltime = 6.0 36 36 nprocs = 4 37 N = 2 538 M = 2 539 verbose = True37 N = 29 38 M = 29 39 verbose = False 40 40 41 41 #--------------------------------- … … 48 48 # Setup Test 49 49 ########################################################################## 50 def evolution_test(parallel=False, G = None, seq_interpolation_points=None ):50 def evolution_test(parallel=False, G = None, seq_interpolation_points=None, verbose=False): 51 51 52 52 #-------------------------------------------------------------------------- … … 103 103 104 104 #if is_inside_polygon(point, domain.get_boundary_polygon()): 105 #print "Point ", myid, i, point 105 106 try: 106 107 k = domain.get_triangle_containing_point(point) … … 112 113 tri_ids.append(-2) 113 114 114 115 #print " tri_ids ",myid, i, tri_ids[-1] 116 115 117 if verbose: print 'P%d has points = %s' %(myid, tri_ids) 116 118 … … 120 122 for id in tri_ids: 121 123 if id<1: 122 print 'ERROR: All interpolation points be within the sequentialdomain!'124 if verbose: print 'WARNING: Interpolation point not within the domain!' 123 125 interpolation_points.append(c_coord[id,:]) 124 126 … … 170 172 class Test_parallel_sw_flow(unittest.TestCase): 171 173 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." 173 175 result = os.system("mpirun -np %d python test_parallel_sw_flow.py" % nprocs) 174 176 assert_(result == 0)
Note: See TracChangeset
for help on using the changeset viewer.