Intel® Advisor Help
This topic describes Fortran build settings (compiler and linker options) for Intel Advisor tools. The optimization options for the Survey and Suitability tools differ from the Dependencies tool (no optimization), thus separate build scripts and target executables are needed.
Tool |
Build Settings |
Amount of Data |
---|---|---|
Survey and Suitability |
Specify a Release build with debug information and moderate (limited inlining) optimization. |
Usually the same data set as typical customer program execution, unless you want to provide a data set that exercises a specific part of your program you are evaluating for parallelism. |
Dependencies |
Specify a Debug build with debug information and no optimization. |
Much smaller subset of the data typically used. You need to select a data set that is small but representative (see Choosing a Small, Representative Data Set for the Dependencies Tool). |
In each module that contains Intel Advisor annotations, add the following Fortran build settings to reference the annotation definitions:
After you set up your command line environment, specify these build options in your Linux build command or makefile:
Option |
Explanation |
---|---|
Either: -I${ADVISOR_2016_DIR}/include/ia32 or -I${ADVISOR_2016_DIR}/include/intel64 |
Compiler: Searches an additional include directory that contains the Intel Advisor annotation definitions. |
Add either: -L${ADVISOR_2016_DIR}/lib32 or -L${ADVISOR_2016_DIR}/lib64 |
Linker: Searches an additional library directory that contains the Intel Advisor annotation library. Specify the same (32 or 64) architecture as the previous option. |
Add: -ladvisor |
Linker: Specifies the name of the Intel Advisor annotation library to be searched. |
With makefiles, you can use the $(varname) format instead of ${varname} shown above.
As shown above, you need to specify the Intel Advisor directory name and library name in your compiler commands. Similarly, when using a mixed-language Fortran and C/C++ application, either link using the Fortran compiler or if you link with the C/C++ compiler, specify the Fortran static library to avoid unresolved reference errors related to Fortran intrinsic functions. For example, if you get a linker error about a missing getenv_ function, consider adding following linker options: -L<Intel-Compiler-path>/lib/intel64/ -lifport.
In addition to the options listed above for source modules that contain annotations, use the following options. To build a target for the Survey or Suitability tools, use the following compiler and linker options to get full debug information and moderate optimization for your target.
Specify these build options in your Linux build command or makefile:
Tool |
Option |
Explanation |
---|---|---|
Survey and Suitability |
-g |
Compiler: Requests full debug information. |
Survey and Suitability |
-g |
Linker: Requests full debug information (if linking in a separate command). |
Survey and early stages of Suitability |
-O2 or higher (-O3) and -fno-inline-functions |
Compiler: Requests moderate optimization that limits function inlining. |
Later stages of Suitability |
user-specified-optimization |
Compiler: Use your normal optimization level that typically does not limit function inlining. |
If the Suitability Report provides an incorrect location for site, task, or lock annotations, determine whether your build specifies advanced compiler optimization options that - for example - eliminate duplicate code or merge call sites. If so, consider removing the advanced optimization option when you build the target to be analyzed by Suitability tool. Such advanced optimizations may also cause similar issues when using other tools.
If the Intel Advisor tools report that your sources, files, or line numbers are not available, make sure that your build options specify debug information (listed above).
In addition to the options listed above for source modules that contain annotations, use the following options. The Dependencies tool is much easier to use on optimization-disabled code because the relationship between the sources and the running program is much simpler. Use the following compiler and linker options to provide debug information and no optimization for the target:
Specify these build options in your Linux build command or makefile:
Tool |
Option |
Explanation |
---|---|---|
Dependencies |
-g |
Compiler: Requests full debug information. |
Dependencies |
-g |
Linker: Requests full debug information (if linking in a separate command). |
Dependencies |
-O0 |
Compiler: Disables optimization. |
Dependencies |
Either -threads or shared-intel |
Linker: search for unresolved references in a multithreaded, shared object run-time library. |
If you do not enable Debug Information Format (-g), you might see missing file/line information during analysis. Similarly, if you do not disable optimization (by specifying -O0), you may see incorrect file/line information during analysis.