Overview

Parallel seismic wave simulation that demonstrates use of parallel_for and affinity_partitioner.

Files

main.cpp
Main program which parses command line options and runs the algorithm with different numbers of threads.
universe.h
Wave propagation methods interface.
universe.cpp
Wave propagation methods implementation.
seismic_video.h
GUI mode support interface.
seismic_video.cpp
GUI mode support implementation.
Makefile
Makefile for building example.

Directories

msvs
Contains Microsoft* Visual Studio* 2005 workspace for building and running the example.
xcode
Contains Xcode* IDE workspace for building and running the example.

To Build

General build directions can be found here. The following additional options are supported:
make [(general targets: {release, debug} [test])] UI={con, gdi, dd, x, mac}
Build and run as usual, but build with the specified GUI driver: console, GDI+*, Direct Draw*, X11, or OpenGL* (see the description of the common GUI code for more information on available graphics support). For Linux* and Mac OS* X systems, the best available driver is detected automatically by the Makefile. For Windows* systems, UI=gdi is the default GUI driver; compiling with UI=dd may offer superior performance, but can only be used if the Microsoft* Direct Draw* SDK is installed on your system and if overlay is supported by your graphics card. Use UI=con to build without the GUI for use in making performance measurements (strongly recommended when measuring performance or scalability; see note below).
make [(above options or targets)] XARCH=x64
Build and run as above, but also specify XARCH=x64 (or XARCH=AMD64 for older compilers) when building the example on Windows* as a 64-bit binary.
make [(above options or targets)] DDLIB_DIR=<specify path to library directory of Direct Draw* SDK here>
If you experience ddraw.lib linking problems, specify the correct library directory via this option.
make [(above options or targets)] CXXFLAGS=-DX_FULLSYNC
Build and run as above, but enable full X11 synchronization if you experience "tearing" of motion on slower video systems.

Usage

seismic -h
Prints the help for command line options
seismic [n-of-threads=value] [n-of-frames=value] [silent] [serial]
seismic [n-of-threads [n-of-frames]] [silent] [serial]
n-of-threads is the number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or 'auto' for the TBB default.
n-of-frames is a number of frames the example processes internally.
silent - no output except elapsed time.
serial - in GUI mode start with serial version of algorithm.
To run a short version of this example, e.g., for use with Intel® Parallel Inspector::
Build a debug version of the example (see the build directions).
Run it with the desired number of threads and smaller number of frames, e.g., seismic 4 5.

Hot keys

The following hot keys can be used in interactive execution mode when the example is compiled with the graphical user interface:
<left mouse button>
Starts new seismic wave in place specified by mouse cursor.
<space>
Toggles between parallel and serial execution modes.
<p>
Enables parallel execution mode.
<s>
Enables serial execution mode.
<e>
Enables screen updates.
<d>
Disables screen updates (strongly recommended when measuring performance or scalability; see note below).
<esc>
Stops execution.

Notes


Up to parent directory

Copyright © 2005-2011 Intel Corporation. All Rights Reserved.

Intel is a registered trademark or trademark of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.