General Optimisation Options
Argument |
Comment |
-O0 | No optimization. Used during the early stages of application development and debugging. |
-Os, -O1 | Optimize for size. Omits optimizations that tend to increase object size. Creates the smallest optimized code in most cases. |
-O2 | Maximize speed. Default setting. Enables many optimizations, including vectorization. Creates faster code than -O1 in most cases. |
-O3 | Enables -O2 optimizations plus more aggressive loop and memory-access optimizations, such as scalar replacement, loop unrolling, code replication to eliminate branches, loop blocking to allow more efficient use of cache and additional data prefetching. The -O3 option is particularly recommended for applications that have loops that do many floating-point calculations or process large data sets. Production codes running on ICHEC systems should be compiled with -O3 unless there is reason not too. However it is not guaranteed to result in significant improvements over -O2. |
-qopt-report[n] | Generates an optimization report, by default written to a file with extension .optrpt. nspecifies the level of detail, from 0 (no report) to 5 (maximum detail). Default is 2. |
-qopt-reportfile=name | Writes an optimization report to stderr, stdout or to the file name. |
-qopt-reportphase=name1, name2, ... | Optimization reports are generated for optimization phases name1, name2, etc. Some commonly used name arguments are as follows: all: All possible optimization reports for all phases (default) loop: Loop nest and memory optimizations vec: auto-vectorization and explicit vector programming par: auto-parallelization openmp: threading using OpenMP ipo: Interprocedural Optimization, including inlining pgo: Profile Guided Optimization offload: offload of data and/or execution to Intel® MIC Architecture or to Intel® Graphics Technology |
-qopt-report-help | Displays all possible values of name for -qoptreport-phase above. No compilation is performed. |
-qopt-reportroutine=substring | Generates reports only for functions or subroutines whose names contain substring. By default, reports are generated for all functions and subroutines. |
-qopt-reportfilter="string" | Restricts reports to the file, function or subroutine and/or ranges of line numbers specified by "string", e.g. "myfile, myfun, line1-line2". |