Changeset 8310


Ignore:
Timestamp:
Jan 19, 2012, 1:05:43 PM (13 years ago)
Author:
pittj
Message:

again updating the resource experiment python scripts

Location:
trunk/anuga_work/development/mem_time_tests/triangles/area
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/mem_time_tests/triangles/area/main.py

    r8303 r8310  
    1111import os
    1212import time
     13import liststore
    1314from anuga.utilities import system_tools, log
    1415from anuga.abstract_2d_finite_volumes.util import add_directories
     
    2122#SpaceUsed = 0.0
    2223#number = 0
    23 spacelist = [0,0,0,0]
    2424
    25 home = os.getenv('INUNDATIONHOME')
    26 scenariodir = add_directories(home, ["data","mem_time_test", "triangles","area"])
    27 file = 'ex1.csv'
    28 file_path = os.path.join(scenariodir, file)
     25home1 = os.getenv('INUNDATIONHOME')
     26scenariodir = add_directories(home1, ["data","mem_time_test", "triangles","area"])
     27file1 = 'ex1.csv'
     28file_path = os.path.join(scenariodir, file1)
    2929storel ='storel.txt'
    3030file_path_storel = os.path.join(scenariodir, storel)
     
    3636file_path_storen = os.path.join(scenariodir, storen)
    3737
     38log.log_filename = os.path.join(scenariodir, 'log.txt')
     39
    3840spamWriter = csv.writer(open(file_path, 'wb'))
    3941spamWriter.writerow(['Number Of Triangles' ,'Max Triangle Area', 'Extent', 'Space Used MB' , 'Time Taken s'])
     
    4244def rum(d):
    4345     f = 4
    44      for l in range(1,2000,100):
     46     for l in range(100,2000,100):
    4547       
    4648        g = open(file_path_storel,'r+')
     
    5153
    5254        z = time.time()
    53         subprocess.call(['mpirun', '-np', str(f), '-hostfile' ,'~/machinefiles/t.machines_tornado', '-x', 'PYTHONPATH','python2.5', 'runcairns.py'])
     55        subprocess.call(['mpirun', '-np', str(f), '-hostfile' ,'~/machinefiles/t.machines_tornado', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.5', 'runcairns.py'])
     56        #subprocess.call(['python2.5', 'runcairns.py'])
    5457        y = time.time()
    5558
    5659        f = open(file_path_store,'r+')
    57         x = 3#float(f.readline())
     60        x = float(f.readline())
    5861        f.close()
    5962
    6063        f = open(file_path_storen,'r+')
    61         i = 3#float(f.readline())
     64        i = float(f.readline())
    6265        f.close()
    6366
    6467        spamWriter.writerow([i,d,(l*l),x ,(y-z)])
    65         spacelist = [0,0,0,0]
     68        liststore.store = [0,0,0,0]
    6669
    67 for m in range(1,100,10):
     70for m in range(90,100,10):
    6871    rum(m)
    6972
  • trunk/anuga_work/development/mem_time_tests/triangles/area/runcairns.py

    r8303 r8310  
    1919import time
    2020import sys
    21 import main
     21import liststore
    2222
    2323# Related major packages
     
    2727from anuga.utilities import system_tools, log
    2828
    29 spacelist = [0,0,0,0]
    3029
    31 #home = os.getenv('INUNDATIONHOME')
    32 scenariodir2 = add_directories(main.home, ["data", "mem_time_test", "triangles", "area"])
     30home2 = os.getenv('INUNDATIONHOME')
     31
     32scenariodir2 = add_directories(home2, ["data", "mem_time_test", "triangles", "area"])
    3333
    3434h = 'CAIRNS.msh'
     
    3939file_path_storen = os.path.join(scenariodir2, storen)
    4040storel = 'storel.txt'
    41 file_path_storel = os.path.join(scenariodir2, store)
    42 storea = 'store.txt'
     41file_path_storel = os.path.join(scenariodir2, storel)
     42storea = 'storea.txt'
    4343file_path_storea = os.path.join(scenariodir2, storea)
    4444
     
    121121   
    122122
    123 spacelist[myid] = system_tools.MemoryUpdate()[0]
    124 a = sum(spacelist)
     123liststore.store[myid] = system_tools.MemoryUpdate()[0]
     124a = sum(liststore.store)
    125125
    126126v = open(file_path_store, 'r+')
Note: See TracChangeset for help on using the changeset viewer.