Changeset 9503


Ignore:
Timestamp:
Jan 27, 2015, 8:57:32 AM (10 years ago)
Author:
steve
Message:

Moved anuga_parallel to anuga.parallel. Now the compile_all and test_all
scripts should work

Location:
trunk/anuga_core
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/compile_all.py

    r9362 r9503  
    4141
    4242os.chdir(buildroot)
     43print
    4344print 'Changing to', os.getcwd()       
    4445
     
    4849
    4950try:
     51    print
    5052    print '-----------------------------------------------'
    5153    print 'Attempting to compile Metis'
     
    5658    # Attempt to compile Metis for use with anuga_parallel
    5759    os.chdir('source')
    58     os.chdir('anuga_parallel')
     60    os.chdir('anuga')
     61    os.chdir('parallel')
    5962    os.chdir('pymetis')
    6063
     
    8588       
    8689except:
     90    print
    8791    print 'pymetis could not compile as pypar not installed'
    8892
     
    104108   
    105109    os.chdir('source')
    106     os.chdir('anuga_parallel')
     110    os.chdir('anuga')
     111    os.chdir('parallel')
    107112    os.chdir('pypar_extras')
    108113
     
    120125        print msg
    121126except:
    122     print 'anuga_parallel code not compiled as pypar not installed'
     127    print 'anuga.parallel code not compiled as pypar not installed'
    123128
    124129
  • trunk/anuga_core/source/anuga/parallel/test/test_parallel_boyd_box_operator.py

    r9501 r9503  
    196196        boyd_box0.print_statistics()
    197197
    198 #    if parallel:
    199 #        factory = Parallel_operator_factory(domain, verbose = True)
    200 #
    201 #        inlet0 = factory.inlet_operator_factory(line0, Q0)
    202 #        inlet1 = factory.inlet_operator_factory(line1, Q1)
    203 #       
    204 #        boyd_box0 = factory.boyd_box_operator_factory(end_points=[[9.0, 2.5],[19.0, 2.5]],
    205 #                                          losses=1.5,
    206 #                                          width=1.5,
    207 #                                          apron=5.0,
    208 #                                          use_momentum_jet=True,
    209 #                                          use_velocity_head=False,
    210 #                                          manning=0.013,
    211 #                                          verbose=False)
    212 #
    213 #    else:
    214 #        inlet0 = Inlet_operator(domain, line0, Q0)
    215 #        inlet1 = Inlet_operator(domain, line1, Q1)
    216 #
    217 #        # Enquiry point [ 19.    2.5] is contained in two domains in 4 proc case
    218 #        boyd_box0 = Boyd_box_operator(domain,
    219 #                          end_points=[[9.0, 2.5],[19.0, 2.5]],
    220 #                          losses=1.5,
    221 #                          width=1.5,
    222 #                          apron=5.0,
    223 #                          use_momentum_jet=True,
    224 #                          use_velocity_head=False,
    225 #                          manning=0.013,
    226 #                          verbose=False)
    227    
    228     #######################################################################
    229198
    230199    ##-----------------------------------------------------------------------
     
    246215                boyd_box0.print_timestepping_statistics()
    247216 
    248         #for i in range(samples):
    249         #    if tri_ids[i] >= 0:               
    250         #        if verbose: print 'P%d tri %d, value = %s' %(myid, i, stage.centroid_values[tri_ids[i]])
    251217                   
    252218        sys.stdout.flush()
     
    311277        assert(success)
    312278
     279       
    313280    return control_data
    314281
  • trunk/anuga_core/source/anuga/test_all.py

    r9490 r9503  
    3333
    3434# Directories that should not be searched for test files.
    35 exclude_dirs = ['shallow_water_balanced' , #'damage_modelling', # Special requirements
     35exclude_dirs = ['shallow_water_balanced' , 'parallel', # Special requirements
    3636                '.svn',          # subversion
    3737                'props', 'wcprops', 'prop-base', 'text-base', 'tmp']
  • trunk/anuga_core/source/anuga_parallel/__init__.py

    r9502 r9503  
    66"""
    77
    8 # Lets import the standard anuga interface
    9 #from anuga import *
    10 
    11 
    12 from parallel_api import distribute
    13 from parallel_api import myid, numprocs, get_processor_name
    14 from parallel_api import send, receive
    15 from parallel_api import pypar_available, barrier, finalize
    16 
    17 if pypar_available:
    18     from parallel_meshes import parallel_rectangle
    19     from parallel_shallow_water import Parallel_domain as Parallel_shallow_water_domain
    20     from parallel_advection     import Parallel_domain as Parallel_advection_domain
    21     from parallel_operator_factory import Inlet_operator, Boyd_box_operator, Boyd_pipe_operator
    22     from parallel_operator_factory import Weir_orifice_trapezoid_operator #added by PM 22/10/2013
    23 else:
    24     from anuga import rectangular_cross as parallel_rectangle
    25     from anuga import Domain as Parallel_shallow_water_domain
    26     from anuga.advection import Advection_Domain as Parallel_advection_domain
    278
    289
    2910
     11from anuga.parallel import *
     12
     13print '#'+50*'='
     14print '# '
     15print '# WARNING '
     16print '# '
     17print '# anuga_parallel moved to anuga.parallel '
     18print '# '
     19print '# Change your anuga_parallel imports'
     20print '#'+50*'='
     21
     22
     23
     24
  • trunk/anuga_core/source/setup.cfg

    r9500 r9503  
    11
    22[pytest]
    3 addopts = --ignore=setup.py --cov-report term --cov .
     3addopts = --ignore=setup.py --ignore=anuga/parallel --cov-report term --cov .
  • trunk/anuga_core/test_all.py

    r9433 r9503  
    1616
    1717
    18 #os.chdir(buildroot)
    19 #os.chdir('source')
    20 #os.chdir('anuga_1d')
    21 #print
    22 #print '======================= anuga_1d tests ================================='   
    23 #print 'Changing to', os.getcwd() # This is now different from buildroot   
    24 #xecfile('test_all.py')
    25 
    2618
    2719
     
    3224    os.chdir(buildroot)
    3325    os.chdir('source')
    34     os.chdir('anuga_parallel')
     26    os.chdir('anuga')
     27    os.chdir('parallel')
    3528    os.chdir('test')
    3629    print
    37     print '===================== anuga_parallel tests =========================='
     30    print '===================== anuga parallel tests =========================='
    3831    print 'Changing to', os.getcwd()
    3932    execfile('test_all.py')
    4033else:
    41     print 'anuga_parallel tests not run as pypar not installed'
     34    print 'anuga.parallel tests not run as pypar not installed'
    4235
    4336
     
    4740# FIXME SR 20130327: Just commenting out this comment to run the validation tests.
    4841# We are currently undating the automated validation tests, so at present this point to
    49 # something which most people do get as part of the download. We will update and
    50 # point them to the new anuga_validation_tests in future.
     42# something which most people do not get as part of the download. We will update and
     43# point them to the new validation_tests in future.
    5144"""
    5245print
Note: See TracChangeset for help on using the changeset viewer.