Research Article
Using Coarrays to Parallelize Legacy Fortran Applications: Strategy and Case Study
Table 1
Modernization steps: horizontal lines indicate partial ordering.
| Step | Details |
| 1 | Set up automated builds via CMake1 and version control via Git2. |
| 2 | Convert fixed- to free-source format via “convert.f90” by Metcalf3. | 3 | Replace goto with do while for main loop termination. | 4 | Enforce type/kind/rank consistency of arguments and return values by wrapping all procedures in a module. | 5 | Eliminate implicit typing. | 6 | Replace data statements with parameter statements. | 7 | Replace write-access to common blocks with module variables. |
| 8 | Replace keyboard input with default initializations. | 9 | Set up automated, extensible tests for accuracy and performance via OOP and CTest1. |
| 10 | Make all procedures outside of the main program pure. | 11 | Eliminate actual/dummy array shape inconsistencies by passing array subsections to assumed-shape arrays. | 12 | Replace static memory allocation with dynamic allocation. |
| 13 | Replace loops with array assignments. | 14 | Expose greater parallelism by unrolling the nested loops in the particle set-up. | 15 | Balance the work distribution by spreading particles across images during set-up. | 16 | Exploit a Fortran 2015 collective procedure to gather statistics. | 17 | Study and tune performance with TAU4. |
|
|
http://www.cmake.org/. 2http://git-scm.com/. ftp://ftp.numerical.rl.ac.uk/pub/MandR/convert.f90. 4http://tau.uoregon.edu/.
|