Which optimization should I use?

I need to get a Fortran program running at peak performance. I don’t know much about the program and even less about Fortran so I have no clue what optimization I should use. Can you give me a few ideas on which ones I should to try?


I recommend that you refer to Chapter 2 Optimization and Paralleization in the 5.2 PGI User’s Guide. Specifically, you will want to pay attention to section 2.2, Getting Started with Optimizations. In this section, it mentions that the first important part of all program development is getting it to run correctly. So, it recommends that you start out with minimal or no optimization (use -g or -O0 compiler options). It also says that if you want to get started quickly, a good optimization to use with any PGI compiler is the -fastsse option. Below is a link to the PGI User’s Guide: