Register to reply

Will FORTRAN always be the premier programming language for science?

by Aaronvan
Tags: fortran, language, premier, programming, science
Share this thread:
Aaronvan
#1
Dec16-12, 08:05 PM
P: 37
Fortran has been around since the 1950s and obviously there is a large amount of Fortran code lying around. However, I'm curious if C or another programming language will someday supplant Fortran. Perhaps scientists will gravitate towards high-level math packages like Matlab and Maple, and programming skills will become less important. Any ideas or opinions out there?
Phys.Org News Partner Science news on Phys.org
An interesting glimpse into how future state-of-the-art electronics might work
Tissue regeneration using anti-inflammatory nanomolecules
C2D2 fighting corrosion
chiro
#2
Dec17-12, 04:35 AM
P: 4,573
Hey Aaronvan.

You posed a very interesting question and I'll give my take on it from a dev perspective.

There are two main things IMO in software that are a driving force in technology and dev work and they are automation and integration.

You automate more stuff that you can automate and you create a platform to integrate different technologies that do a specific job really well so that as an integrated set, they do one complex thing very very well.

The integration thing is what I want to focus on because it relates to complexity of the task involved.

It becomes necessary that as requirements go through the roof with regards to complexity, you get a situation where you need lots of different programs that do something well to communicate.

With libraries you can do this at some level as well as with scripting languages and SDK runtimes (like DLL libraries) and what i see happening is scientists being forced in the future to either get platforms that make this easy, or to get someone (possibly themselves) to implement the functionality in the existing platform.

So now you have to ask the question: what is the best platform?

I think personally it will depend on who's doing the work and what they are comfortable with.

If you have very specialized legacy platforms then that will probably stick until someone decides to upgrade to another platform.

If you have people that are more willing to migrate to new technologies then you could see quick shifts to things like MATLAB and bridging software that connects to Oracle or IBM databases and then to SAS and other technologies.

The really big software packages allow this kind of development to take place and if you can afford a highly paid programmer, then this is what they will do for you.

So I guess in short, the thing I wanted to say was that its all about integration to meet the needs of complex requirements and the culture and familiarity of the current platform will dictate whether one even wants to consider moving from that platform and migrating to something a bit more recent.
gsal
#3
Dec17-12, 10:51 PM
P: 875
gravitate to matlab? what do you think is behind matlab's array-handling, matrix-solving, linear algebra-capabilities? Fortran 90! So, as it is, I do my engineering calculation directly in Fortran 90, handling arrays and matrices as easy as you do in matlab and do it all for free...no need to pay thousands of dollars to keep matlab licenses around. Feel the need to higher level, friendlier, more capable on non-number-crunching things? glue it all together with python.

...but that's just me...oh, no, wait, it is not just me...a bunch of other engineers and scientist are doing it.

chiro
#4
Dec17-12, 11:01 PM
P: 4,573
Will FORTRAN always be the premier programming language for science?

MATLAB is a different platform to a pure C++ or FORTRAN environment.

It's the platform that is the issue and the platform is not the code: don't make that mistake.
Aaronvan
#5
Dec18-12, 09:38 AM
P: 37
Actually, current versions of Matlab are written in C. However, what language a package (either commercial or FOSS) is written in is irrelevant. The question was what will future scientists use?
gsal
#6
Dec18-12, 01:04 PM
P: 875
Chiro: The platform alone is not what the issue is; the first thing that Aaronvan wondered was whether C or another language (not framework or platform) would replace Fortran; THEN, also wondered if one day engineers would gravitate to higher level packages like matlab.

All I wanted to say is that Fortran 90 is free and has native array handling and that the "higher level" language of choice is increasingly becoming python (numpy, scipy, matplotlib). Python is sneaking into becoming the scripting language of choice for many open source programs like Blender, FreeCAD, Salomé and even commercial one like SAS and I am sure other one...but I wouldn't know because I don't have the need for commercial packages.

