Changeset 8511


Ignore:
Timestamp:
Aug 13, 2012, 9:03:16 PM (13 years ago)
Author:
steve
Message:

Looks like pypar_extras is working with all_reduce

Location:
trunk/anuga_core/source/anuga_parallel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga_parallel/parallel_generic_communications.py

    r8498 r8511  
    4444   
    4545    if allreduce:
    46         pypar.allreduce(domain.local_timestep, pypar.MIN,
     46        import anuga_parallel.pypar_extras as par_extras
     47        par_extras.allreduce(domain.local_timestep, pypar.MIN,
    4748                      buffer=domain.global_timestep,
    4849                      bypass=True)
  • trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py

    r8498 r8511  
    6363            self.number_of_full_nodes_tmp = number_of_full_nodes
    6464        else:
    65             self.number_of_full_nodes_tmp = get_number_of_nodes()
     65            self.number_of_full_nodes_tmp = self.get_number_of_nodes()
    6666
    6767        if number_of_full_triangles is not None:
    6868            self.number_of_full_triangles_tmp = number_of_full_triangles
    6969        else:
    70             self.number_of_full_triangles_tmp = get_number_of_triangles()
     70            self.number_of_full_triangles_tmp = self.get_number_of_triangles()
    7171
    7272        setup_buffers(self)
  • trunk/anuga_core/source/anuga_parallel/pypar_extras/source/setup.py

    r8510 r8511  
    181181
    182182
    183     setup(name='Pypar',
     183    setup(name='Pypar_extras',
    184184          version=__version__,
    185185          description='Extension to Pypar - Parallel Python',
  • trunk/anuga_core/source/anuga_parallel/run_parallel_sw_rectangular_cross_profile.py

    r8497 r8511  
    132132
    133133t0 = time.time()
    134 finaltime = 2.0
    135 yieldstep = 0.5
     134finaltime = 0.25
     135yieldstep = 0.05
    136136
    137 s = """
    138137for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime):
    139138    if myid == 0:
    140139        domain.write_time()
    141 """
    142140
    143141
    144 # Profiling
    145 import cProfile
    146 prof_file = 'evolve-prof'+ str(numprocs) + '_' + str(myid) + '.dat'
    147 cProfile.run(s,prof_file)
     142
     143## Profiling
     144#import cProfile
     145#prof_file = 'evolve-prof'+ str(numprocs) + '_' + str(myid) + '.dat'
     146#cProfile.run(s,prof_file)
    148147
    149148
    150149barrier()
    151150
    152 for id in range(numprocs):
    153     if myid == id:
    154         import pstats
    155         p = pstats.Stats(prof_file)
    156         #p.sort_stats('cumulative').print_stats(25)
    157         p.sort_stats('time').print_stats(25)
    158         sys.stdout.flush
    159 
    160     barrier()
    161 
    162 barrier()
     151#for id in range(numprocs):
     152#    if myid == id:
     153#        import pstats
     154#        p = pstats.Stats(prof_file)
     155#        #p.sort_stats('cumulative').print_stats(25)
     156#        p.sort_stats('time').print_stats(25)
     157#        sys.stdout.flush
     158#
     159#    barrier()
     160#
     161#barrier()
    163162
    164163for p in range(numprocs):
Note: See TracChangeset for help on using the changeset viewer.