Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Will FORTRAN always be the premier programming language for science?

  1. Dec 16, 2012 #1
    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?
     
  2. jcsd
  3. Dec 17, 2012 #2

    chiro

    User Avatar
    Science Advisor

    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.
     
  4. Dec 17, 2012 #3
    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. :smile:
     
  5. Dec 17, 2012 #4

    chiro

    User Avatar
    Science Advisor

    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.
     
  6. Dec 18, 2012 #5
    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?
     
  7. Dec 18, 2012 #6
    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
     
  8. Dec 18, 2012 #7

    turbo

    User Avatar
    Gold Member

    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.
     
  9. Dec 18, 2012 #8

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    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").
     
  10. Dec 18, 2012 #9
    Are new engineers still learning Fortran?
     
  11. Dec 18, 2012 #10

    Chronos

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  12. Dec 20, 2012 #11
    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.
     
  13. Dec 20, 2012 #12
    Can I browse the code in your git repository?
     
  14. Dec 20, 2012 #13
    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-orange.fr/f_matrices.html
     
  15. Dec 20, 2012 #14
    No prob. Thanks for the links. I'll check them out.
     
  16. Dec 20, 2012 #15

    Astronuc

    User Avatar
    Staff Emeritus
    Science Advisor

    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.
     
  17. Dec 21, 2012 #16
    There have been new languages and programming paradigms that will replace FORTRAN (or fortran) almost since it was invented ... Algol, anyone?

    they've been working on it for ages .. LISP, anyone? o:)

    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."
     
  18. Dec 22, 2012 #17

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  19. Dec 22, 2012 #18

    Astronuc

    User Avatar
    Staff Emeritus
    Science Advisor

    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.
     
  20. Dec 22, 2012 #19

    turbo

    User Avatar
    Gold Member

    Fortran could really scream on the computers of the '70s. Compared to the computation rates of modern computers and software, early Fortran might appear primitive and ineffective in comparison. Fortran was used to model products and services that we all used.

    I am not active in engineering/technology but is difficult to imagine that Fortran will die. Too much good, tight code out there. (BTW, "tight" means sparse and effective, and runs really fast on crappy processors.)
     
  21. Dec 23, 2012 #20

    jhae2.718

    User Avatar
    Gold Member

    I'm actually in the beginning phase of porting some FORTRAN simulation code to C++ right now. It's really the only important FORTRAN code we have in the lab I work in. General stuff is in Python or MATLAB, while embedded is C/C++, along with performance-critical stuff. A lot of prototyping is done in MATLAB. (I hate MATLAB, but most people seem to know it.)

    All the fluids people I know are married to FORTRAN*. The structures people in my department seem to mostly use C++, as do dynamics & control (my field/specialty). I'm pretty sure FORTRAN is always going to be around.

    I personally prefer C. I think C++, useful as it is, is overly complicated and bloated. If I get some time I also want to look at Google Go, which I think is an interesting language for distributed systems.


    [*] Is there any way to write it but in ALL CAPS? :)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Will FORTRAN always be the premier programming language for science?
  1. Programming Languages (Replies: 19)

  2. Programming language (Replies: 10)

  3. Programming languages (Replies: 16)

Loading...