- Timestamp:
- Feb 10, 2012, 10:34:08 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/mem_time_tests/scenarios/vel2/ex1.py
r8328 r8331 14 14 15 15 home = os.getenv('INUNDATIONHOME') 16 scenariodir = add_directories(home, ["data","mem_time_test", "scenarios",17 "velocity"])18 16 scenariodirV = add_directories(home, ["data","mem_time_test", "scenarios", 19 17 "velocity", "velocity-" + str(k) +"-"+ str(l)]) 20 18 21 store = 'store.txt' 22 store_path = os.path.join(scenariodir, store) 19 log.timingInfo(msg=('variable1,'+str(k))) #write the variable to be measured to file 20 log.timingInfo(msg=('variable2,'+str(l))) #write the variable to be measured to file 21 log.timingInfo(msg=('beforetime,'+str(log.TimeStamp()))) #get the time at the beginning of the simulation 23 22 24 23 log.log_filename = os.path.join(scenariodirV, "anuga.log") 25 24 log._setup = False 26 25 27 log.resource_usage_timing(prefix = ' BeforeSimulation') #get memory usage26 log.resource_usage_timing(prefix = 'beforesimulation') #get memory usage 28 27 #------------------------------------------------------------------------------ 29 28 # Setup computational domain … … 34 33 domain.set_datadir(scenariodirV) 35 34 36 log.resource_usage_timing(prefix = ' AfterMesh') #get memory usage35 log.resource_usage_timing(prefix = 'aftermesh') #get memory usage 37 36 38 37 #get the number of triangles 39 38 number = len(domain) 39 log.timingInfo(msg=('variable3,'+str(number))) #write the variable to be measured to file 40 40 41 41 #-------------------------------------------------------------------------- … … 67 67 68 68 log.resource_usage_timing(prefix='aftersimulation') #get memory usage 69 70 #write the number of triangles to the file 71 c = open(store_path,'r+') 72 c.write(str(number)) 69 log.timingInfo(msg=('aftertime,'+str(log.TimeStamp()))) #get the time at the end of the simulation
Note: See TracChangeset
for help on using the changeset viewer.