Changeset 2850
- Timestamp:
- May 11, 2006, 4:10:50 PM (19 years ago)
- Location:
- inundation/parallel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/parallel/pmesh_divide.py
r2769 r2850 20 20 from math import floor 21 21 22 from Numeric import zeros, Float, Int, reshape, argsort 22 from Numeric import zeros, Float, Int, reshape, argsort, ArrayType 23 23 24 24 … … 116 116 117 117 # The 1 here is for triangular mesh elements. 118 119 118 edgecut, epart, npart = partMeshNodal(n_tri, n_vert, t_list, 1, n_procs) 120 119 # print edgecut … … 123 122 del edgecut 124 123 del npart 124 125 # Sometimes (usu. on x86_64), partMeshNodal returnes an array of zero 126 # dimensional arrays. Correct this. 127 if type(epart[0]) == ArrayType: 128 epart_new = zeros(len(epart), Int) 129 for i in range(len(epart)): 130 epart_new[i] = epart[i][0] 131 epart = epart_new 132 del epart_new 125 133 # Assign triangles to processes, according to what metis told us. 126 134 -
inundation/parallel/test_parallel_sw.py
r2777 r2850 5 5 # Tested with MPICH. 6 6 7 mesh_filename = "merimbula_10785.tsh" 7 #mesh_filename = "test-100.tsh" 8 mesh_filename= "merimbula_10785_1.tsh" 8 9 yieldstep = 1 9 finaltime = 6010 finaltime = 90 10 11 quantity = 'stage' 11 12 nprocs = 8 … … 59 60 60 61 domain_full.set_quantity('stage', Set_Stage(756000.0, 756500.0, 2.0)) 62 #domain_full.set_quantity('stage', Set_Stage(200.0,300.0,1.0)) 61 63 domain_full.check_integrity() 62 64 domain_full.smooth = False … … 179 181 def testParallelSw(self): 180 182 print "Expect this test to fail if not run from the parallel directory." 181 result = os.system("mpirun -np %d test_parallel_sw.py" % nprocs)182 assert result == 0183 result = os.system("mpirun -np %d python test_parallel_sw.py" % nprocs) 184 assert_(result == 0) 183 185 184 186 # Because we are doing assertions outside of the TestCase class … … 186 188 def assert_(condition, msg="Assertion Failed"): 187 189 if condition == False: 190 pypar.finalize() 188 191 raise AssertionError, msg 189 192
Note: See TracChangeset
for help on using the changeset viewer.