Changeset 8324


Ignore:
Timestamp:
Jan 24, 2012, 2:37:24 PM (13 years ago)
Author:
pittj
Message:

update to work with NCI testing

fj
gfh

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

Legend:

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

    r8317 r8324  
     1#below is the first code that worked on NCI and is here to remain unchanged
     2#and just be an example read NCI.doc to how the code was reworked to run on NCI
     3#it is not perfect, but it did work as of revision 8322
    14"""Simple water flow example using ANUGA
    25Water flowing down a channel
     
    1417from anuga.utilities import system_tools, log
    1518from anuga.abstract_2d_finite_volumes.util import add_directories
    16 
     19from anuga.utilities.log_analyser import analyse_log
    1720
    1821#------------------------------------------------------------------------------
     
    3639file_path_storen = os.path.join(scenariodir, storen)
    3740
    38 log.log_filename = os.path.join(scenariodir, 'log.txt')
     41log.log_filename = os.path.join(scenariodir, 'log.txt
    3942
    4043spamWriter = csv.writer(open(file_path, 'wb'))
     
    5356     f = 4
    5457     for l in range(400,500,100):
    55        
     58
    5659        g = open(file_path_storel,'r+')
    5760        g.write(str(l))
     
    5962        h = open(file_path_storea,'r+')
    6063        h.write(str(d))
    61        
     64
    6265        z = time.time()
    63         subprocess.call(['mpirun', '-np', str(f), '-hostfile' ,'~/machinefiles/t.machines_tornado', '-x','PYTHONPATH','-x','INUNDATIONHOME','python2.5', 'runcairns.py'])
     66        subprocess.call(['mpirun','-np','8','-x','PYTHONPATH','-x','INUNDATIONHOME','python','runcairns.py'])
     67        #subprocess.call(['mpirun', '-np', str(f), '-hostfile' ,'~/machinefiles/t.machines_tornado','-x','PYTHONPATH','-x','INUNDATIONHOME','python2.5', 'ru$
    6468        #subprocess.call(['python2.5', 'runcairns.py'])
    6569        y = time.time()
     
    8084
    8185print 'Done'
    82 
     86analyse_log(scenariodir, 'metalog.csv')
  • trunk/anuga_work/development/mem_time_tests/NCIparallel/area/runcairns.py

    r8317 r8324  
    5151f.close()
    5252
     53scenariodirV = add_directories(home2, ["data","mem_time_test", "triangles",
     54                                     "area", "triangles-" + str(area) +"-"+ str(length)])
     55
     56h = 'CAIRNS.msh'
     57file_pathh = os.path.join(scenariodirV, h)
     58
     59log.log_filename = os.path.join(scenariodirV, "anuga.log")
     60log._setup = False
     61
    5362system_tools.MemoryUpdate()
    5463#------------------------------------------------------------------------------
     
    8089#------------------------------------------------------------------------------
    8190domain.set_name('CAIRNS.sww') # Name of sww file
    82 domain.set_datadir(scenariodir2)                       # Store sww output here
     91domain.set_datadir(scenariodirV)                       # Store sww output here
    8392
    8493#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.