Overview
Parallel seismic simulation that demonstrates use of parallel_for.
Files
- SeismicSimulation.cpp
- Source code that does wave propagation.
- Makefile
- Makefile for building example.
Directories
- vc7.1
- Contains Microsoft* Visual Studio* .NET 2003 workspace for building and running the example.
- vc8
- 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* 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 [M[:N] [F]]
- For non-interactive mode, M and N are a range of numbers of threads to be used.
For interactive mode, N is the number of threads to use while M indicates if
a separate thread will be used for the GUI (>0) or not (0). For example,
seismic 1:3 will use 3 threads for computation and a separate thread for
processing GUI events; this option may give better visible performance on a 4-processor
system when using GDI+ graphics.
- F is the number of frames the example processes internally. Default value is 100;
reduce it to shorten example run time.
- To run a short version of this example, e.g., for use with Intel® Threading Tools:
- 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
- While running with the GUI display turned on should yield reasonable performance in most cases, running with the GUI
display turned off is strongly recommended in order to demonstrate the full performance and scalability of the example.
- If using the X-windows (X11) GUI on Mac OS* systems, X11 might not be installed on the system by default.
To install X11 on Mac OS* systems, use the operating system install disk, choose "Optional installs" and select X11 from
the "Applications" list. Alternatively, if X11 is not available, build without the GUI (see build targets above).
Up to parent directory
Copyright © 2005-2007 Intel Corporation. All Rights Reserved.
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
registered trademarks or trademarks 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.