Changeset 1550
- Timestamp:
- Jun 28, 2005, 3:19:07 PM (19 years ago)
- Location:
- inundation/ga/storm_surge/parallel
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/parallel/run_parallel_mesh.py
r1520 r1550 1 1 #!/usr/bin/env python 2 2 ######################################################### 3 # 3 # 4 4 # Main file for parallel mesh testing. 5 # 5 # 6 6 # This is a modification of the run_parallel_advection.py 7 7 # file. … … 12 12 # required to build the grid, i.e. a higher number 13 13 # corresponds to a finer grid. The term infront of the c 14 # corresponds to the number of processors. 14 # corresponds to the number of processors. 15 15 # 16 16 # *) The (new) files that have been added to manage the … … 44 44 # 45 45 # 46 # 46 # 47 47 ######################################################### 48 48 … … 101 101 print 'after trace' 102 102 103 103 104 if myid == 0: 104 105 105 106 # read in the test files 106 107 f=open('test_3l_ 1c.out', 'r')107 108 f=open('test_3l_2c.out', 'r') 108 109 [nodes, triangles, boundary, triangles_per_proc] = mg2ga(f) 109 110 110 111 # subdivide the mesh 111 112 112 113 submesh = build_submesh(nodes, triangles, boundary, triangles_per_proc) 113 114 114 115 # send the mesh partition to the appropriate processor 115 116 116 117 for p in range(numprocs): 117 118 send_submesh(submesh, triangles_per_proc, tagmap, p) … … 120 121 # processor (note that the information is in the 121 122 # correct form for the GA data structure 122 123 123 124 124 [points, vertices, boundary, ghost_recv_dict, full_send_dict] = rec_submesh(tagmap, 0) … … 131 131 # start the initialisation routines 132 132 133 #rect = [ 0.0, 0.0, 1.0, 1.0]134 133 domain.initialise_visualiser() 135 #domain.visualise= True136 134 #domain.visualise=False 135 137 136 #Boundaries 138 137 … … 162 161 import time 163 162 t0 = time.time() 164 165 166 163 for t in domain.evolve(yieldstep = 0.1, finaltime = 2.0): 167 164 if myid == 0: 168 domain.write_time() 169 170 165 domain.write_time() 171 166 if myid == 0: 172 167 print 'That took %.2f seconds' %(time.time()-t0) … … 174 169 print 'Reduction Communication time %.2f seconds'%domain.communication_reduce_time 175 170 176 171 177 172 print "`````````````````````````````" 178 173 pypar.finalize()
Note: See TracChangeset
for help on using the changeset viewer.