Changeset 8489
- Timestamp:
- Aug 5, 2012, 12:36:26 PM (12 years ago)
- Location:
- trunk/anuga_core/source/anuga_parallel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_parallel/parallel_generic_communications.py
r8455 r8489 43 43 #Determine minimum timestep across all processors 44 44 pypar.reduce(domain.local_timestep, pypar.MIN, 0, 45 buffer=domain.global_timestep)#, 46 #bypass=True) 45 buffer=domain.global_timestep, 46 bypass=True) 47 48 #pypar.allreduce(domain.local_timestep, pypar.MIN, 49 # buffer=domain.global_timestep, 50 # bypass=True) 47 51 48 52 domain.communication_reduce_time += time.time()-t0 … … 51 55 #Broadcast minimal timestep to all processors 52 56 t0 = time.time() 53 pypar.broadcast(domain.global_timestep, 0)#, 54 #bypass=True) 57 pypar.broadcast(domain.global_timestep, 0, bypass=True) 55 58 56 59 domain.communication_broadcast_time += time.time()-t0 57 60 58 old_ timestep = domain.flux_timestep61 old_fux_timestep = domain.flux_timestep 59 62 domain.flux_timestep = domain.global_timestep[0] 60 63 61 64 62 #Compute minimal timestep on local process63 #Domain.update_timestep(domain, yieldstep, finaltime)64 65 65 66 66 def communicate_ghosts(domain): … … 90 90 Xout[:,i] = num.take(Q_cv, Idf) 91 91 92 pypar.send(Xout, int(send_proc), use_buffer=True )92 pypar.send(Xout, int(send_proc), use_buffer=True, bypass=True) 93 93 94 94 … … 100 100 X = domain.ghost_recv_dict[iproc][2] 101 101 102 X = pypar.receive(int(iproc), buffer=X )102 X = pypar.receive(int(iproc), buffer=X, bypass=True) 103 103 104 104 for i, q in enumerate(domain.conserved_quantities): -
trunk/anuga_core/source/anuga_parallel/run_parallel_sw_merimbula_profile.py
r8418 r8489 8 8 where m is the number of processors to be used. 9 9 10 Will produce sww files with names domain_Pn_m.sww where mis number of processors and11 n in [0, m-1] refers to specific processor that owned this part of the partitioned mesh.10 Will produce sww files with names domain_Pn_m.sww where n is number of processors and 11 m in [0, n-1] refers to specific processor that owned this part of the partitioned mesh. 12 12 """ 13 13 … … 46 46 #mesh_filename = "test-100.tsh" ; x0 = 0.25 ; x1 = 0.5 47 47 48 finaltime = 50 49 yieldstep = finaltime48 finaltime = 500 49 yieldstep = 50 50 50 verbose = True 51 51 … … 82 82 83 83 #domain.smooth = False 84 for id in range(numprocs): 85 if myid == id: 86 print 'Process ID %g' %myid 87 print 'Number of triangles %g ' %domain.get_number_of_triangles() 88 89 barrier() 84 90 85 91 … … 128 134 129 135 136 barrier() 137 130 138 if myid == 0: 131 139 import pstats 132 140 p = pstats.Stats(prof_file) 133 p.sort_stats('cumulative').print_stats(25)141 #p.sort_stats('cumulative').print_stats(25) 134 142 135 143 136 144 p.sort_stats('time').print_stats(25) 137 145 146 barrier() 138 147 148 149 if myid == 1: 150 import pstats 151 p = pstats.Stats(prof_file) 152 #p.sort_stats('cumulative').print_stats(25) 153 154 155 p.sort_stats('time').print_stats(25) 139 156 140 157 #p.print_stats() … … 146 163 #profiler.close() 147 164 148 165 barrier() 149 166 150 167 if myid == 0: 168 print 'Process ID %g' %myid 169 print 'Number of processors %g ' %numprocs 170 print 'That took %.2f seconds' %(time.time()-t0) 171 print 'Communication time %.2f seconds'%domain.communication_time 172 print 'Reduction Communication time %.2f seconds'%domain.communication_reduce_time 173 print 'Broadcast time %.2f seconds'%domain.communication_broadcast_time 174 175 barrier() 176 177 if myid == 1: 178 print 'Process ID %g' %myid 151 179 print 'Number of processors %g ' %numprocs 152 180 print 'That took %.2f seconds' %(time.time()-t0) … … 156 184 157 185 186 158 187 finalize() 159 188
Note: See TracChangeset
for help on using the changeset viewer.