Changeset 4802


Ignore:
Timestamp:
Nov 8, 2007, 5:31:52 PM (17 years ago)
Author:
ole
Message:

Added auto validations to distribution (ticket:207) and
updated installation guide as well as test_all

Changes to

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/documentation/user_manual/anuga_installation_guide.tex

    r4792 r4802  
    7474  \begin{itemize}
    7575    \item The supplied ANUGA distribution as under the folder pre_requisites (Install in the order \code{enthon-python2.4-1.0.0.exe},
    76     \code{ScientificPython-2.4.9.win32-py2.4.exe} and the unpack \code{netcdf-3.6.1-beta1-win32dll.zip} into \code{C:\bin} as suggested below.
     76    \code{ScientificPython-2.4.9.win32-py2.4.exe} and the unpack \code{netcdf-3.6.1-beta1-win32dll.zip} into \code{C:\\bin} as suggested below.
    7777    \item The WEB:
    7878    \begin{itemize} 
     
    102102    \end{verbatim}}
    103103  \item In the ANUGA root directory, run the test suite (e.g. by opening it with IDLE
    104   and running the file)\footnote{If run on the commandline, this test suite will cause an error that has to do
    105   with the atexit.py functionality of the logger. As long as all tests pass OK, you can safely ignore that error.}:
     104  and running the file)
    106105    {\small \begin{verbatim}
    107106        python test_all.py
    108107    \end{verbatim}}
    109108    ANUGA has been succesfully installed if the tests pass.
     109  \item To verify that ANUGA succesfully reproduces a series of validation examples, go
     110  to the directory \code{anuga_validation} and into \code{automated_validation_tests} in
     111  which you can run
     112  {\small \begin{verbatim}
     113      python validate_all.py
     114  \end{verbatim}}   
    110115\end{enumerate}   
     116
     117
     118
    111119
    112120To install the anuga\_viewer
     
    126134\end{enumerate}
    127135
    128 Try the demos provided in the ANUGA root directory
     136Try the demos provided in the ANUGA directory \code{anuga\_demos}
    129137(also discussed in the ANUGA user manual available with the distribution and also at
    130138\url{http://datamining.anu.edu.au/~ole/anuga/user_manual/anuga_user_manual.pdf}) and
    131139view the resulting sww files with the anuga\_viewer.
    132140
    133 To verify that the installed version of ANUGA validates satisfactorily
    134 against the Okushiri Island wave tank validation dataset
    135 (\url{http://www.cee.cornell.edu/longwave})
    136 unpack the distribution (\code{anuga_validation_1.0_xxxx.tgz}) into
    137 any directory and run the scripts \code{create_okushiri.py},
    138 \code{run_okushiri.py} and \code{compare_timeseries.py}.  See also the
    139 \code{README.txt} file that comes with the validation scripts for more
    140 details.
     141%To run the ANUGA against the Okushiri Island wave tank validation dataset
     142%(\url{http://www.cee.cornell.edu/longwave})
     143%go to \code{anuga_validation}
     144% into
     145%any directory and run the scripts \code{create_okushiri.py},
     146%\code{run_okushiri.py} and \code{compare_timeseries.py}.  See also the
     147%\code{README.txt} file that comes with the validation scripts for more
     148%details.
    141149
    142150
  • anuga_core/test_all.py

    r4796 r4802  
    1010execfile('test_all.py')
    1111
     12print
     13print '************************** NOTE *************************************'
     14print 'If all unit tests passed you should run the suite of validation tests'
     15print 'Go to the directory anuga_validation/automated_validation_tests'
     16print 'and run'
     17print '    python validate_all.py'
     18print
     19print 'These tests will take a few hours and will verify that ANUGA'
     20print 'produces the physical results expected.'
     21print '*********************************************************************'
     22
    1223   
  • create_distribution.py

    r4786 r4802  
    7777system(s)
    7878
    79 
    8079# Store file with revision info for use with get_revision_number
    8180store_version_info(destination_path=distro_dir+'/anuga', verbose=True)
    8281
    83 # Zip it up
     82
     83#-----------------------------
     84# Get validation_files as well
     85
     86s = 'mkdir %s/anuga_validation' %distro_dir
     87system(s)
     88
     89s = 'svn export anuga_validation/okushiri_2005 %s/anuga_validation/okushiri'\
     90    %(distro_dir)
     91print s
     92system(s)
     93
     94s = 'svn export anuga_validation/solitary_waves %s/anuga_validation/solitary_waves'\
     95    %(distro_dir)
     96print s
     97system(s)
     98
     99
     100s = 'svn export anuga_validation/automated_validation_tests %s/anuga_validation/automated_validation_tests'\
     101    %(distro_dir)
     102print s
     103system(s)
     104
     105
     106# FIXME: Other validations in here!!!
     107
     108
     109#-----------------------------
     110# Get demos from user manual
     111
     112#s = 'mkdir %s/anuga_demos' %distro_dir
     113#system(s)
     114
     115s = 'svn export anuga_core/documentation/user_manual/demos %s/anuga_demos'\
     116    %(distro_dir)
     117print s
     118system(s)
     119
     120
     121#------------------
     122# Zip everything up
    84123s = 'cd %s;tar cvfz %s *' %(distro_dir, distro_filename)
    85124print s
     
    92131
    93132# Clean up
    94 s = '/bin/rm -rf %s/anuga' %(distro_dir)
    95 print s
    96 system(s)
    97 
    98 
    99 #-----------------------------
    100 # Get validation_files as well
    101 
    102 s = 'mkdir %s/anuga_validation' %distro_dir
    103 system(s)
    104 
    105 s = 'svn export anuga_validation/okushiri_2005 %s/anuga_validation/okushiri'\
    106     %(distro_dir)
    107 print s
    108 system(s)
    109 
    110 s = 'svn export anuga_validation/solitary_waves %s/anuga_validation/solitary_waves'\
    111     %(distro_dir)
    112 print s
    113 system(s)
    114 
    115 # Other validations in here!!!
    116 
    117 # Zip it up
    118 s = 'cd %s;tar cvfz anuga_validation-%s.tgz *'\
    119     %(distro_dir, revision)
    120 print s
    121 system(s)
    122 
    123 # Move distro to release area
    124 s = '/bin/mv %s/*.tgz %s' %(distro_dir, release_dir)
    125 print s
    126 system(s)
    127 
    128 # Clean up
    129 s = '/bin/rm -rf %s/anuga_validation' %(distro_dir)
    130 print s
    131 system(s)
    132 
    133 
    134 #-----------------------------
    135 # Get demos from user manual
    136 
    137 #s = 'mkdir %s/anuga_demos' %distro_dir
    138 #system(s)
    139 
    140 s = 'svn export anuga_core/documentation/user_manual/demos %s/anuga_demos'\
    141     %(distro_dir)
    142 print s
    143 system(s)
    144 
    145 # Zip it up
    146 s = 'cd %s;tar cvfz anuga_demos-%s.tgz *'\
    147     %(distro_dir, revision)
    148 print s
    149 system(s)
    150 
    151 # Move distro to release area
    152 s = '/bin/mv %s/*.tgz %s' %(distro_dir, release_dir)
    153 print s
    154 system(s)
    155 
    156 # Clean up
    157 s = '/bin/rm -rf %s/anuga_demos' %(distro_dir)
    158 print s
    159 system(s)
     133s = '/bin/rm -rf %s/*' %(distro_dir)
     134print s
     135system(s)
     136
     137
    160138
    161139
     
    256234
    257235
    258 import sys; sys.exit()
    259 
    260236#----------------------------
    261237# Throw away code to drop all files into the RAMP download area
     
    265241if get_user_name() == 'ole' and get_host_name() == 'nautilus':
    266242
     243
     244    answer = raw_input('Do you want to move this to perlite and ANU? Y/N [Y]')
     245    if answer.lower() == 'n':
     246        import sys; sys.exit()
     247
     248       
     249    #------------------------------
     250    print 'Uploading to sourceforge'
     251
     252
     253   
     254
    267255    print 'Attempt to rsync data to perlite and datamining'
    268     # Copy to RAMP
     256    # Copy to NHIP
    269257    s = 'rsync -avz %s/* onielsen@cyclone:/d/cit/1/cit/natural_hazard_impacts/downloads/ANUGA_install/%s' %(release_dir, 'anuga_%s' %revision)
    270258    print s
Note: See TracChangeset for help on using the changeset viewer.