Page 1 of 1

Fortran ?!?

Posted: Tue Aug 13, 2024 2:03 pm
by SPerman
While running simulations in Solidworks I encountered an error message that indicated Solidworks (or more likely the analysis solver used in Solidworks) is using Fortran.
image.png
image.png (27.16 KiB) Viewed 2678 times
Fortran? Didn't that language die several decades ago? Mostly yes, but maybe it shouldn't have.

In a former life, I was charged with writing a vehicle dynamics simulation program. The front end of this simulation was in excel, with the code being written in VBA. After a couple of years of development we hired an engineer with a couple of decades of experience as a vehicle dynamicist, as well as a much stronger programming background than I had. (I didn't claim to be great at either.) When Dave came on board, he took the solver portion of the code and turned it into Visual Fortran code, which was then complied into a DLL to be referenced from Excel.

All of the "real" programmers gave/give him a hard time for using an ancient language. None of them believed him when he told them that he had done back to back comparisons, and despite what Microsoft and the rest of the world says, compiled Fortran code runs faster than compiled C+/C++/C# code, at least for heavy mathematical computations. To this day, no programmer wants to believe that their fancy new Visual Studio tools aren't as good as what was written in the dark ages.

As the company evolved, we eventually hired a degreed, experienced software engineer. Perry worked for Dave, and Dave challenged him to come up with a C DLL that outperformed his Fortran DLL. As I recall, the best the C could do was about 75% of the speed of the Fortran code. Now Perry and Dave are the only 2 people I know who believe Fortran still has a case use in the modern world. (Perry still won't code in Fortran, but he knows the truth.)

Re: Fortran ?!?

Posted: Tue Aug 13, 2024 4:17 pm
by KennyG
It is still used in commercial apps with heavy math. We use some DOE analysis tools, and they require installing the Intel Fortran redist. Apparently, it is super-efficient with large scale numerical arrays.

Re: Fortran ?!?

Posted: Tue Aug 13, 2024 5:44 pm
by Frederick_Law
No, HELL NO! No F king Fortran!
It's worse then LISP.

Re: Fortran ?!?

Posted: Tue Aug 13, 2024 6:35 pm
by JSculley
Fortran is still one of the best languages for matrix operations. Dassault's high end FEA software Abaqus uses it as well. As does ANSYS, Nastran and probably most other FEA software.

Re: Fortran ?!?

Posted: Tue Aug 13, 2024 7:29 pm
by SPerman
His solver did a lot of multi-dimensional matrix translations, so it sounds like it was the perfect Fortran candidate.

Re: Fortran ?!?

Posted: Wed Aug 14, 2024 10:48 am
by KennyG
Frederick_Law wrote: Tue Aug 13, 2024 5:44 pm No, HELL NO! No F king Fortran!
It's worse then LISP.
I've not used it since Fortran 77, but apparently it went through a major "remodel" with Fortran 2003 to support modern coding standards and object-oriented programming. Its latest update is Fortran 2023 (minor update) with the last major update being Fortran 2018. Guessing it may have changed a bit since either of us last used it.

Re: Fortran ?!?

Posted: Wed Aug 14, 2024 12:11 pm
by Frederick_Law
{{Not}{If}{it}{still}{look}{like}{this}}

It does look better now.

Re: Fortran ?!?

Posted: Wed Aug 14, 2024 6:02 pm
by bnemec
Frederick_Law wrote: Wed Aug 14, 2024 12:11 pm {{Not}{If}{it}{still}{look}{like}{this}}

It does look better now.
;;

Re: Fortran ?!?

Posted: Thu Aug 15, 2024 9:27 am
by TTevolve
I'm dating myself but I took the fortran programing class in college. Once you know the syntax it's not bad to program in. Back then it was used pretty much everywhere.

Re: Fortran ?!?

Posted: Thu Aug 15, 2024 9:36 am
by SPerman
The last time I programmed in Fortran was 1989, when I was a co-op in college. I took a class or two in Pascal, and we also received ADA training at that job.

Re: Fortran ?!?

Posted: Fri Aug 16, 2024 10:46 am
by Frederick_Law

Re: Fortran ?!?

Posted: Tue Aug 20, 2024 10:43 am
by Dtief190
Wow, I had no idea it was still around.. I had a FORTRAN class in high school. A terminal with a dial up MODEM, put the phone handset into an acoustic coupler.

Re: Fortran ?!?

Posted: Tue Aug 20, 2024 11:57 am
by JSculley
Frederick_Law wrote: Fri Aug 16, 2024 10:46 am https://hackaday.com/2024/08/16/a-moder ... -language/
Wow, that was fun to read.
We've come full circle:

https://www.emojicode.org/

Re: Fortran ?!?

Posted: Tue Aug 20, 2024 12:09 pm
by Frederick_Law
;;
🍓🍌🍎🍊
🥒🥬🍆🌽🌵

Re: Fortran ?!?

Posted: Tue Aug 20, 2024 7:46 pm
by doobes
LOL!

My masters thesis was a 3 dimensional analysis routine based upon Green's theorem written in.....

Fortran

But this was in 1983 ;)