Changeset 8491


Ignore:
Timestamp:
Aug 5, 2012, 5:44:40 PM (13 years ago)
Author:
steve
Message:

Just added output for all processors

File:
1 edited

Legend:

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

    r8490 r8491  
    9393        print 'Process ID %g' %myid
    9494        print 'Number of triangles %g ' %domain.get_number_of_triangles()
    95 
     95        sys.stdout.flush()
     96       
    9697    barrier()
    9798
     
    101102if myid == 0:
    102103    domain.print_algorithm_parameters()
    103 
     104    sys.stdout.flush()
     105   
    104106barrier()
    105107
     
    119121    if myid == p:
    120122        print domain.boundary_statistics()
    121 
     123        sys.stdout.flush()
     124       
    122125    barrier()
    123126
     
    145148barrier()
    146149
    147 if myid == 0:
    148     import pstats
    149     p = pstats.Stats(prof_file)
    150     #p.sort_stats('cumulative').print_stats(25)
     150for id in range(numprocs):
     151    if myid == id:
     152        import pstats
     153        p = pstats.Stats(prof_file)
     154        #p.sort_stats('cumulative').print_stats(25)
     155        p.sort_stats('time').print_stats(25)
     156        sys.stdout.flush
    151157
    152 
    153     p.sort_stats('time').print_stats(25)
    154 
    155 barrier()
    156 
    157 
    158 if myid == 1:
    159     import pstats
    160     p = pstats.Stats(prof_file)
    161     #p.sort_stats('cumulative').print_stats(25)
    162 
    163 
    164     p.sort_stats('time').print_stats(25)
    165 
    166     #p.print_stats()
    167 
    168 # Run evolve loop
    169 #result = profiler.runctx(s, globals(), locals())
    170 
    171 #result.dump_stats("profile." + str(numprocs) + "." + str(myid) + ".dat")
    172 #profiler.close()
     158    barrier()
    173159
    174160barrier()
Note: See TracChangeset for help on using the changeset viewer.