Fortran Legacy Code Performance Optimization: Sequential and Parallel Processing with OpenMP

Several optimization alternatives are presented for legacy FORTRAN 77 scientific programs, each one with a quantitative characterization in terms of performance gain. Initially, sequential optimization is focused on the analisys of Level 3 BLAS (Basic Linear Algebra Subroutines) utilization, since BLAS have several performance optimized implementations. Also, the Fortran 90/95 array notation is used as a code upgrade from Fortran 77 to Fortran 90/95and, also, to provide the compiler a better source code for performance optimization. Since the shared memory parallel computing model is widely available (multiple cores and/or processors), the analysis of possible parallel processing via OpenMP is presented, along with the performance gain in a specific case. Sequential optimization as well parallelization work is done on a real (production code) program: a weather climate model implemented about two decades ago and used for climate research.