Changeset 3434


Ignore:
Timestamp:
Jul 31, 2006, 9:29:00 PM (18 years ago)
Author:
steve
Message:

Update import pypar in run_parallel_sw_merimbula_test.py

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • development/cairns_2006/cairns_project.py

    r2229 r3434  
    33
    44bathymetry_filename = 'cairns_meters.xya'
     5mesh_filename = 'cairns_mesh.msh'
  • development/cairns_2006/create_mesh.py

    r2312 r3434  
    77
    88from pmesh.mesh import *
    9 from pyvolution.coordinate_transforms.geo_reference import Geo_reference
     9from coordinate_transforms.geo_reference import Geo_reference
    1010from conversion import convert_latlon_to_xycoords
    1111
     
    166166    m.generateMesh('pzq28.0z')
    167167
    168     import project
     168    import cairns_project as project
    169169    m.export_mesh_file(project.mesh_filename)
    170170   
  • development/cairns_2006/run_cairns.py

    r2312 r3434  
    1515from pyvolution.pmesh2domain import pmesh_to_domain_instance
    1616from Numeric import array, zeros, Float, allclose
    17 #import cairns_project
    18 import project
     17import cairns_project as project
     18#import project
    1919from caching import cache
    2020from utilities.polygon import read_polygon, Polygon_function
  • inundation/parallel/build_commun.py

    r3429 r3434  
    2929import sys
    3030
    31 from pypar_dist import pypar
    32 #import pypar
     31import pypar
    3332
    3433from build_local import build_local_mesh
  • inundation/parallel/parallel_shallow_water.py

    r3431 r3434  
    3030from Numeric import zeros, Float, Int, ones, allclose, array
    3131
    32 from pypar_dist import pypar
     32import pypar
    3333
    3434
  • inundation/parallel/print_stats.py

    r3429 r3434  
    1919import sys
    2020
    21 from pypar_dist import pypar
     21import pypar
    2222
    2323from Numeric import array, Int8, zeros, ones, take, nonzero, Float
  • inundation/parallel/run_parallel_sw_merimbula_test.py

    r3429 r3434  
    3636#########################################################
    3737import sys
    38 from pypar_dist import pypar    # The Python-MPI interface
     38import pypar    # The Python-MPI interface
    3939import time
    4040
     
    180180
    181181try:
    182     domain.initialise_visualiser(rect=rect)
     182    #domain.initialise_visualiser(rect=rect)
    183183    #domain.visualiser.coloring['stage'] = True
    184     domain.visualiser.scale_z['stage'] = 0.2
    185     domain.visualiser.scale_z['elevation'] = 0.05
     184    #domain.visualiser.scale_z['stage'] = 0.2
     185    #domain.visualiser.scale_z['elevation'] = 0.05
     186    pass
    186187except:
    187188    print 'No visualiser'
     189
    188190
    189191
     
    213215
    214216yieldstep = 1
    215 finaltime = 90
     217finaltime = None
    216218
    217219#yieldstep = 1
     
    231233#result.dump_stats("profile." + str(numprocs) + "." + str(myid) + ".dat")
    232234
    233 #New hotshot profiling
    234 import hotshot
    235 profiler = hotshot.Profile("hotshot." + str(numprocs) + "." + str(myid) + ".prof")
    236 s = '''for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):
    237   if myid == 0:
    238     domain.write_time()
    239   print_test_stats(domain, tri_full_flag)
    240 
    241 '''
    242 result = profiler.runctx(s, globals(), locals())
    243 profiler.close()
     235## #New hotshot profiling
     236## import hotshot
     237## profiler = hotshot.Profile("hotshot." + str(numprocs) + "." + str(myid) + ".prof")
     238## s = '''for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):
     239##   if myid == 0:
     240##     domain.write_time()
     241##   print_test_stats(domain, tri_full_flag)
     242
     243## '''
     244## result = profiler.runctx(s, globals(), locals())
     245## profiler.close()
     246
     247from vtk_realtime_visualiser import Visualiser
     248V = Visualiser(domain,default_scale_z=100.0)
     249V.coloring['stage'] = True
     250V.coloring['elevation'] = False
     251V.setup['elevation']=True
     252V.updating['stage']=True
     253V.qcolor['stage'] = (0.1,0.4,0.99)
     254
     255
     256V.start()
     257V.idle.wait()
     258V.idle.clear()
     259
     260
     261
     262
     263
     264for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):
     265    if myid == 0:
     266        domain.write_time()
     267        #print_test_stats(domain, tri_full_flag)
     268
     269    V.redraw_ready.set()
     270    V.idle.wait()
     271    V.idle.clear()
     272    V.unpaused.wait()
     273
    244274
    245275#print 'P%d: That took %.2f seconds' %(myid, time.time()-t0)
Note: See TracChangeset for help on using the changeset viewer.