Download PGI Compiler User`s Guide
Transcript
Optimizing and Parallelizing individual optimizations can sometimes cause slowdowns, and must be used carefully to ensure performance improvements. There are other useful command line options related to optimization and parallelization, such as – help, –Minfo, –Mneginfo, –dryrun, and –v. 3.2.1. –help As described in Help with Command–Line Options, you can see a specification of any command–line option by invoking any of the PGI compilers with –help in combination with the option in question, without specifying any input files. For example, you might want information on –O: $ pgfortran -help -O The resulting output is similar to this: -O Set opt level. All -O1 optimizations plus traditional scheduling and global scalar optimizations performed Or you can see the full functionality of –help itself, which can return information on either an individual option or groups of options: $ pgfortran -help -help The resulting output is similar to this: -help[=groups|asm|debug|language|linker|opt|other|overall| phase|prepro|suffix|switch|target|variable] Show compiler switches 3.2.2. –Minfo You can use the –Minfo option to display compile–time optimization listings. When this option is used, the PGI compilers issue informational messages to standard error (stderr) as compilation proceeds. From these messages, you can determine which loops are optimized using unrolling, SSE instructions, vectorization, parallelization, interprocedural optimizations and various miscellaneous optimizations. You can also see where and whether functions are inlined. For more information on –Minfo, refer to Optimization Controls section of the PGI Compiler Reference Manual. 3.2.3. –Mneginfo You can use the –Mneginfo option to display informational messages to standard error (stderr) that explain why certain optimizations are inhibited. For more information on –Mneginfo, refer to Optimization Controls section of the PGI Compiler Reference Manual. 3.2.4. –dryrun The –dryrun option can be useful as a diagnostic tool if you need to see the steps used by the compiler driver to preprocess, compile, assemble and link in the presence of a given set of command line inputs. When you specify the –dryrun option, these steps are printed to standard error (stderr) but are not actually performed. For example, you can use this option to inspect the PGI Compiler User's Guide 27