seisflows.workflow.test_flow
This is a SeisFlows Test workflow class which is used to test out the underlying machinery for a given set of modules, before submitting a full workflow. Used for debugging and development, as well as ensuring that SeisFlows is in working order before committing a large number of compute resources.
Module Contents
Classes
TestFlow Workflow |
- class seisflows.workflow.test_flow.TestFlow(modules=None, workdir=os.getcwd(), path_output=None, **kwargs)
TestFlow Workflow
Test individual sub-modules in a ‘live’ testing environment in order to ensure SeisFlows works appropriately given an established system and solver.
Note
You do not need to set System parameters ntask, nproc, tasktime, walltime. These will be overwritten by the setup task.
Parameters
Paths
- type workdir
str
- param workdir
working directory in which to perform a SeisFlows workflow. SeisFlows internal directory structure will be created here. Default cwd
- type path_output
str
- param path_output
path to directory used for permanent storage on disk. Results and expored scratch files are saved here.
- property task_list
A task list which includes tests for most of the modules depending on whether they’re included in the module list or not.
- check()
Run check functions for all underlying modules
- setup()
Creates required directory structure
- run()
Run through the task list which should consist of various test functions which are meant to ensure SeisFlows works in a live working environment without committing a large number of resources
- test_system_print_hello_world()
Use the system to run a simple print function which names the currently running task id to check that task id printing works. Check that the output log messages show the correct task id and log statement
- test_system_wait_ten_seconds_then_fail()
Simple wait function to be called by system run, used to test job status check function which monitors job queue. Throw in a job failure at the end of the function to check that system exit works