Aaronvan: matlab the front-end may be written in C, but, like I said, the backbone linear algebra package is in Fortran 90. You can visit their website and dig around.

I don't know how much into the future you want to speculate into...I mean, I am sure that eventually, there would be no need to know programming...you would simply tell the computer what you want to do and it would do it...people are already working on this.

gsal
turbo
#7
Dec18-12, 04:01 PM
PF Gold
turbo's Avatar
P: 7,363
Fortran will probably not outlast many of us, but it's pretty darned good. When I hit engineering school, we had to learn CUPL, and then move right to Fortran. A few years later, I was doing heat-and-mass balances around a new pulp mill, and Fortran was the go-to. Save the work to tape and send the tapes to the headquarters in Chester, PA, and wait for results.
AlephZero
#8
Dec18-12, 05:13 PM
Engineering
Sci Advisor
HW Helper
Thanks
P: 7,119
If you compare say Fortran II and Fortran 2003, there was (and is) a lot of truth in the old joke, "Scientific programmers don't care what language they use, so long as it's called FORTRAN". (And the other half of the joke was "Commercial programmers don't care what their language is called, so long as the syntax is identical to COBOL").
Aaronvan
#9
Dec18-12, 05:23 PM
P: 37
Are new engineers still learning Fortran?
Chronos
#10
Dec18-12, 06:28 PM
Sci Advisor
PF Gold
Chronos's Avatar
P: 9,436
Fortran is easy to learn and specifically designed for numerical computing. Its array handling ability is legendary and extremely fast. Its been around forever, so it has heaping helpings of libraries for almost any number crunching task you can imagine that is of interest to scientists. It also has excellent backwards compatibility. Code written 30 years ago can still be compiled. The easy to learn part is a big deal to scientists, who are generally not inclined to pursue an IT minor. You can learn everything you need to know in a single one semester class.
gsal
#11
Dec20-12, 09:29 AM
P: 875
I don't think "new" engineers are learning Fortran. Clearly, colleges stopped teaching Fortran and started to teach C and probably C++ (without teaching C first) and other colleges probably just teach Java (without teaching C first, etc).

The thing is that Web stuff is out there and everybody sees it and know about it, so, certain languages are popular and marketable.

The fact is that a very reduced part of the population are engineers and scientists.

The "new" engineers that need to learn Fortran, simply do as soon as the join the their corresponding field and/or industry...

Fortran is simple to learn and can be done by oneself. If you do not use ALL UPPERCASE to write your code, it is a very clean looking code, without braces or semicolons and all those ornaments.

...I started a brand new program a few weeks ago (fluid flow, Joule losses, cooling, etc) kept the flow calculation and gave the temperature calculation to a "new" engineer half my age, I told him we would do it in Fortran...gave him a couple of links to read up on it, let him see my own code (through git...he is in Europe, I am in America)....he already told me how much he likes Fortran and how easy it is to program.
Aaronvan
#12
Dec20-12, 12:36 PM
P: 37
Can I browse the code in your git repository?
gsal
#13
Dec20-12, 12:49 PM
P: 875
The software is proprietary and git repository behind the firewall. Sorry if I gave you the impression this was an open source; I work for a private company with offices around the world, I find myself working with people in Europe and Asia in my daily work life.

You can get your fill of Fortran programs and libraries from various on-line sites, here are some that would get you started:

http://fortranwiki.org/fortran/show/Libraries

http://www.fortran.com/tools.html

http://www.fortranlib.com/freesoft.htm

http://jean-pierre.moreau.pagesperso..._matrices.html
Aaronvan
#14
Dec20-12, 02:14 PM
P: 37
No prob. Thanks for the links. I'll check them out.
Astronuc
#15
Dec20-12, 06:07 PM
Admin
Astronuc's Avatar
P: 21,866
Quote Quote by Aaronvan View Post
Are new engineers still learning Fortran?
Some, perhaps very few, do. These days there has been a push to do scientific programming in C++. However, there is a huge amount of legacy code written in Fortran, and many older scientists and engineers prefer to keep working in Fortran. Some major engineering companies still develop their analytical software in Fortran.

