Fortran ?!?

User avatar
SPerman
Posts: 2035
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2207
x 1860
Contact:

Fortran ?!?

Unread post 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 1533 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.)
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
KennyG
Posts: 219
Joined: Tue Mar 09, 2021 2:47 pm
Answers: 7
x 44
x 195

Re: Fortran ?!?

Unread post 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.
User avatar
Frederick_Law
Posts: 1944
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1634
x 1466

Re: Fortran ?!?

Unread post by Frederick_Law »

No, HELL NO! No F king Fortran!
It's worse then LISP.
User avatar
JSculley
Posts: 638
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 868

Re: Fortran ?!?

Unread post 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.
User avatar
SPerman
Posts: 2035
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2207
x 1860
Contact:

Re: Fortran ?!?

Unread post by SPerman »

His solver did a lot of multi-dimensional matrix translations, so it sounds like it was the perfect Fortran candidate.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
KennyG
Posts: 219
Joined: Tue Mar 09, 2021 2:47 pm
Answers: 7
x 44
x 195

Re: Fortran ?!?

Unread post 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.
User avatar
Frederick_Law
Posts: 1944
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1634
x 1466

Re: Fortran ?!?

Unread post by Frederick_Law »

{{Not}{If}{it}{still}{look}{like}{this}}

It does look better now.
User avatar
bnemec
Posts: 1941
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2540
x 1398

Re: Fortran ?!?

Unread post by bnemec »

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

It does look better now.
;;
TTevolve
Posts: 252
Joined: Wed Jan 05, 2022 10:15 am
Answers: 3
x 84
x 159

Re: Fortran ?!?

Unread post 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.
User avatar
SPerman
Posts: 2035
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2207
x 1860
Contact:

Re: Fortran ?!?

Unread post 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.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
Frederick_Law
Posts: 1944
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1634
x 1466

Re: Fortran ?!?

Unread post by Frederick_Law »

User avatar
Dtief190
Posts: 36
Joined: Tue Mar 16, 2021 12:04 pm
Answers: 0
Location: CT
x 69
x 17

Re: Fortran ?!?

Unread post 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.
User avatar
JSculley
Posts: 638
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 868

Re: Fortran ?!?

Unread post 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/
User avatar
Frederick_Law
Posts: 1944
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1634
x 1466

Re: Fortran ?!?

Unread post by Frederick_Law »

;;
🍓🍌🍎🍊
🥒🥬🍆🌽🌵
User avatar
doobes
Posts: 132
Joined: Sat Apr 16, 2022 5:59 pm
Answers: 1
Location: Williamsburg, VA
x 12
x 84
Contact:

Re: Fortran ?!?

Unread post 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 ;)
chris
Post Reply