Changeset 3952


Ignore:
Timestamp:
Nov 9, 2006, 9:39:16 AM (17 years ago)
Author:
sexton
Message:

update broome to incorporate new copy files and screen catcher

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/broome_2006/run_broome.py

    r3951 r3952  
    1919import time
    2020from shutil import copy
    21 from os import mkdir, access, F_OK
     21from os.path import dirname, basename
     22from os import mkdir, access, F_OK, sep
    2223import sys
    2324
     
    2829from anuga.abstract_2d_finite_volumes.combine_pts import combine_rectangular_points_files
    2930from anuga.geospatial_data.geospatial_data import *
    30 from anuga.abstract_2d_finite_volumes.util import Screen_Catcher
     31#from anuga.abstract_2d_finite_volumes.util import Screen_Catcher
     32from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, copy_code_files
    3133
    3234# Application specific imports
     
    3840#-------------------------------------------------------------------------------
    3941
    40 # creates copy of code in output dir if dir doesn't exist
    41 if access(project.outputtimedir,F_OK) == 0 :
    42     mkdir (project.outputtimedir)
    43 copy (project.codedirname, project.outputtimedir + project.codename)
    44 copy (project.codedir + 'run_broome.py', project.outputtimedir + 'run_broome.py')
    45 print'output dir', project.outputtimedir
    46 
    47 #normal screen output is stored in
    48 screen_output_name = project.outputtimedir + "screen_output.txt"
    49 screen_error_name = project.outputtimedir + "screen_error.txt"
    50 
    51 #used to catch screen output to file
    52 sys.stdout = Screen_Catcher(screen_output_name)
    53 sys.stderr = Screen_Catcher(screen_error_name)
     42# creates copy of code in output dir
     43copy_code_files(project.outputtimedir,__file__,dirname(project.__file__)+sep+ project.__name__+'.py' )
     44myid = 0
     45numprocs = 1
     46start_screen_catcher(project.outputtimedir, myid, numprocs)
    5447
    5548print 'USER:    ', project.user
     
    119112
    120113from anuga.pmesh.mesh_interface import create_mesh_from_regions
    121 remainder_res = 750000
     114remainder_res = 500000
    122115local_res = 25000
    123116broome_res = 5000
Note: See TracChangeset for help on using the changeset viewer.