I work on similar projects using C++ or Fortran, and in some cases a mix. I'm not proficient at C++, but in time, I hope to improve. I'm more comfortable in Fortran.
NemoReally
#16
Dec21-12, 01:54 AM
P: 194
Quote Quote by gsal View Post
Chiro: The platform alone is not what the issue is; the first thing that Aaronvan wondered was whether C or another language (not framework or platform) would replace Fortran; THEN, also wondered if one day engineers would gravitate to higher level packages like matlab.
There have been new languages and programming paradigms that will replace FORTRAN (or fortran) almost since it was invented ... Algol, anyone?

I don't know how much into the future you want to speculate into...I mean, I am sure that eventually, there would be no need to know programming...you would simply tell the computer what you want to do and it would do it...people are already working on this.
gsal
they've been working on it for ages .. LISP, anyone?

Looking at what's actually happening at the moment, eg preference analysis, I suspect we won't actually have to tell the computer to do anything - it will know it before you do because it's either worked out what you're likely to want or will have influenced you to want what it's going to give you.

I also suspect that if you asked to see the generated code it would prove illuminating ...

HUMAN: "Hey, but, but, ... that's FORTRAN!"
COMPUTER: "Aye, lad. if it were good enough for my grandad, it's good enough for me."
Dr Transport
#17
Dec22-12, 11:35 AM
Sci Advisor
PF Gold
P: 1,474
Quote Quote by Astronuc View Post
Some, perhaps very few, do. These days there has been a push to do scientific programming in C++. However, there is a huge amount of legacy code written in Fortran, and many older scientists and engineers prefer to keep working in Fortran. Some major engineering companies still develop their analytical software in Fortran.

I work on similar projects using C++ or Fortran, and in some cases a mix. I'm not proficient at C++, but in time, I hope to improve. I'm more comfortable in Fortran.
Much agreed, I have to push my new hires to learn FORTRAN because of our legacy codes which are written in a mix of FORTRAN/C++. Over the years I have found that C++ is good, but if you want pure computational speed for numerics, FORTRAN is the way to go, you just can't overcome the 50 years of development and tweaking of routines for speed in FORTRAN over the 30+ years of C/C++ which was written primarily for UNIX boxes and data manipulation.

After 15+ years of pure FORTRAN programming, I am now more comfortable in C++ having programmed that more the past decade or so. I can think of only one major project where I used FORTRAN from start to finish lately.
Astronuc
#18
Dec22-12, 12:33 PM
Admin
Astronuc's Avatar
P: 21,866
Quote Quote by Dr Transport View Post
Much agreed, I have to push my new hires to learn FORTRAN because of our legacy codes which are written in a mix of FORTRAN/C++. Over the years I have found that C++ is good, but if you want pure computational speed for numerics, FORTRAN is the way to go, you just can't overcome the 50 years of development and tweaking of routines for speed in FORTRAN over the 30+ years of C/C++ which was written primarily for UNIX boxes and data manipulation.

After 15+ years of pure FORTRAN programming, I am now more comfortable in C++ having programmed that more the past decade or so. I can think of only one major project where I used FORTRAN from start to finish lately.
I've traditionally used Fortran as our legacy codes (and those of others) are written in Fortran. Although I've heard about C++, I wasn't really introduced to it until a few years ago. It seems to be the preferred language for massively parallel computation (e.g., multiphysics FEA/CFD on various time and spatial (meshes) scales) - on clusters or supercomputers.


Register to reply

Related Discussions
Programming language for computational science in future Programming & Computer Science 5
Which programming language should I use? Programming & Computer Science 26
Recommended programming language (and texts) for middle-school beginner programming Programming & Computer Science 9
Which programming language do you use? Academic Guidance 20
C programming language Programming & Computer Science 1