- Timestamp:
- Jan 23, 2012, 4:16:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/mem_time_tests/triangles/serial/main.py
r8303 r8320 15 15 from anuga.utilities import system_tools, log 16 16 from anuga.abstract_2d_finite_volumes.util import add_directories 17 import logAnalyser 17 18 #------------------------------------------------------------------------------ 18 19 # Setup computational domain … … 28 29 file = 'ex1.csv' 29 30 30 log.log_filename = os.path.join(scenariodir, 'log.txt')31 #log.log_filename = os.path.join(scenariodir, 'anuga.log') 31 32 32 33 file_path = os.path.join(scenariodir, file) … … 35 36 spamWriter = csv.writer(open(file_path, 'wb')) 36 37 spamWriter.writerow(['Number Of Triangles' ,'Max Triangle Area', 'Extent', 'Space Used MB' , 'Time Taken s']) 38 outputresource = os.path.join(scenariodir,'test.csv') 37 39 38 40 … … 42 44 while (n > 0): 43 45 c = 2 #random.random() * 2000 + 1 44 system_tools.MemoryUpdate()45 46 z = time.time() 46 47 h = runcairns.runex(c,r) 47 48 y = time.time() 48 49 n = n -1 49 x = system_tools.MemoryUpdate()[0] 50 spamWriter.writerow([h,r,(c*c),x ,(y-z)]) 50 #subprocess.call(['python','timingScript.py',scenariodir,outputresource]) 51 logAnalyser.AnalyseLog() 52 spamWriter.writerow([h,r,(c*c),'x' ,(y-z)]) 51 53 52 54 while (m > 0):
Note: See TracChangeset
for help on using the changeset viewer.