Intel® Fortran Compiler 16.0 User and Reference Guide
Lets you explicitly specify options to be used for the specified target and tool. This option only applies to Intel® MIC Architecture. Option -qoffload-option is the replacement option for -offload-option, which is deprecated.
Only available on Intel® 64 architecture targeting Intel® MIC Architecture
Linux: | -qoffload-option,target,tool,"option-list" |
OS X: | None |
Windows: | /Qoffload-option,target,tool,"option-list" |
target |
Is the target architecture. The only supported value for this argument is mic. |
tool |
Is the tool that the option-list is associated with. It can be one of the following values: ld, link, as, or compiler. ld is the linker tool on Linux* OS; link is the linker tool on Windows* OS. |
option-list |
Is one or more options that are specific to the tool. The quotation mark delimiters are required. Each option in the option-list must be separated by a space. For tool compiler, use compiler-specific options; for tool ld, use linker-specific options; for tool as, use assembler-specific options. The options for the tools always use the Linux form even when compiling on Windows. |
OFF |
The compiler does not pass additional options to the separate tools on the target architecture. |
This option lets you explicitly specify options to be used for the specified target and tool. It can be specified multiple times on the command line.
When building a heterogeneous application, the driver passes all compiler options specified on the command-line to the host compilation and only certain options to the offload compilation. To see a list of options passed to the offload compilation, specify option watch=mic-cmd.
If you want to pass additional options to the offload compilation, or you would like to override the command line options passed to offload compilation, you must use option [q or Q]offload-option to specify the additional or overriding options.
If you specify the options I, L, D, or U with the option [q or Q]offload-option, they override any other I, L, D, and U options that are automatically passed from host to offload compilation.
To achieve the overriding effect, the I, L, D, and U options specified using [q or Q]offload-option are placed ahead of the I, L, D, and U options automatically copied over from the host compilation. All other options specified using [q or Q]offload-option are placed after the options copied over from host to offload compilation.
Visual Studio: Code Generation > Additional Options for MIC Offload Compiler
Eclipse: None
Xcode: None
None
The following shows a valid example for the compiler tool:
-qoffload-option,mic,compiler, "-O3 -diag-disable 1234 –vec-report2" ! Linux* OS /Qoffload-option,mic,compiler, "-O3 -diag-disable 1234 –vec-report2" ! Windows* OS
The following shows another example for the compiler tool:
-qoffload-option,mic,compiler, "-O3 –vec-report3" ! Linux* OS /Qoffload-option,mic,compiler, "-O3 –vec-report3" ! Windows* OS
The following shows a valid example for the Linux* ld tool:
-qoffload-option,mic,ld,"-lmylib -L/my/path"
The following shows a valid example for the Windows* link tool:
/Qoffload-option,mic,link,"--no-undefined \"C:\Program Files (x86)\Intel\Composer XE 2015\mkl\lib\mic\libmkl_intel_lp64.a\""
Note that when you specify a path containing spaces in the option-list, you must enclose the path in quotes with escape characters (\") so it is interpreted correctly by the compiler.
The following shows a valid example for the Linux* as tool:
-qoffload-option,mic,as,"<assembler options>" ! Linux* OS /Qoffload-option,mic,as,"<assembler options>" ! Windows* OS
The following Linux* example causes the offload compilation to search -I/my_dir/mic/include first, and to use -DMY_DEFINE=20 because they override the previously mentioned -I/my_dir/include and -DMY_DEFINE=10. The compiler also passes -L/my_dir/mic/lib -L/my_dir/lib to the offload ld step:
ifort -qoffload-option,mic,compiler, "-I/my_dir/include -L/my_dir/lib -DMY_DEFINE=10 -I/my_dir/mic/include -DMY_DEFINE=20" -offload-option,mic,ld, "-L/my_dir/mic/lib" hello.f
The following Linux* example demonstrates how options specified in -qoffload-option override options automatically passed from host compilation to offload compilation:
-qoffload-option,mic,compiler,”-O3 -DMY_DEFINE=MIC” -DMY_DEFINE=HOST -O2
-DMY_DEFINE=HOST -O2 will be used for the host compilation. However, -DMY_DEFINE=MIC -O3 will override -O2 and -DMY_DEFINE=HOST for the offload compilation.