Changeset 3776
- Timestamp:
- Oct 13, 2006, 2:43:30 PM (18 years ago)
- Location:
- anuga_core/source/anuga_parallel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga_parallel/parallel_abstraction.py
r3628 r3776 36 36 return time.time() 37 37 38 #def send(*args, **kwargs):39 #pass38 def send(*args, **kwargs): 39 pass 40 40 41 #def receive(*args, **kwargs):42 #pass41 def receive(*args, **kwargs): 42 pass 43 43 44 pypar_available = False 44 45 else: 45 46 from pypar import * 47 pypar_available = True -
anuga_core/source/anuga_parallel/parallel_api.py
r3635 r3776 5 5 6 6 # Parallelism 7 # The Python-MPI interface 8 from pypar import size, rank, get_processor_name, finalize, send, receive 9 #from anuga_parallel.parallel_abstraction import size, rank, get_processor_name, finalize #,send, receive 7 8 # The abstract Python-MPI interface 9 from anuga_parallel.parallel_abstraction import size, rank, get_processor_name 10 from anuga_parallel.parallel_abstraction import finalize, send, receive 11 from anuga_parallel.parallel_abstraction import pypar_available 12 13 # Mesh partitioning 10 14 from anuga_parallel.pmesh_divide import pmesh_divide_metis 11 15 from anuga_parallel.build_submesh import build_submesh 12 16 from anuga_parallel.build_local import build_local_mesh 13 from anuga_parallel.build_commun import send_submesh, rec_submesh, extract_hostmesh 14 from anuga_parallel.parallel_shallow_water import Parallel_Domain 17 18 # ANUGA parallel engine (only load if pypar can) 19 if pypar_available: 20 from anuga_parallel.build_commun import send_submesh 21 from anuga_parallel.build_commun import rec_submesh 22 from anuga_parallel.build_commun import extract_hostmesh 23 from anuga_parallel.parallel_shallow_water import Parallel_Domain 15 24 16 25 … … 30 39 """ Distribute the domain to all processes 31 40 """ 41 42 if not pypar_available: return domain # Bypass 32 43 33 44 # For some obscure reason this communication must happen prior to -
anuga_core/source/anuga_parallel/test_parallel_sw_runup.py
r3775 r3776 92 92 print time 93 93 print 94 for i, _in enumerate(interpolation_points):94 for i, (x,y) in enumerate(interpolation_points): 95 95 print i, gauge_values[i] 96 96 print 97 97 98 98 99 try: 100 from pylab import * 101 except: 102 pass 103 else: 104 ion() 105 hold(False) 106 plot(time, gauge_values[i], 'r.-') 107 #time, predicted_gauge_values[i], 'k-') 108 109 title('Gauge %d (%f,%f)' %(i,x,y)) 110 xlabel('time(s)') 111 ylabel('stage (m)') 112 #legend(('Observed', 'Modelled'), shadow=True, loc='upper left') 113 #savefig('Gauge_%d.png' %i, dpi = 300) 114 115 raw_input('Next') 116 117 118
Note: See TracChangeset
for help on using the changeset viewer.