Search
Support & Downloads
All of Support
This Category
This Product
Software Products
Intel® Thread Profiler for Windows*
Preparing Your Software: Building or Making Source Code

Page Contents:


For Windows* or Pthreads* API: General Tips on Preparing Source Code
The following are general tips for preparing source code for Intel Thread Profiler for Windows or Pthreads API. Build (make) your source with the following switches:
  • For Windows*: Be sure to build thread-safe by compiling with the /MD, /MDd, /MT or /MTd switches to use the multi-threaded libraries.

    Note: On Windows*, the default for Microsoft and Intel® Compilers is the /ML or /MLd switch and this does not use thread-safe libraries.

  • Be sure to provide symbols. For Windows* generate symbols by compiling with the /Zi, /ZI or /Z7 switches and link with the /DEBUG switch. For Linux* generate symbols with the -g switch. Symbols will enable Intel Thread Profiler to specify source code information (file name and line number) with its results.

    Note: Symbols can be generated with a "release" (optimized) build.

  • You can use either an optimized "Release" or a non-optimized "Debug" build. A Debug build for Windows* will disable optimization with the /Od switch, and on Linux* a debug build will use the -O0 switch. Of course, just like when using a debugger, the Intel Thread Profiler Results (especially line numbers) may not be accurate, if you use an optimized build.

  • On Windows*, executable software must be built so that it contains a relocation section which allows for relocation in memory and relocation is required for instrumentation. Most dynamic-link library (.dll) files can be relocated by default. However by default, most executable (.exe) files cannot be relocated. So always link with the /FIXED:NO switch to allow for relocation.

    Windows* Tip: Instead of changing your project's settings, set the (system) environment variable "LINK" to the value "/FIXED:NO" and re-link your code to add a relocation section.


For Windows* or Pthreads* API: Run-time Warnings
On Windows*, if you get the warning "modules were created without base relocations" when you run a Intel Thread Profiler for Windows* API activity in the VTune™ environment or Microsoft .NET* Development Environment, your code probably doesn't contain a relocation section. Link with the /FIXED:NO switch to add a relocation section.


For Windows* or Pthreads* API: Can I use it without source code?
Yes -- But on Microsoft Windows*, do not expect to get any results for the application (.exe) file itself because typically on Windows the executable does not have a relocation section. But Intel Thread Profiler is designed to help you locate threading performance issues in source code.


For OpenMP*: General Tips on Preparing Source Code
The following are general tips for preparing source code for Intel Thread Profiler for OpenMP*.
  • You must compile with Intel® Compilers to get support for OpenMP.
  • On Windows*, be sure to build thread-safe by compiling with the /MD, /MDd, /MT or /MTd switches to use the multi-threaded libraries.
    Note: On Windows*, the default for Intel® Compilers is the /ML or /MLd switch and this does not use thread-safe libraries.
  • Do not compile with the /Qtcheck or -tcheck switch.
  • Symbols and line numbers are not required.
  • Use an optimized "Release" build.
  • When running in the VTune™ environment or Microsoft .NET* Developer Environment, compile with one of Windows* /Qopenmp or Linux* -openmp* switch or one of Windows* /Qopenmp_profile or Linux* -openmp switch, but not both. That is don't build with both /Qopenmp and /Qopenmp_profiler nor both of -openmp and -openmp_profile.
  • To run from the Windows* shell or DOS* command-prompt, compile with the /Qopenmp_profile switch. To run from the Linux* shell, build with -openmp_profile.

For OpenMP*: Run-time Warnings
I get a warning "The application you chose to launch has not been instrumented to generate OpenMP* statistics". What is this about?

You built your software without Intel® Compilers, or your executable file was compiled without any of the /Qopenmp, /Qopenmp_profile, -openmp or -openmp_profile switches. This may be okay if you are using dynamic (.dll) or shared (.so) library file(s) that are compiled with one of the OpenMP* switches. If you're using OpenMP in library files, be sure to specify these .DLL files in the Modules of Interest dialog.


For OpenMP*: Can I use it without source code?
Yes. However, Intel Thread Profiler for OpenMP* is designed to help you locate threading performance issues in source code.

This applies to:
Intel® Thread Profiler for Windows*

Solution ID: CS-009683
Date Created: 25-Feb-2004
Last Modified: 24-Sep-2007
Back to Top