The answers provided by others are excellent and rather comprehensive. I would only introduce a few other resources that could help you down the road to find answers to problems more efficiently. There are severalSeveral Fortran communities that can be extremely helpful in learning optimization and performance tips or simply to seek help from experts:
- The Intel Fortran forum has over 130,000 Fortran-related questions and posts, as far I as remember from a few years ago that I checked. There are also many industries and academia experts, as well as Fortran Standard Committee members there ready to take challenging questions and to guide and educate people (I have no connection to the Intel HPC team, just a user).
- The NVIDIA Fortran forum is another place to seek help, although NVIDIA is more focused on CUDA and GPU-enabled Fortran.
- The Reddit Fortran community has close to 6,000 Fortran programmers and enthusiasts already who can help with a diverse range of Fortran-related questions or direct you to relevant people or communities for further help.
There are likely many more resources that I am simply missing in the above list. There are also online Fortran compilers like the following that can aid rapid limited testing of ideas:
- tutorialspoint
- rextester
- onlinegdb
- jdoodle
- godbolt (for inspecting the generated assembly code)
and Fortran Jupyter bindings for serial and parallel Fortran programming like OpenCoarrays Jupyter Binder.