def __init__(self, name, params): MooseObject.__init__(self, name, params) self.specs = params # Initialize the status bucket class self.status = util.TestStatus() # Enumerate the buckets here so ther are easier to work with in the tester class self.bucket_success = self.status.bucket_success self.bucket_fail = self.status.bucket_fail self.bucket_diff = self.status.bucket_diff self.bucket_pbs = self.status.bucket_pbs self.bucket_pending = self.status.bucket_pending self.bucket_deleted = self.status.bucket_deleted self.bucket_skip = self.status.bucket_skip self.bucket_silent = self.status.bucket_silent # Initialize the tester with a pending status self.setStatus('launched', self.bucket_pending) # Set the status message if self.specs['check_input']: self.success_message = 'SYNTAX PASS' else: self.success_message = self.specs['success_message'] # Set up common paramaters self.should_execute = self.specs['should_execute'] self.check_input = self.specs['check_input']
def __init__(self, name, params): MooseObject.__init__(self, name, params) self.specs = params # Bool if test can run self._runnable = None # Initialize the status bucket class self.status = util.TestStatus() # Enumerate the buckets here so ther are easier to work with in the tester class self.bucket_initialized = self.status.bucket_initialized self.bucket_success = self.status.bucket_success self.bucket_fail = self.status.bucket_fail self.bucket_diff = self.status.bucket_diff self.bucket_pending = self.status.bucket_pending self.bucket_finished = self.status.bucket_finished self.bucket_deleted = self.status.bucket_deleted self.bucket_skip = self.status.bucket_skip self.bucket_silent = self.status.bucket_silent # Set the status message if self.specs['check_input']: self.success_message = 'SYNTAX PASS' else: self.success_message = self.specs['success_message'] # Set up common paramaters self.should_execute = self.specs['should_execute'] self.check_input = self.specs['check_input'] if self.specs["allow_test_objects"]: self.specs["cli_args"].append("--allow-test-objects")
def __init__(self, name, params): MooseObject.__init__(self, name, params) self.specs = params # mesh_mode has a few deprecated options # TODO: We need to print out a deprecated warning in the future mesh_mode = self.specs['mesh_mode'] replacement_list = [] for i, item in enumerate(mesh_mode): if item.upper() == 'PARALLEL': mesh_mode[i] = 'DISTRIBUTED' if item.upper() == 'SERIAL': mesh_mode[i] = 'REPLICATED'
def __init__(self, harness, params): MooseObject.__init__(self, harness, params) ## The test harness to run callbacks on self.harness = harness # Retrieve and store the TestHarness options for use in this object self.options = harness.getOptions() # The Scheduler class can be initialized with no "max_processes" argument and it'll default # to a soft limit. If however a max_processes is passed we'll treat it as a hard limit. # The difference is whether or not we allow single jobs to exceed the number of slots. if params['max_processes'] == None: self.available_slots = 1 self.soft_limit = True else: self.available_slots = params['max_processes'] # hard limit self.soft_limit = False # Requested average load level to stay below self.average_load = params['average_load'] # The time the status queue reported no activity to the TestHarness self.last_reported = clock() # A set containing jobs that have been reported self.jobs_reported = set([]) # Initialize run_pool based on available slots self.run_pool = ThreadPool(processes=self.available_slots) # Initialize status_pool to only use 1 process (to prevent status messages from getting clobbered) self.status_pool = ThreadPool(processes=1) # Slot Lock when processing resource allocations self.slot_lock = threading.Lock() # DAG Lock when processing the DAG self.dag_lock = threading.Lock() # Workers in use (single job might request multiple slots) self.slots_in_use = 0 # Jobs waiting to finish (includes actively running jobs) self.job_queue_count = 0 # Set containing our TesterData containers. We use this in the event of a KeyboardInterrupt to # iterate over and kill any subprocesses self.tester_datas = set([])
def validParams(): params = MooseObject.validParams() # Common Options params.addRequiredParam('type', "The type of test of Tester to create for this test.") params.addParam('max_time', 300, "The maximum in seconds that the test will be allowed to run.") params.addParam('min_reported_time', "The minimum time elapsed before a test is reported as taking to long to run.") params.addParam('skip', "Provide a reason this test will be skipped.") params.addParam('deleted', "Tests that only show up when using the '-e' option (Permanently skipped or not implemented).") params.addParam('heavy', False, "Set to True if this test should only be run when the '--heavy' option is used.") params.addParam('group', [], "A list of groups for which this test belongs.") params.addParam('prereq', [], "A list of prereq tests that need to run successfully before launching this test.") params.addParam('skip_checks', False, "Tells the TestHarness to skip additional checks (This parameter is set automatically by the TestHarness during recovery tests)") params.addParam('scale_refine', 0, "The number of refinements to do when scaling") params.addParam('cli_args', [], "Additional arguments to be passed to the test.") params.addParam('valgrind', 'NONE', "Set to (NONE, NORMAL, HEAVY) to determine which configurations where valgrind will run.") # Test Filters params.addParam('platform', ['ALL'], "A list of platforms for which this test will run on. ('ALL', 'DARWIN', 'LINUX', 'SL', 'LION', 'ML')") params.addParam('compiler', ['ALL'], "A list of compilers for which this test is valid on. ('ALL', 'GCC', 'INTEL', 'CLANG')") params.addParam('petsc_version', ['ALL'], "A list of petsc versions for which this test will run on, supports normal comparison operators ('<', '>', etc...)") params.addParam('mesh_mode', ['ALL'], "A list of mesh modes for which this test will run ('PARALLEL', 'SERIAL')") params.addParam('method', ['ALL'], "A test that runs under certain executable configurations ('ALL', 'OPT', 'DBG', 'DEVEL', 'OPROF', 'PRO')") params.addParam('library_mode', ['ALL'], "A test that only runs when libraries are built under certain configurations ('ALL', 'STATIC', 'DYNAMIC')") params.addParam('dtk', ['ALL'], "A test that runs only if DTK is detected ('ALL', 'TRUE', 'FALSE')") params.addParam('unique_ids', ['ALL'], "A test that runs only if UNIQUE_IDs are enabled ('ALL', 'TRUE', 'FALSE')") params.addParam('recover', True, "A test that runs with '--recover' mode enabled") params.addParam('vtk', ['ALL'], "A test that runs only if VTK is detected ('ALL', 'TRUE', 'FALSE')") params.addParam('tecplot', ['ALL'], "A test that runs only if Tecplot is detected ('ALL', 'TRUE', 'FALSE')") return params
def validParams(): params = MooseObject.validParams() # Common Options params.addRequiredParam('type', "The type of test of Tester to create for this test.") params.addParam('max_time', 300, "The maximum in seconds that the test will be allowed to run.") params.addParam('min_reported_time', "The minimum time elapsed before a test is reported as taking to long to run.") params.addParam('skip', "Provide a reason this test will be skipped.") params.addParam('deleted', "Tests that only show up when using the '-e' option (Permanently skipped or not implemented).") params.addParam('heavy', False, "Set to True if this test should only be run when the '--heavy' option is used.") params.addParam('group', [], "A list of groups for which this test belongs.") params.addParam('prereq', [], "A list of prereq tests that need to run successfully before launching this test.") params.addParam('skip_checks', False, "Tells the TestHarness to skip additional checks (This parameter is set automatically by the TestHarness during recovery tests)") params.addParam('scale_refine', 0, "The number of refinements to do when scaling") params.addParam('success_message', 'OK', "The successful message") params.addParam('cli_args', [], "Additional arguments to be passed to the test.") params.addParam('valgrind', 'NONE', "Set to (NONE, NORMAL, HEAVY) to determine which configurations where valgrind will run.") # Test Filters params.addParam('platform', ['ALL'], "A list of platforms for which this test will run on. ('ALL', 'DARWIN', 'LINUX', 'SL', 'LION', 'ML')") params.addParam('compiler', ['ALL'], "A list of compilers for which this test is valid on. ('ALL', 'GCC', 'INTEL', 'CLANG')") params.addParam('petsc_version', ['ALL'], "A list of petsc versions for which this test will run on, supports normal comparison operators ('<', '>', etc...)") params.addParam('mesh_mode', ['ALL'], "A list of mesh modes for which this test will run ('DISTRIBUTED', 'REPLICATED')") params.addParam('method', ['ALL'], "A test that runs under certain executable configurations ('ALL', 'OPT', 'DBG', 'DEVEL', 'OPROF', 'PRO')") params.addParam('library_mode', ['ALL'], "A test that only runs when libraries are built under certain configurations ('ALL', 'STATIC', 'DYNAMIC')") params.addParam('dtk', ['ALL'], "A test that runs only if DTK is detected ('ALL', 'TRUE', 'FALSE')") params.addParam('unique_ids', ['ALL'], "A test that runs only if UNIQUE_IDs are enabled ('ALL', 'TRUE', 'FALSE')") params.addParam('recover', True, "A test that runs with '--recover' mode enabled") params.addParam('vtk', ['ALL'], "A test that runs only if VTK is detected ('ALL', 'TRUE', 'FALSE')") params.addParam('tecplot', ['ALL'], "A test that runs only if Tecplot is detected ('ALL', 'TRUE', 'FALSE')") params.addParam('dof_id_bytes', ['ALL'], "A test that runs only if libmesh is configured --with-dof-id-bytes = a specific number, e.g. '4', '8'") params.addParam('petsc_debug', ['ALL'], "{False,True} -> test only runs when PETSc is configured with --with-debugging={0,1}, otherwise test always runs.") params.addParam('curl', ['ALL'], "A test that runs only if CURL is detected ('ALL', 'TRUE', 'FALSE')") params.addParam('tbb', ['ALL'], "A test that runs only if TBB is available ('ALL', 'TRUE', 'FALSE')") params.addParam('superlu', ['ALL'], "A test that runs only if SuperLU is available via PETSc ('ALL', 'TRUE', 'FALSE')") params.addParam('slepc', ['ALL'], "A test that runs only if SLEPc is available ('ALL', 'TRUE', 'FALSE')") params.addParam('unique_id', ['ALL'], "A test that runs only if libmesh is configured with --enable-unique-id ('ALL', 'TRUE', 'FALSE')") params.addParam('cxx11', ['ALL'], "A test that runs only if CXX11 is available ('ALL', 'TRUE', 'FALSE')") params.addParam('asio', ['ALL'], "A test that runs only if ASIO is available ('ALL', 'TRUE', 'FALSE')") params.addParam('depend_files', [], "A test that only runs if all depend files exist (files listed are expected to be relative to the base directory, not the test directory") params.addParam('env_vars', [], "A test that only runs if all the environment variables listed exist") params.addParam('should_execute', True, 'Whether or not the executable needs to be run. Use this to chain together multiple tests based off of one executeable invocation') params.addParam('required_submodule', [], "A list of initialized submodules for which this test requires.") params.addParam('check_input', False, "Check for correct input file syntax") params.addParam('display_required', False, "The test requires and active display for rendering (i.e., ImageDiff tests).") return params
def validParams(): params = MooseObject.validParams() # Common Options params.addRequiredParam('type', "The type of test of Tester to create for this test.") params.addParam('max_time', 300, "The maximum in seconds that the test will be allowed to run.") params.addParam('min_reported_time', "The minimum time elapsed before a test is reported as taking to long to run.") params.addParam('skip', "Provide a reason this test will be skipped.") params.addParam('deleted', "Tests that only show up when using the '-e' option (Permanently skipped or not implemented).") params.addParam('heavy', False, "Set to True if this test should only be run when the '--heavy' option is used.") params.addParam('group', [], "A list of groups for which this test belongs.") params.addParam('prereq', [], "A list of prereq tests that need to run successfully before launching this test.") params.addParam('skip_checks', False, "Tells the TestHarness to skip additional checks (This parameter is set automatically by the TestHarness during recovery tests)") params.addParam('scale_refine', 0, "The number of refinements to do when scaling") params.addParam('cli_args', [], "Additional arguments to be passed to the test.") params.addParam('valgrind', 'NONE', "Set to (NONE, NORMAL, HEAVY) to determine which configurations where valgrind will run.") # Test Filters params.addParam('platform', ['ALL'], "A list of platforms for which this test will run on. ('ALL', 'DARWIN', 'LINUX', 'SL', 'LION', 'ML')") params.addParam('compiler', ['ALL'], "A list of compilers for which this test is valid on. ('ALL', 'GCC', 'INTEL', 'CLANG')") params.addParam('petsc_version', ['ALL'], "A list of petsc versions for which this test will run on, supports normal comparison operators ('<', '>', etc...)") params.addParam('mesh_mode', ['ALL'], "A list of mesh modes for which this test will run ('PARALLEL', 'SERIAL')") params.addParam('method', ['ALL'], "A test that runs under certain executable configurations ('ALL', 'OPT', 'DBG', 'DEVEL', 'OPROF', 'PRO')") params.addParam('library_mode', ['ALL'], "A test that only runs when libraries are built under certain configurations ('ALL', 'STATIC', 'DYNAMIC')") params.addParam('dtk', ['ALL'], "A test that runs only if DTK is detected ('ALL', 'TRUE', 'FALSE')") params.addParam('unique_ids', ['ALL'], "A test that runs only if UNIQUE_IDs are enabled ('ALL', 'TRUE', 'FALSE')") params.addParam('recover', True, "A test that runs with '--recover' mode enabled") params.addParam('vtk', ['ALL'], "A test that runs only if VTK is detected ('ALL', 'TRUE', 'FALSE')") params.addParam('tecplot', ['ALL'], "A test that runs only if Tecplot is detected ('ALL', 'TRUE', 'FALSE')") params.addParam('dof_id_bytes', ['ALL'], "A test that runs only if libmesh is configured --with-dof-id-bytes = a specific number, e.g. '4', '8'") params.addParam('petsc_debug', ['ALL'], "{False,True} -> test only runs when PETSc is configured with --with-debugging={0,1}, otherwise test always runs.") params.addParam('curl', ['ALL'], "A test that runs only if CURL is detected ('ALL', 'TRUE', 'FALSE')") params.addParam('tbb', ['ALL'], "A test that runs only if TBB is available ('ALL', 'TRUE', 'FALSE')") params.addParam('superlu', ['ALL'], "A test that runs only if SuperLU is available via PETSc ('ALL', 'TRUE', 'FALSE')") params.addParam('unique_id', ['ALL'], "A test that runs only if libmesh is configured with --enable-unique-id ('ALL', 'TRUE', 'FALSE')") params.addParam('cxx11', ['ALL'], "A test that runs only if CXX11 is available ('ALL', 'TRUE', 'FALSE')") params.addParam('asio', ['ALL'], "A test that runs only if ASIO is available ('ALL', 'TRUE', 'FALSE')") params.addParam('depend_files', [], "A test that only runs if all depend files exist (files listed are expected to be relative to the base directory, not the test directory") params.addParam('env_vars', [], "A test that only runs if all the environment variables listed exist") return params
def __init__(self, name, params): MooseObject.__init__(self, name, params) self.specs = params
def validParams(): params = MooseObject.validParams() # Common Options params.addRequiredParam( 'type', "The type of test of Tester to create for this test.") params.addParam( 'max_time', 300, "The maximum in seconds that the test will be allowed to run.") params.addParam( 'min_reported_time', "The minimum time elapsed before a test is reported as taking to long to run." ) params.addParam('skip', "Provide a reason this test will be skipped.") params.addParam( 'deleted', "Tests that only show up when using the '-e' option (Permanently skipped or not implemented)." ) params.addParam( 'heavy', False, "Set to True if this test should only be run when the '--heavy' option is used." ) params.addParam('group', [], "A list of groups for which this test belongs.") params.addParam( 'prereq', [], "A list of prereq tests that need to run successfully before launching this test." ) params.addParam( 'skip_checks', False, "Tells the TestHarness to skip additional checks (This parameter is set automatically by the TestHarness during recovery tests)" ) # Test Filters params.addParam( 'platform', ['ALL'], "A list of platforms for which this test will run on. ('ALL', 'DARWIN', 'LINUX', 'SL', 'LION', 'ML')" ) params.addParam( 'compiler', ['ALL'], "A list of compilers for which this test is valid on. ('ALL', 'GCC', 'INTEL', 'CLANG')" ) params.addParam( 'petsc_version', ['ALL'], "A list of petsc versions for which this test will run on, supports normal comparison operators ('<', '>', etc...)" ) params.addParam( 'mesh_mode', ['ALL'], "A list of mesh modes for which this test will run ('PARALLEL', 'SERIAL')" ) params.addParam( 'method', ['ALL'], "A test that runs under certain executable configurations ('ALL', 'OPT', 'DBG', 'DEVEL', 'OPROF', 'PRO')" ) params.addParam( 'library_mode', ['ALL'], "A test that only runs when libraries are built under certain configurations ('ALL', 'STATIC', 'DYNAMIC')" ) params.addParam( 'dtk', ['ALL'], "A test that runs only if DTK is detected ('ALL', 'TRUE', 'FALSE')" ) params.addParam( 'unique_ids', ['ALL'], "A test that runs only if UNIQUE_IDs are enabled ('ALL', 'TRUE', 'FALSE')" ) params.addParam('recover', True, "A test that runs with '--recover' mode enabled") params.addParam( 'vtk', ['ALL'], "A test that runs only if VTK is detected ('ALL', 'TRUE', 'FALSE')" ) params.addParam( 'tecplot', ['ALL'], "A test that runs only if Tecplot is detected ('ALL', 'TRUE', 'FALSE')" ) return params
def validParams(): params = MooseObject.validParams() params.addRequiredParam('average_load', 64.0, "Average load to allow") params.addRequiredParam('max_processes', None, "Hard limit of maxium processes to use") return params