Hacker News new | past | comments | ask | show | jobs | submit login
Evaluation of risks associated with relying on Fortran for the next 15 years (lanl.gov)
4 points by zaikunzhang on April 25, 2023 | hide | past | favorite | 5 comments



A copy-paste of the Executive Summary:

This document examines risks associated with relying on Fortran for codes critical to nuclear security into the late 2030s. The study was requested by the LANL ASC program office to support its decisions. To date, much of the discussion about the prospects for Fortran has tended to be informal and centered on questions (such as, “will the language be around in 20 years”) that are impossible to answer with any certainty. By focusing on estimates of the likelihood associated with different outcomes, rather than on specific predictions, we hope to clarify points of disagreement within the community and strengthen the analytic basis for reasoning about the future. Our assessment for seven distinct risks associated with continued use of Fortran are that in the next fifteen years:

1. It is very likely that we will be unable to staff Fortran projects with top-rate computer scientists and computer engineers.

2. There is an even chance that we will be unable to staff Fortran projects with top-rate computational scientists and physicists.

3. There is an even chance continued maintenance of Fortran codes will lead to expensive human or financial maintenance costs.

4. It is very unlikely that codes that rely on Fortran will have poor performance on future CPU technologies.

5. It is likely that codes that rely on Fortran will have poor performance for GPU technologies.

6. It is very likely that Fortran will preclude effective use of important advances in computing technology.

7. There is an even chance that Fortran will inhibit introduction of new features or physics that can be introduced with other languages.


This is off to me. I have not worked in that language in years but it was adopting c-like features decades ago. In our computational code, we replaced all memory allocation, system interface and I/o code with c, leaving the fortran code as basically algebra. That was far easier for the vector computer compilers to optimize due to well defined memory usage and layout. There was a tremendous amount of work in compilers for this stuff which can’t have gone away.

I would think that algebra and matrix math should be effective in any language that can be properly compiled for the architecture. Assuming an intermediate language or layer in the compiler, c and fortran (and other languages) share the working bits of the compiler. Well designed codes should be fine. And I assume lanl has good math. Good libraries also.

Some tuning might be required as architectures change but math code looks the same. Given a consistent api, the cs intensive stuff stuff can be in a different language calling libraries. Psi4 implements qm calculations in a python top level package.


Tried to read the report. Somehow the font was way, Way, WAY too small to read.

I don't know what concerns, worries, fears the report authors have about Fortran, but here is an easy chance for a solution:

There is an open source, easy to find program "f2c", as I recall and without looking up in my notes, from Bell Labs, that will translate Fortran source code to C source code.

In my project, I wanted to use some powerful, old, public Fortran code but wanted to call it from my .NET code via (Microsoft's .NET feature) "Platform Invoke" and found the documentation easier to use with C than Fortran. So I used f2c, compiled the C code, and used Platform Invoke to call the C code.

Worked fine! No problems. Then went on with my .NET code!!

Soooo, in simple terms, with f2c and C compilers, don't strictly need a Fortran compiler.


f2c works for Fortran 77, not for later Fortran standards.


Discussions about the report on the Fortran Discourse:

https://fortran-lang.discourse.group/t/an-evaluation-of-risk...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: