Earlier quoted context omitted.
This is absolutely correct - Fortran standards after 90/95 have mostly added extra features, rather than fundamental changes to how people write Fortran. Fortran 2003 added OO support, but I don’t believe that has seen widespread adoption.
Fortran 2003 also added BIND(C) and ISO_C_BINDING, which are massively useful in standardizing the C interop.
Why are most climate models in Fortran?
71–80 of 136 posts
Re: Why are most climate models in Fortran?
#72TFA would seem more reliable if it didn't have such a needlessly obscurantist Fortran-python code comparison. Nothing about the two languages calls for different base case logic! That is, in order to prevent confusion, the "Python3" code should have been this: def fibonacci(n): if n
I haven't written Fortran in a while, but I was pretty sure that for illustrative examples like this, you could dispense with the entire MODULE declaration, the use of END FUNCTION Fibonacci instead of just END, and the usually-optional :: separator between the variable's type and name.
Something like this? Again, no recent experience:
implicit none
recursive function fibonacci(n) result (fib)
integer n
integer fib
if (n
(The IMPLICIT NONE has to stay because of the now-regrettable Fortran convention that without it, the type of a variable is determined by the first character of the name (n would be integer because variables starting with m, n, i, etc. are integer, while fib would be floating point).)Re: Why are most climate models in Fortran?
#73Earlier quoted context omitted.
Open question: why are multi-dimensional arrays, and matrices specifically, so neglected in almost every other language? They map well to practically freakin' everything , for what seems like.. not that much effort on the language design side, but an enormous amount of tedious, duplicated effort on the user side.
Because the only place you really need them is in mathematical/scientific computing, and while many scientists tend to pick up a little programming for their research, the vast majority of computer scientists and programmers, in particular the ones with the interest and ability to work on languages, are not concerned with mathematical modeling/processing. It is a fairly rare interdisciplinary combination.
Re: Why are most climate models in Fortran?
#74I work at one of the labs mentioned and get paid for running not only the climate models but mesoscale models as well, which are also written in Fortran. The premise of the article is that Fortran, 70 years later is still an appropriate tool to use for crunching numbers which it absolutely is but it neglects one major problem. Like the COBOL issue that was all the rage 20 years ago, it is difficult to hire younger ge…
> I work at one of the labs... > ...it is difficult to hire younger generation programmers that want to and are excited to develop in Fortran. How much are you paying? Most often times I see this kind of reasoning, digging deeper shows that the salaries are not competitive. There's a large number of us that just want to work on interesting problems for adequate money and don't care what the toolset is. I'm fully on b…
Re: Why are most climate models in Fortran?
#75Earlier quoted context omitted.
> I work at one of the labs... > ...it is difficult to hire younger generation programmers that want to and are excited to develop in Fortran. How much are you paying? Most often times I see this kind of reasoning, digging deeper shows that the salaries are not competitive. There's a large number of us that just want to work on interesting problems for adequate money and don't care what the toolset is. I'm fully on b…
Let's just say labs pay way better than universities.
Re: Why are most climate models in Fortran?
#76Earlier quoted context omitted.
Open question: why are multi-dimensional arrays, and matrices specifically, so neglected in almost every other language? They map well to practically freakin' everything , for what seems like.. not that much effort on the language design side, but an enormous amount of tedious, duplicated effort on the user side.
That is a great question, and while I don’t know for sure, I think a relevant anecdotal observation that stands out to me is that many languages which do have first-class multidimensional arrays also have one-based indexing. And I would speculate this in turn is because most people who wanted matrices badly enough to make them a language feature wanted to do linear algebra with them, where you generally also want one…
Re: Why are most climate models in Fortran?
#77Re: Why are most climate models in Fortran?
#78Earlier quoted context omitted.
That is a great question, and while I don’t know for sure, I think a relevant anecdotal observation that stands out to me is that many languages which do have first-class multidimensional arrays also have one-based indexing. And I would speculate this in turn is because most people who wanted matrices badly enough to make them a language feature wanted to do linear algebra with them, where you generally also want one…
I don't get why a language can't have both 0 and 1 based indexing, just set it as a compiler flag or something. They are a homomorphism, it's not hard to add or subtract one.
[1] https://stackoverflow.com/questions/48562873/zero-indexed-ar...
Re: Why are most climate models in Fortran?
#79I don't entirely agree with the overall assertion of this article. The author has some valid points, but I think it misses the forest for the trees.
TLDR: I think Fortran tooling and HPC clusters are a self-reinforcing local maximum. They are heavily optimized for each other, but at the cost of innovation and extensibility.
For example, we'll never get a fully differentiable climate model in Fortran. The tooling does not exist, and there are not enough Fortran developers to make a serious dent in the tooling progress made outside of the HPC world. The MPI stacks these codes rely on are not great for hardware outside of a supercomputer, and Fortran codes basically are built around full interconnect. I have many PFLOPs at my disposal that I cannot use because these codes are too brittle without being entirely rewritten.
At the end of the day, everything is a Turing machine, so you can technically do whatever you want in Fortran or any other language (or mix and match), but strategically staying in Fortran leaves a lot of resources on the table.
Re: Why are most climate models in Fortran?
#80I work at one of the labs mentioned and get paid for running not only the climate models but mesoscale models as well, which are also written in Fortran. The premise of the article is that Fortran, 70 years later is still an appropriate tool to use for crunching numbers which it absolutely is but it neglects one major problem. Like the COBOL issue that was all the rage 20 years ago, it is difficult to hire younger ge…
[1] www.simpack.com