Changeset 7656
- Timestamp:
- Mar 5, 2010, 12:28:16 PM (15 years ago)
- Location:
- misc/tools/acceptance_tests
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
misc/tools/acceptance_tests/README
r7276 r7656 15 15 contains the python to execute, eg, 'python2.4', etc. 16 16 17 PYTHONPATH17 ANUGAPATH 18 18 contains a single directory path to the ANUGA code. Something like 19 19 /nas/gemd/georisk_models/inundation/sandpits/rwilson/rwilson/branches/numpy … … 30 30 information. 31 31 2. Create a new 'machines_<name>' file in this directory that describes the 32 cluster compute-node setup. Note that the 'machines_<name>' file doesn't 33 appear to be used by *anything*. 32 cluster compute-node setup. -
misc/tools/acceptance_tests/machines_cyclone
r7276 r7656 9 9 compute-1-14 slots=2 10 10 compute-1-13 slots=2 11 compute-1-12 slots=211 #compute-1-12 slots=2 12 12 compute-1-11 slots=2 13 13 compute-1-10 slots=2 -
misc/tools/acceptance_tests/machines_tornado
r7276 r7656 2 2 compute-0-1 cpu=4 3 3 compute-0-2 cpu=4 4 compute-0-3 cpu=44 #compute-0-3 cpu=4 5 5 compute-0-4 cpu=4 6 6 compute-0-5 cpu=4 -
misc/tools/acceptance_tests/mandelbrot/README
r7276 r7656 11 11 To compile C extensions in this directory 12 12 13 python compile_mandelbrot_extensions.py14 15 or16 13 python compile.py mandel_ext.c 17 14 python compile.py mandelplot_ext.c -
misc/tools/acceptance_tests/test_all.py
r7276 r7656 11 11 12 12 # the test files, in desired order 13 Tests = ['test_dump_python_environment.py', 13 Tests = ['test_test_all.py', 14 'test_eqrm.py', 15 'test_dump_python_environment.py', 14 16 'test_python_packages.py', 15 17 'test_filesystem_accessibility.py', … … 19 21 'test_test_pypar.py', 20 22 # 'test_inter_latency.py', 21 'test_test_all.py',22 'test_eqrm.py',23 23 ] 24 25 24 26 25 if __name__ == '__main__': … … 54 53 # make sure environment variables are set 55 54 python = os.getenv('PYTHON') 56 pythonpath = os.getenv('PYTHONPATH')57 eqrmpath= os.getenv('EQRMPATH')58 if eqrmpathis None:59 eqrmpath= ''60 if not python or not pythonpath:55 ANUGAPATH = os.getenv('ANUGAPATH') 56 EQRMPATH = os.getenv('EQRMPATH') 57 if EQRMPATH is None: 58 EQRMPATH = '' 59 if not python or not ANUGAPATH: 61 60 if not python: 62 61 util.log_print_nl(logfile, 'Sorry, you must set the PYTHON environment variable.') 63 if not pythonpath:64 util.log_print_nl(logfile, 'Sorry, you must set the PYTHONPATH environment variable.')62 if not ANUGAPATH: 63 util.log_print_nl(logfile, 'Sorry, you must set the ANUGAPATH environment variable.') 65 64 sys.exit(10) 66 65 … … 71 70 print '' 72 71 print 'PYTHON=%s' % python 73 print ' PYTHONPATH=%s' % pythonpath74 print 'EQRMPATH=%s' % eqrmpath72 print 'ANUGAPATH=%s' % ANUGAPATH 73 print 'EQRMPATH=%s' % EQRMPATH 75 74 print '' 76 75 res = raw_input('This test will run with the above environment variables, OK? ') -
misc/tools/acceptance_tests/test_dump_python_environment.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Testlet to dump the acceptance environment.''' 3 """Testlet to dump the acceptance environment.""" 4 4 5 5 import os … … 33 33 util.log_print_nl(logfile) 34 34 35 # show PYTHONPATH value36 pythonpath = os.getenv('PYTHONPATH')37 util.log_print_nl(logfile, ' PYTHONPATH environment variable = %s' % pythonpath)35 # show ANUGAPATH value 36 ANUGAPATH = os.getenv('ANUGAPATH') 37 util.log_print_nl(logfile, 'ANUGAPATH environment variable = %s' % ANUGAPATH) 38 38 39 39 # see if we can get a revision number for ANUGA source … … 50 50 51 51 # See if we are testing EQRM 52 eqrm_path = os.getenv(' EQRMPATH')52 eqrm_path = os.getenv('ANUGAPATH') 53 53 if eqrm_path: 54 util.log_print_nl(logfile, 'Environment variable EQRMPATH = %s' % eqrm_path)54 util.log_print_nl(logfile, 'Environment variable ANUGAPATH = %s' % eqrm_path) 55 55 util.log_print_nl(logfile, 'EQRM will be tested below.') 56 56 else: 57 util.log_print_nl(logfile, 'Environment variable EQRMPATH not set, not testing EQRM.')57 util.log_print_nl(logfile, 'Environment variable ANUGAPATH not set, not testing EQRM.') 58 58 util.log_print_nl(logfile) 59 59 -
misc/tools/acceptance_tests/test_eqrm.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Testlet to run the EQRM 'test_all.py' script.''' 3 "Testlet to run the EQRM 'test_all.py' script.""" 4 4 5 5 import os -
misc/tools/acceptance_tests/test_filesystem_accessibility.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Testlet to check that various filesystems are accessible''' 3 """Testlet to check that various filesystems are accessible""" 4 4 5 5 import os -
misc/tools/acceptance_tests/test_int32_type.py
r7276 r7656 1 ''' 1 """ 2 2 This program checks the underlying type object for int32 data types. 3 ''' 3 """ 4 4 5 5 import platform -
misc/tools/acceptance_tests/test_inter_latency.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Testlet to run the internode LatencyBandwidth test.''' 3 """Testlet to run the internode LatencyBandwidth test.""" 4 4 5 5 import os … … 11 11 12 12 def get_node_connections(nodes): 13 '''Given list of nodes, return list of all possible pairs.'''13 """Given list of nodes, return list of all possible pairs.""" 14 14 15 15 def pair_list(l): … … 50 50 # get list of node numbers 51 51 home_env_var = os.getenv('HOME') 52 machines_file = os.path.join(home_env_var, '.machines_%s' % cluster)52 #machines_file = os.path.join(home_env_var, '.machines_%s' % cluster) 53 53 nodes = util.get_node_numbers(cluster, strip_bad_nodes=True) 54 54 nodes.sort() -
misc/tools/acceptance_tests/test_latency_bandwidth.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Testlet to run the LatencyBandwidth test.''' 3 """Testlet to run the LatencyBandwidth test.""" 4 4 5 5 import os … … 36 36 # run the tests 37 37 results = [] 38 machines_file = os.path.join('~', '.machines_%s' % cluster)38 #machines_file = os.path.join('~', '.machines_%s' % cluster) 39 39 for num_procs in Processor_Numbers: 40 40 cmd = ('mpirun -nolocal -np %2d -hostfile %s %s' 41 % (num_procs, machines_file, obj_file))41 % (num_procs, util.machines_file, obj_file)) 42 42 util.log_print(logfile, cmd + ' ...') 43 43 (_, fd) = os.popen4(cmd) -
misc/tools/acceptance_tests/test_offsite.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Run acceptance tests in order.3 """Run acceptance tests in order. 4 4 5 5 Only run tests that don't need any compute nodes. 6 ''' 6 """ 7 7 8 8 import os … … 57 57 # make sure environment variables are set 58 58 python = os.getenv('PYTHON') 59 pythonpath = os.getenv('PYTHONPATH')60 eqrmpath = os.getenv('EQRMPATH')61 if eqrmpathis None:62 eqrmpath= ''63 if not python or not pythonpath:59 ANUGAPATH = os.getenv('ANUGAPATH') 60 ANUGAPATH = os.getenv('ANUGAPATH') 61 if ANUGAPATH is None: 62 ANUGAPATH = '' 63 if not python or not ANUGAPATH: 64 64 if not python: 65 65 util.log_print_nl(logfile, 'Sorry, you must set the PYTHON environment variable.') 66 if not pythonpath:67 util.log_print_nl(logfile, 'Sorry, you must set the PYTHONPATH environment variable.')66 if not ANUGAPATH: 67 util.log_print_nl(logfile, 'Sorry, you must set the ANUGAPATH environment variable.') 68 68 sys.exit(10) 69 69 … … 74 74 print '' 75 75 print 'PYTHON=%s' % python 76 print ' PYTHONPATH=%s' % pythonpath77 print ' EQRMPATH=%s' % eqrmpath76 print 'ANUGAPATH=%s' % ANUGAPATH 77 print 'ANUGAPATH=%s' % ANUGAPATH 78 78 print '' 79 79 res = raw_input('This test will run with the above environment variables, OK? ') -
misc/tools/acceptance_tests/test_python_packages.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Testlet to check that packages required are importable''' 3 """Testlet to check that packages required are importable""" 4 4 5 5 import os -
misc/tools/acceptance_tests/test_quadrature_parallel_interleaved.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Testlet to run the QuadratureParallelInterleaved test.''' 3 """Testlet to run the QuadratureParallelInterleaved test.""" 4 4 5 5 import os … … 36 36 # run the tests 37 37 results = [] 38 machines_file = os.path.join('~', '.machines_%s' % cluster) 38 #machines_file = os.path.join('~', '.machines_%s' % cluster) 39 #machines_file = os.path.join('machines_%s' % cluster) 39 40 single_processor_time = None 40 41 for num_procs in Processor_Numbers: 41 42 cmd = ('mpirun -nolocal -np %2d -hostfile %s %s' 42 % (num_procs, machines_file, obj_file))43 % (num_procs, util.machines_file, obj_file)) 43 44 util.log_print(logfile, cmd + ' ...') 44 45 (_, fd) = os.popen4(cmd) -
misc/tools/acceptance_tests/test_ssh_to_compute_nodes.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Testlet to check that can ssh to each subordinate node of the cluster.''' 3 """Testlet to check that can ssh to each subordinate node of the cluster.""" 4 4 5 5 import os -
misc/tools/acceptance_tests/test_test_all.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Testlet to run the 'test_all.py' ANUGA script.''' 3 """Testlet to run the 'test_all.py' ANUGA script.""" 4 4 5 5 import os … … 19 19 # remember the directory we are in and go to ANUGA test directory 20 20 home_directory = os.getcwd() 21 pythonpath = os.getenv('PYTHONPATH')22 os.chdir(os.path.join( pythonpath, 'anuga'))21 ANUGAPATH = os.getenv('ANUGAPATH') 22 os.chdir(os.path.join(ANUGAPATH, 'anuga')) 23 23 24 24 # compile C code -
misc/tools/acceptance_tests/test_test_pypar.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Testlet to run the pypar tests.''' 3 """Testlet to run the pypar tests.""" 4 4 5 5 import os … … 20 20 21 21 # run the test_pypar.py tests 22 machines_file = os.path.join('~', '.machines_%s' % cluster)22 #machines_file = os.path.join('~', '.machines_%s' % cluster) 23 23 for num_procs in Processor_Numbers: 24 24 cmd = ('mpirun -nolocal -np %2d -hostfile %s %s test_pypar.py' 25 % (num_procs, machines_file, python_env_var))25 % (num_procs, util.machines_file, python_env_var)) 26 26 util.log_print(logfile, cmd + ' ...') 27 27 fd = os.popen(cmd) … … 48 48 os.chdir('mandelbrot') 49 49 50 cmd = '%s compile _mandelbrot_c_extensions.py' % python_env_var50 cmd = '%s compile.py mandel_ext.c' % python_env_var 51 51 util.log_print_nl(logfile, cmd) 52 52 fd = os.popen(cmd) … … 56 56 if status: 57 57 return False 58 58 59 cmd = '%s compile.py mandelplot_ext.c' % python_env_var 60 util.log_print_nl(logfile, cmd) 61 fd = os.popen(cmd) 62 compile_result = fd.read() 63 status = fd.close() 64 util.log_print(logfile, compile_result) 65 if status: 66 return False 67 59 68 # run tests 60 machines_file = os.path.join(' ~', '.machines_%s' % cluster)69 machines_file = os.path.join('..', util.machines_file) 61 70 result_data = [] 62 71 for num_procs in Processor_Numbers: -
misc/tools/acceptance_tests/test_utils.py
r7276 r7656 1 1 #!/bin/env python 2 2 3 '''Utility functions for the cluster acceptance test suite.''' 3 """Utility functions for the cluster acceptance test suite.""" 4 4 5 5 import os … … 14 14 Cluster_Info = {'cyclone': {'num_nodes': 23, 15 15 'node_stem': 'compute-1-%d', 16 'bad_nodes': [1 3]},16 'bad_nodes': [12]}, 17 17 # 13 bad - 'no route to host' 18 18 'tornado': {'num_nodes': 20, 19 19 'node_stem': 'compute-0-%d', 20 'bad_nodes': [ ]},20 'bad_nodes': [3]}, 21 21 'off_site': {'num_nodes': 1, 22 22 'node_stem': 'xyzzy-%d', … … 26 26 27 27 def log(logfile, msg=''): 28 '''Write a message to the log file.'''28 """Write a message to the log file.""" 29 29 30 30 fd = open(logfile, 'a') … … 34 34 35 35 def log_nl(logfile, msg=''): 36 '''Write a message to the log file, with a newline added.'''36 """Write a message to the log file, with a newline added.""" 37 37 38 38 log(logfile, msg) … … 41 41 42 42 def log_print(logfile, msg=''): 43 '''Write a message to the log file and stdout.43 """Write a message to the log file and stdout. 44 44 45 45 The message doesn't have a '\n' added to it. 46 '''46 """ 47 47 48 48 log(logfile, msg) … … 52 52 53 53 def log_print_nl(logfile, msg=''): 54 '''Write a message to the log file and stdout, with a newline added.54 """Write a message to the log file and stdout, with a newline added. 55 55 56 56 Appends '\n' to msg. 57 '''57 """ 58 58 59 59 log_nl(logfile, msg) … … 63 63 64 64 def header(logfile, module, msg): 65 '''Write testlet header to log and stdout.'''65 """Write testlet header to log and stdout.""" 66 66 67 67 # current time … … 76 76 77 77 def footer(logfile, start_time=None): 78 '''Write testlet footer to log and stdout.'''78 """Write testlet footer to log and stdout.""" 79 79 80 80 if start_time: … … 90 90 91 91 def get_hostname(): 92 '''Return (<host>, <domain>) for machine.92 """Return (<host>, <domain>) for machine. 93 93 94 94 For example, on the GA cyclone main node, return ('cyclone', 'agso.gov.au'). 95 '''95 """ 96 96 97 97 fd = os.popen('hostname') … … 110 110 111 111 def get_cluster_info(cluster): 112 '''Get dictionary containing information for 'cluster'.112 """Get dictionary containing information for 'cluster'. 113 113 114 114 If 'cluster' is not recognized, return None. 115 '''115 """ 116 116 117 117 return Cluster_Info.get(cluster, None) … … 119 119 120 120 def get_node_numbers(cluster, strip_bad_nodes=True): 121 '''Get a list of node numbers for the cluster.121 """Get a list of node numbers for the cluster. 122 122 123 123 If 'strip_bad_nodes' is True remove bad nodes from the result. 124 '''124 """ 125 125 126 126 result = [] … … 133 133 return result 134 134 135 135 # Using the local machines file 136 (cluster, domain) = get_hostname() 137 machines_file = os.path.join('machines_%s' % cluster)
Note: See TracChangeset
for help on using the changeset viewer.