codee-com / open-catalog

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.
Apache License 2.0
79 stars 7 forks source link

Review current Fortran codes in PWRs #29

Closed alvrogd closed 3 months ago

alvrogd commented 3 months ago

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.