1# Seismic sample 2Parallel seismic wave simulation that demonstrates use of `parallel_for` and `affinity_partitioner`. 3 4## Building the example 5``` 6cmake <path_to_example> [EXAMPLES_UI_MODE=value] 7cmake --build . 8``` 9### Predefined CMake variables 10* `EXAMPLES_UI_MODE` - defines the GUI mode, supported values are `gdi`, `d2d`, `con` on Windows, `x`,`con` on Linux and `mac`,`con` on macOS. The default mode is `con`. See the [common page](../../README.md) to get more information. 11 12## Running the sample 13### Predefined make targets 14* `make run_seismic` - executes the example with predefined parameters. 15* `make perf_run_seismic` ` - executes the example with suggested parameters to measure the oneTBB performance. 16* `make light_test_seismic` - executes the example with suggested parameters to reduce execution time. 17 18### Application parameters 19Usage: 20``` 21seismic [n-of-threads=value] [n-of-frames=value] [silent] [serial] [-h] [n-of-threads [n-of-frames]] 22``` 23* `-h` - prints the help for command line options. 24* `n-of-threads` -e number of threads to use; a range of the form low\[:high\], where low and optional high are non-negative integers or `auto` for a platform-specific default number. 25* `n-of-frames` - number of frames the example processes internally. 26* `silent` - no output except elapsed time. 27* `serial` - in GUI mode start with serial version of algorithm. 28 29### Interactive graphical user interface 30The following hot keys can be used in interactive execution mode when the example is compiled with the graphical user interface: 31 32* `left mouse button` - starts new seismic wave in place specified by mouse cursor. 33* `space` - toggles between parallel and serial execution modes. 34* `p` - enables parallel execution mode. 35* `s` - enables serial execution mode. 36* `e` - enables screen updates. 37* `d` - disables screen updates (strongly recommended when measuring performance or scalability; see note below). 38* `esc` - stop execution. 39