Curious what most people are using Fortran for

Hi, I’m just interested in what most people are using FORTRAN for and I thought it might be fun to talk about.

I use it professionally mostly for writing CNC machine post-processors, but also other numerical utilities related to manufacturing. These are basically inverse-kinematic engines which take point-vectors and convert to machine kinematics between 2 and 7 axes. Naturally, FORTRAN is the best choice for its portability, easy to read/debug code, and very strong legacy in this field.

2 Likes

In my career I have used Fortran to price financial derivatives and backtest investment strategies. A recent project is

Since the Fortran 90 standard the preferred spelling is Fortran not FORTRAN.

5 Likes

Spent so many years all caps… :slight_smile:

5 Likes

I have used Fortran for solving partial differential equations or integral equations arising in fluid mechanics, and for plotting their solutions. Also for plotting contours in the complex plane that avoided branch cuts. Also for testing compilers for suspected bugs.

4 Likes

Professionally, I use Fortran for climate/Earth system modelling (process-based models), data analysis, statistics and machine learning.

Outside of work, I have used/am using Fortran for many projects, incl.:

  • a simple task manager,
  • an app to keep track of, analyse, and plot my daily calories and water intake and exercise,
  • a game engine (currently I’m re-implementing it, separating SDL-related stuff from the game system and other components),
  • a fantasy world generator for creating random world maps (for teaching and games).

It’s a fun and versatile language, after all. :slight_smile:

9 Likes

Fortran is used extensively in areas like structural dynamics/shock physics and CFD. In particular, codes like the Sandia CTH hydrocode and the EPIC dynamic finite element code are used extensively inside US DoD labs and some NATO partners for blast and penetration analysis. These are still to the best of my knowledge almost entirely Fortran. I think that LSDYNA and ABAQUS FEM codes are also still mostly Fortran. Two of NASA’s workhorse CFD codes OVERFLOW and FUN3D are still mostly Fortran. I think that Fortran still has a large footprint in the CWO (Climate, Weather, Ocean) modeling community. The DoD HPC center I worked at a few years ago would keep statistics on the types of codes (and the language they were written in) that burned the most cycles on their systems (very large Cray and SGI systems at the time). In most years, Fortran codes would burn 65 to 70 percent of all the cycles on those systems.

4 Likes

Some lists and repositories composed primarily of recent or maintained code might be of use:

https://github.com/topics/fortran

https://github.com/topics/fortran-package-manager

3 Likes

Most recently I use it when I need to do some Jackknife re-sampling. A naive implementation in python was too slow so I did some python bindings to the Fortran code. It also gets used directly in some Fortran analysis code for scale setting in Lattice quantum chromodynamics.

I rewrote some of our old simulation code in Modern Fortran a couple of years ago from F77. I used co-arrays which was probably a mistake at the time. This code can be thought of as evolving the solution to a DE from some initial conditions on some background.

I have another project for doing Lattice QCD related things which is not just analysis. This is a bit of a side-project mainly to explore writing some modern Fortran from scratch.

2 Likes

My group uses Fortran + MPI to simulate binary alloy solidification on the microstructure level, coupled with fluid flow, magnetohydrodynamics, and structural mechanics. The codebase implements a Cellular Automata method for solidification simulation, a D3Q19 Lattice-Boltzmann method for fluid flow, and a thermoelectrics solver for TEMHD.

Simulating the microstructure of real industrial components can push the requirements for domain size to O(10B) cells and compute to 100s-2k cores, and IO to 100s of GBs per output.

The codebase was written in F90 but borrowed a lot from imperative F77-style. Architecture and design was whatever each developer believed to be good enough at the time.

I’ve spent some time modernizing and improving the codebase to include fpm, (some) stdlib, modern interfaces using derived types for MPI and states/solvers, modern configuration using YAML + pydantic, etc.

2 Likes

My one attempt to use Fortran involved yet another game port (from Basic) of my pet Trek clone. I stopped upon realizing it was a step back from most other versions and didn’t offer me anything new.

2 Likes

Although now retired, I used Fortran for a wide range of radiotherapy-related models, from response of tumour and normal tissue to radiation, right up to a national model of incidence of cancer and demand for radiotherapy equipment and staff.

I am now working on pressure logging in our local water supply, and a model of flow and pressure distibution to take evidence to our water supply company! All in Fortran of course.

4 Likes

A retired manager in order to teach myself Fortran Coarray I wrote a program for simulating corporate monthly cash balances flowing from operations, planned investments and loans etc with the output transactions in a double entry accounting format.

3 Likes

Jane Sleightholme and I provide Fortran training and consultancy. Here is a list

of some of the people we’ve provided training for.

Nuclear industry

Nuclear fusion
Nuclear weapons
Naval reactors
Civil reactors
Nuclear Inspectorate

Weather forecasting

UK Met Office
Slovak Met Office

Econometric modelling

National Resources Canada

  • UK Bank of England
  • UK Treasury

Environmental

Centre for Ecology and Hydrology, Wallingford
UK Environment Agency

University sector

Imperial College
King’s College
DTU - Danish Technical University
University of Ulster, Jordanstown, Northern Ireland

Oil industry

Petroleum Geo-Services - Houston, Texas
Petroleum Geo-Services - Weybridge, UK

Aviation

Rolls Royce
UK Air Force - RAF Waddington
Qinetiq - European fighter
Westland Helicopters - now part of Finmeccanica

Car Industry

Ricardo

https://www.ricardo.com/en/who-we-are
https://www.ricardo.com/en/contact-us

Other

AMEC

https://www.woodgroup.com/

GE Vernova

https://www.gevernova.com/company/about

PTR - Independent Technical IT Training Providers

https://www.ptr.co.uk/

Jacobs

https://www.jacobs.com/
  • Approached for quotes for Fortran 90 conversion courses
4 Likes

So cool Norman. My older brother is a professor of oncology at Stanford. I know they use a lot of R in his lab. I bet the two of you would have a great conversation that I’d love to hear, even though I wouldn’t understand any of it. My brother is Dr. Dean Felsher. You can tell him Bryan Felsher put you in touch.

I use Fortran to simulate the motion of rockets and other flying objects. Over time the Fortran simulations are being replaced by new C++ simulations. We have partially modernized the Fortran, but there’s a long way to go, and the effort required can’t keep up with the momentum behind the new modern C++ sims.

2 Likes

Exploration geophysics for minerals & groundwater. Numerically modelling the response of electromagnetic surveys.

2 Likes

Numerical modelling of electrochemical analyses applied to high temperature aqueous corrosion tests in autoclaves.

2 Likes

I use Fortran for quantum chemistry (most of the codes are in Fortran) and more precisely, I’m developing a Quantum dynamics code and also several libraries in this field.

4 Likes

We have found Fortran in some interesting places. We have a library of codes which include:

The obvious ones:

  • Weather and Climate, e.g. WRF from UCAR
  • Ocean and river hydrodynamics, e.g. TELEMAC
  • Aerospace design and simulation (Can’t tell you - proprietary)
  • Radar signal processing, e,g, the tracking radars at DENEL/OTB
  • Power grid control (again proprietary)

But also:

  • Point of sale catalogue management
  • Insurance administration
  • Financial planning and simulation
  • Factory production control
  • Compilers - e.g. the ADSIM front-end, MPS10 and fpt itself.

Yes - you can write compilers in Fortran!

2 Likes

high performance computing

3 Likes