Changeset 8320


Ignore:
Timestamp:
Jan 23, 2012, 4:16:46 PM (12 years ago)
Author:
pittj
Message:

adding portability across, tornado, NCI, cyclone and compute 1 to all parrallel scripts

Location:
trunk/anuga_work/development/mem_time_tests
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/mem_time_tests/hardware/cairns/main.py

    r8315 r8320  
    2121#------------------------------------------------------------------------------
    2222a = []
    23 
     23host = os.getenv('HOST')
    2424home1 = os.getenv('INUNDATIONHOME')
    2525scenariodir = add_directories(home1, ["data","mem_time_test", "parallel","cairns"])
     
    3636e.close()
    3737
     38maxcpus = 18
    3839
    39 
    40 for n in range(1,18,1):
     40for n in range(1,maxcpus,1):
    4141    z = time.time()
    4242    y = time.time()
    43     subprocess.call(['mpirun', '-np', str(n), '-hostfile' ,'~/machinefiles/test.machines_cyclone', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.5', 'runcairns.py'])
     43
     44    if (host == 'cyclone.agso.gov.au'):
     45        subprocess.call(['mpirun', '-np', str(n), '-hostfile' ,'~/machinefiles/test.machines_cyclone', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.6', 'runcairns.py'])
     46    if (host == 'tornado.agso.gov.au'):
     47        subprocess.call(['mpirun', '-np', str(n), '-hostfile' ,'~/machinefiles/test.machines_tornado', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.6', 'runcairns.py'])
     48    if (host == 'vayu1'):
     49        subprocess.call(['mpirun', '-np', str(n), '-x','PYTHONPATH','-x','INUNDATIONHOME','python', 'runcairns.py'])
     50    if (host == 'rhe-compute1.ga.gov.au'):
     51        subprocess.call(['mpirun', '-np', str(n), '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.6', 'runcairns.py'])
     52    if (host == 'xe'):
     53        subprocess.call(['mpirun', '-np', str(n), '-x','PYTHONPATH','-x','INUNDATIONHOME','python', 'runcairns.py'])
     54
    4455    liststore.spacelist = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
    4556    f = open(file_path_store,'r+')
  • trunk/anuga_work/development/mem_time_tests/hardware/template/anuga.log

    r8315 r8320  
    1 2012-01-20 08:33:19,932 INFO           anuga.utilities.log:0   |Logfile is './anuga.log' with logging level of INFO, console logging level is CRITICAL
    2 2012-01-20 08:33:19,935 INFO                mesh_interface:90  |Resource usage: memory=331.0MB resident=19.0MB stacksize=0.2MB
    3 2012-01-20 08:33:19,935 INFO                mesh_interface:90  |#@# sys_platform, linux2
    4 2012-01-20 08:33:19,936 INFO                mesh_interface:90  |#@# start_memory, 331.01953125
    5 2012-01-20 08:33:19,937 INFO                mesh_interface:90  |#@# start_resident, 19.08203125
    6 2012-01-20 08:33:19,938 INFO                mesh_interface:90  |#@# start_stacksize, 0.203125
    7 2012-01-20 08:33:19,939 INFO                mesh_interface:91  |#@# maximum_triangle_area, 100.0
    8 2012-01-20 08:33:19,939 INFO                mesh_interface:92  |#@# minimum_triangle_angle, 28.0
    9 2012-01-20 08:33:19,940 INFO                mesh_interface:93  |#@# startMesh, '2012-01-20 08:33:19'
    10 2012-01-20 08:33:19,947 CRITICAL            mesh_interface:346 |Generating mesh to file '/nas/gemd/georisk_models/inundation/data/mem_time_test/triangles/area/cairnsmesh.msh'
    11 2012-01-20 08:33:43,412 CRITICAL              general_mesh:84  |General_mesh: Building basic mesh structure in ANUGA domain
    12 2012-01-20 08:33:43,412 INFO                  general_mesh:86  |#@# numTriangles, 383614
    13 2012-01-20 08:33:50,595 CRITICAL              general_mesh:136 |General_mesh: Computing areas, normals and edgelengths
    14 2012-01-20 08:33:50,630 CRITICAL              general_mesh:140 |(0/383614)
    15 2012-01-20 08:33:58,337 CRITICAL              general_mesh:140 |(38362/383614)
    16 2012-01-20 08:34:06,062 CRITICAL              general_mesh:140 |(76724/383614)
    17 2012-01-20 08:34:13,811 CRITICAL              general_mesh:140 |(115086/383614)
    18 2012-01-20 08:34:21,554 CRITICAL              general_mesh:140 |(153448/383614)
    19 2012-01-20 08:34:29,288 CRITICAL              general_mesh:140 |(191810/383614)
    20 2012-01-20 08:34:37,024 CRITICAL              general_mesh:140 |(230172/383614)
    21 2012-01-20 08:34:44,762 CRITICAL              general_mesh:140 |(268534/383614)
    22 2012-01-20 08:34:52,502 CRITICAL              general_mesh:140 |(306896/383614)
    23 2012-01-20 08:35:00,262 CRITICAL              general_mesh:140 |(345258/383614)
    24 2012-01-20 08:35:08,035 CRITICAL              general_mesh:199 |Building inverted triangle structure
    25 2012-01-20 08:35:22,399 INFO                  general_mesh:202 |#@# aoi, '50000000.0'
    26 2012-01-20 08:35:22,399 CRITICAL            neighbour_mesh:89  |Initialising mesh
    27 2012-01-20 08:35:22,448 CRITICAL            neighbour_mesh:109 |Mesh: Computing centroids and radii
    28 2012-01-20 08:35:22,491 CRITICAL            neighbour_mesh:111 |(0/383614)
    29 2012-01-20 08:35:29,389 CRITICAL            neighbour_mesh:111 |(38362/383614)
    30 2012-01-20 08:35:36,284 CRITICAL            neighbour_mesh:111 |(76724/383614)
    31 2012-01-20 08:35:43,218 CRITICAL            neighbour_mesh:111 |(115086/383614)
    32 2012-01-20 08:35:50,126 CRITICAL            neighbour_mesh:111 |(153448/383614)
    33 2012-01-20 08:35:57,044 CRITICAL            neighbour_mesh:111 |(191810/383614)
    34 2012-01-20 08:36:03,954 CRITICAL            neighbour_mesh:111 |(230172/383614)
    35 2012-01-20 08:36:10,884 CRITICAL            neighbour_mesh:111 |(268534/383614)
    36 2012-01-20 08:36:17,782 CRITICAL            neighbour_mesh:111 |(306896/383614)
    37 2012-01-20 08:36:24,685 CRITICAL            neighbour_mesh:111 |(345258/383614)
    38 2012-01-20 08:36:31,628 CRITICAL            neighbour_mesh:164 |Mesh: Building neigbour structure
    39 2012-01-20 08:37:04,517 CRITICAL            neighbour_mesh:168 |Mesh: Building surrogate neigbour structure
    40 2012-01-20 08:37:08,839 CRITICAL            neighbour_mesh:172 |Mesh: Building boundary dictionary
    41 2012-01-20 08:37:11,887 CRITICAL            neighbour_mesh:179 |Mesh: Building tagged elements dictionary
    42 2012-01-20 08:37:12,387 CRITICAL            neighbour_mesh:195 |Mesh: Done
    43 2012-01-20 08:37:12,388 INFO                neighbour_mesh:196 |#@# finishMesh, '2012-01-20 08:37:12'
    44 2012-01-20 08:37:12,389 INFO                neighbour_mesh:197 |Resource usage: memory=732.3MB resident=420.5MB stacksize=0.2MB
    45 2012-01-20 08:37:12,389 INFO                neighbour_mesh:197 |#@# sys_platform, linux2
    46 2012-01-20 08:37:12,390 INFO                neighbour_mesh:197 |#@# finishMesh_memory, 732.25390625
    47 2012-01-20 08:37:12,390 INFO                neighbour_mesh:197 |#@# finishMesh_resident, 420.453125
    48 2012-01-20 08:37:12,391 INFO                neighbour_mesh:197 |#@# finishMesh_stacksize, 0.203125
    49 2012-01-20 08:37:12,391 CRITICAL            generic_domain:126 |Initialising Domain
    50 2012-01-20 08:37:34,047 CRITICAL            generic_domain:191 |Domain: Set up communication buffers (parallel)
    51 2012-01-20 08:39:11,300 CRITICAL            generic_domain:302 |Domain: Initialising quantity values
    52 2012-01-20 08:39:11,301 CRITICAL            generic_domain:305 |Domain: Done
     12012-01-23 16:04:57,197 INFO           anuga.utilities.log:0   |Logfile is './anuga.log' with logging level of INFO, console logging level is CRITICAL
     22012-01-23 16:04:57,200 INFO                mesh_interface:90  |Resource usage: memory=316.5MB resident=24.7MB stacksize=0.2MB
     32012-01-23 16:04:57,200 INFO                mesh_interface:90  |#@# sys_platform, linux2
     42012-01-23 16:04:57,201 INFO                mesh_interface:90  |#@# start_memory, 316.52734375
     52012-01-23 16:04:57,201 INFO                mesh_interface:90  |#@# start_resident, 24.703125
     62012-01-23 16:04:57,201 INFO                mesh_interface:90  |#@# start_stacksize, 0.22265625
     72012-01-23 16:04:57,201 INFO                mesh_interface:91  |#@# maximum_triangle_area, 100.0
     82012-01-23 16:04:57,202 INFO                mesh_interface:92  |#@# minimum_triangle_angle, 28.0
     92012-01-23 16:04:57,202 INFO                mesh_interface:93  |#@# startMesh, '2012-01-23 16:04:57'
     102012-01-23 16:04:57,206 CRITICAL            mesh_interface:346 |Generating mesh to file '/nas/gemd/georisk_models/inundation/data/mem_time_test/triangles/area/cairnsmesh.msh'
  • trunk/anuga_work/development/mem_time_tests/hardware/template/main.py

    r8315 r8320  
    2222#------------------------------------------------------------------------------
    2323a = []
    24 
     24host = os.getenv('HOST')
    2525home = os.getenv('INUNDATIONHOME')
    2626scenariodir = add_directories(home, ["data","mem_time_test", "parallel","template"])
     
    4747for n in range(1,40,1):
    4848    z = time.time()
    49     subprocess.call(['mpirun', '-np', str(n), '-hostfile' ,'~/machinefiles/test.machines_tornado', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.5', 'runcairns.py'])   
     49    if (host == 'cyclone.agso.gov.au'):
     50        subprocess.call(['mpirun', '-np', str(n), '-hostfile' ,'~/machinefiles/test.machines_cyclone', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.6', 'runcairns.py'])
     51    if (host == 'tornado.agso.gov.au'):
     52        subprocess.call(['mpirun', '-np', str(n), '-hostfile' ,'~/machinefiles/test.machines_tornado', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.6', 'runcairns.py'])
     53    if (host == 'vayu1'):
     54        subprocess.call(['mpirun', '-np', str(n), '-x','PYTHONPATH','-x','INUNDATIONHOME','python', 'runcairns.py'])
     55    if (host == 'rhe-compute1.ga.gov.au'):
     56        subprocess.call(['mpirun', '-np', str(n), '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.6', 'runcairns.py'])
     57    if (host == 'xe'):
     58        subprocess.call(['mpirun', '-np', str(n), '-x','PYTHONPATH','-x','INUNDATIONHOME','python', 'runcairns.py'])
     59 
    5060    y = time.time()
    5161    f = open(file_path_store,'r+')
  • trunk/anuga_work/development/mem_time_tests/scenarios/channelflow/main.py

    r8315 r8320  
    3232
    3333spamWriter = csv.writer(open(file_path, 'wb'))
    34 spamWriter.writerow(['Extent','Stage','Time','Space'])
     34spamWriter.writerow(['Length','Stage','Time','Space'])
    3535
    3636for i in range(100,100000,10000):
    3737
    38     for n in range(1,i,i/10):
     38    for n in range(1,i/10,i/100):
     39        i = i /100.0
    3940        n = n/float(i)
    4041        system_tools.MemoryUpdate()
  • trunk/anuga_work/development/mem_time_tests/scenarios/vel2/main.py

    r8304 r8320  
    3636
    3737
    38 def rum(k):
    39     for i in range(1,10000,500):
    40        
     38for m in range(0,250,10):
     39     for i in range(1,2000,100): 
    4140        system_tools.MemoryUpdate()[0]
    4241        z = time.time()
     
    4645        spamWriter.writerow([k,h,(i*i),(y-z), b])
    4746
    48 
    49 for m in range(1,1000,200):
    50     rum(m)
    51 print 'G!' 
     47print 'DONE' 
  • trunk/anuga_work/development/mem_time_tests/triangles/area/main.py

    r8315 r8320  
    2424
    2525home1 = os.getenv('INUNDATIONHOME')
     26host = os.getenv('HOST')
    2627scenariodir = add_directories(home1, ["data","mem_time_test", "triangles","area"])
    2728file1 = 'ex1.csv'
     
    5051
    5152
    52 def rum(d):
    53      f = 4
     53for m in range(90,100,10):
     54     n = 4 #number of processors to use
    5455     for l in range(100,2000,100):
    5556       
     
    6162       
    6263        z = time.time()
    63         subprocess.call(['mpirun', '-np', str(f), '-hostfile' ,'~/machinefiles/t.machines_tornado', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.5', 'runcairns.py'])
    64         #subprocess.call(['python2.5', 'runcairns.py'])
     64        if (host == 'cyclone.agso.gov.au'):
     65            subprocess.call(['mpirun', '-np', str(n), '-hostfile' ,'~/machinefiles/test.machines_cyclone', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.6', 'runcairns.py'])
     66        if (host == 'tornado.agso.gov.au'):
     67            subprocess.call(['mpirun', '-np', str(n), '-hostfile' ,'~/machinefiles/test.machines_tornado', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.6', 'runcairns.py'])
     68        if (host == 'vayu1'):
     69            subprocess.call(['mpirun', '-np', str(n), '-x','PYTHONPATH','-x','INUNDATIONHOME','python', 'runcairns.py'])
     70        if (host == 'rhe-compute1.ga.gov.au'):
     71            subprocess.call(['mpirun', '-np', str(n), '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.6', 'runcairns.py'])   
     72        if (host == 'xe'):
     73            subprocess.call(['mpirun', '-np', str(n), '-x','PYTHONPATH','-x','INUNDATIONHOME','python', 'runcairns.py'])
     74       
    6575        y = time.time()
    6676
     
    7686        liststore.store = [0,0,0,0]
    7787
    78 for m in range(90,100,10):
    79     rum(m)
    8088
    8189print 'Done'
  • trunk/anuga_work/development/mem_time_tests/triangles/serial/main.py

    r8303 r8320  
    1515from anuga.utilities import system_tools, log
    1616from anuga.abstract_2d_finite_volumes.util import add_directories
     17import logAnalyser
    1718#------------------------------------------------------------------------------
    1819# Setup computational domain
     
    2829file = 'ex1.csv'
    2930
    30 log.log_filename = os.path.join(scenariodir, 'log.txt')
     31#log.log_filename = os.path.join(scenariodir, 'anuga.log')
    3132
    3233file_path = os.path.join(scenariodir, file)
     
    3536spamWriter = csv.writer(open(file_path, 'wb'))
    3637spamWriter.writerow(['Number Of Triangles' ,'Max Triangle Area', 'Extent', 'Space Used MB' , 'Time Taken s'])
     38outputresource = os.path.join(scenariodir,'test.csv')
    3739
    3840
     
    4244    while (n > 0):
    4345        c = 2 #random.random() * 2000 + 1
    44         system_tools.MemoryUpdate()
    4546        z = time.time()
    4647        h = runcairns.runex(c,r)
    4748        y = time.time()
    4849        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)])
    5153
    5254while (m > 0):
  • trunk/anuga_work/development/mem_time_tests/triangles/serial/runcairns.py

    r8303 r8320  
    9999
    100100# Save every two mins leading up to wave approaching land
    101     for t in domain.evolve(yieldstep=0.01, finaltime=0.02):
     101    for t in domain.evolve(yieldstep=1, finaltime=2):
    102102        print domain.timestepping_statistics()
    103103   
Note: See TracChangeset for help on using the changeset viewer.