This Open Catalog is a collaborative effort to consolidate expert knowledge on best practices for modernizing and optimizing code written in C, C++, and Fortran programming languages.
This PR introduces improvements across multiple Fortran codes under PWRs. Since there are dozens of these checks, this PR focuses solely on Fortran codes with identified errors or inaccuracies (including #27).
Regarding the new indexing sequence for Fortran arrays, our previous approach involved the inverted order of j -> i to achieve performant memory accesses. By enforcing now the usual i -> j -> k sequence and interchanging the order of the do constructs as necessary, we retain the efficient memory accesses, while also aligning the Fortran codes with common practices and the C code examples, thus enhancing readability.
This PR introduces improvements across multiple Fortran codes under PWRs. Since there are dozens of these checks, this PR focuses solely on Fortran codes with identified errors or inaccuracies (including #27).
Regarding the new indexing sequence for Fortran arrays, our previous approach involved the inverted order of
j -> i
to achieve performant memory accesses. By enforcing now the usuali -> j -> k
sequence and interchanging the order of thedo
constructs as necessary, we retain the efficient memory accesses, while also aligning the Fortran codes with common practices and the C code examples, thus enhancing readability.