Research articles using Fortran

The unpaywall extension for the Firefox web browser indicates this address maintained by the University of Bristol, UK as an open access to the author’s copy / accepted author manuscript.

1 Like

Thanks, I will try this extension.

It seems I may need it to access this Nature news :grin: :
How Unpaywall is transforming open science, Nature 560, 290-291 (2018)

https://doi.org/10.1038/d41586-018-05968-3

(Rent or buy this article - Get just this article for as long as you need it - $39.95)

1 Like

Well I didn’t say I disagreed with him or that he shouldn’t say it. I am also frustrated at times and was merely admiring the way he managed to slip those in there. Talk about getting hurt feelings :mirror:.

2 Likes

@everythingfunctional, @FortranFan let’s be nice to each other, we are on the same team.

I agree that the truth has to be told, and yes, it might not be comfortable.

However, that is only the first step. The next step is to fix it, and actually do the work and contribute such improvements to an existing compiler or start a new one. As usual, I invite everybody in this thread to send some pull requests to an existing compiler.

8 Likes

Polarons in two-dimensional atomic crystals
by Weng Hong Sio & Feliciano Giustino
Nature Physics (2023)

discussed in a ScienceDaily article

Simulations on the Texas Advanced Computing Center’s (TACC) Frontera supercomputer have helped scientists map for the first time the conditions that characterize polarons in 2D materials, the thinnest materials that have ever been made.

“We charted a map to indicate in which materials polarons should be found, under what conditions, and the characteristics of their properties,” said Feliciano Giustino, professor of Physics and the W. A. ‘Tex’ Moncrief, Jr. Chair of Quantum Materials Engineering at the Oden Institute for Computational Engineering and Sciences (Oden Institute) and the Department of Physics, College of Natural Sciences, The University of Texas at Austin.

Understanding polarons can help improve the performance and efficiency of devices such as touchscreens for phones and tablets, and the organic light-emitting diodes of OLED TVs, which rely on electric charge transport through polarons.

What’s more, generating hydrogen fuel from the splitting of water by sunlight is considered the ‘holy grail’ of energy science, a process which can be achieved through charge transport from polarons in key materials such as titanium dioxide.

Giustino is the lead author on work published February 2023 in Nature Physics. In it, he and study co-author Weng Hong Sio of the Oden Institute and the University of Macau determined the fundamental properties of polarons in 2D materials using quantum mechanical theory and computation.

Little has been known about polarons in 2D materials, until now. Polarons have been well-studied theoretically over the past 100 years, and characterized experimentally for three-dimensional bulk solids.

Giustino and Sio focused on atomically-thin crystal monolayers of hexagonal boron nitride (h-BN) on graphene as a case study, where polarons were computed and compared in the bulk crystal and in the monolayer. Next, they created a generalized model of polarons in 2D materials.

“Our aim was to understand where one can find polarons in two dimensions, and what are their properties. To do this, we used a new computational method that we developed,” Giustino said.

Giustino at the Oden Institute invented EPW, an open-source Fortran and message passing interface (MPI) code that calculates properties related to electron-phonon interaction using Density-Functional Perturbation Theory and Maximally Localized Wannier Functions. This code is currently developed by an international collaboration led by the Oden Institute.

“We used supercomputers to perform the calculations, primarily those of DOE (Argonne Leadership Computing Facility and National Energy Research Scientific Computing) as well as Frontera at TACC. EPW is something that we optimized very heavily on Frontera,” Giustino said.

During TACC’s Texascale Days, Giustino was awarded access to the full machine, allowing his group to perform full system runs on all 448,000 CPU cores of Frontera.

1 Like

Sergi Siso, Andrew R. Porter, and Rupert W. Ford. 2023. Transforming Fortran weather and climate applications to OpenCL using PSyclone. In Proceedings of the 2023 International Workshop on OpenCL (IWOCL '23). Association for Computing Machinery, New York, NY, USA, Article 10, 1–8. https://doi-org.insis.bib.cnrs.fr/10.1145/3585341.3585360

Saw this last week: [2305.01487] The muphyII Code: Multiphysics Plasma Simulation on Large HPC Systems

I’ve cherry-picked two community-relevant passages:

On the choice of a multi-language (C++/Fortran) design

C++ was chosen for the framework and logic parts of the code because of its flexibility. For the pure numeric calculations, Fortran was chosen because of the simplicity of its built-in multi-dimensional array operations. This allows for excellent compiler optimization and performance out of the box and makes the numeric implementation easy write and read at the same time. […] However, new physical models (like relativistic fluid or kinetic descriptions) can be added in any language like C++ or Julia. They only have to comply with the C++ interface functions.

This is an interesting way to do things. I wonder what the C++/Fortran interface actually looks like and how hard it is to maintain. From the sound of it, Fortran is relegated to just the compute-intensive kernels. I wonder if these parts of the code are leveraging features from recent Fortran standards, or if it is basically F95 style.

On the choice of OpenACC to leverage GPU accerleration:

The choice of OpenACC over low-level implementation with for example CUDA has been made for multiple reasons. The use of OpenACC significantly reduces development time and improves code readability and maintainability. The optimized OpenACC code performs well without rigorous adaption to
certain device architectures. Furthermore it can be run on accelerators from different manufacturers as
well as multi-core CPU systems which makes the muphyII framework very flexible.

I don’t have any serious GPU programming experience, but I can really sympathize with this argument. I am personally loathe to invest time toward learning vendor-specific technologies like CUDA. My pie-in-the-sky hope is that compilers will be able to use existing (and possibly future) Fortran language constructs so that there’s no longer a choice to make.

1 Like

My pie-in-the-sky hope is that compilers will be able to use existing (and possibly future) Fortran language constructs so that there’s no longer a choice to make.

This already basically works in Julia using libraries like KernelAbstractions. For example, see Porting WaterLily.jl into a backend-agnostic solver - Bernat Font which is blog post about making a CFD solver work on CUDA, ROCm, oneAPI, and Metal using the same code.

1 Like

Some recent arXiv preprints about the use of Fortran are

Optimization and Portability of a Fusion OpenACC-based FORTRAN HPC Code from NVIDIA to AMD GPUs
by Igor Sfiligoi, Emily A. Belli, Jeff Candy, and Reuben D. Budiardja
May 17, 2023

Method for portable, scalable, and performant GPU-accelerated simulation of multiphase compressible flow
by Anand Radhakrishnan, Henry Le Berre, Benjamin Wilfong, Jean-Sebastien Spratt, Mauro Rodriguez Jr., Tim Colonius, and Spencer H. Bryngelson
May 16, 2023

High-speed turbulent flows towards the exascale: STREAmS-2 porting and performance
by Srikanth Sathyanarayana, Matteo Bernardini, Davide Modesti, Sergio Pirozzoli, and Francesco Salvadore
April 11, 2023

2 Likes

N. R. Mamidi, D. Saxena, K. Prasun, A. Nemili, B. Sharma and S. M. Deshpande, “Performance analysis of GPU accelerated meshfree q-LSKUM solvers in Fortran, C, Python, and Julia,” 2022 IEEE 29th International Conference on High Performance Computing, Data, and Analytics (HiPC), Bengaluru, India, 2022, pp. 156-165, doi:10.1109/HiPC56025.2022.00031

Thread from August 2021, with discussion and links to preprint and GitHub repos:

1 Like

DOT_PRODUCT is something that has troubled me for many years, as it is the key function for direct linear equation solvers.

Although AVX registers can help with this function, we have long had claims of alignment issues (which should have been solved by hardware) and memory bandwidth limits when driving AVX performance. OpenMP just exacerbates the memory bandwidth problem.
64-bit with more memory, so larger vectors has only made the problem worse.

Basically if the vectors are not in cache, AVX does not achieve the quoted performance.

Unfortunately, I don’t know the solution, but why aren’t there efficient DOT_PRODUCT offerings based on the hardware available ? ie an SIMD DOT_PRODUCT instruction, that also addresses accumulator precision.

Król, R. and K. Król. 2023. “Multibody Dynamics Model of the Cycloidal Gearbox, Implemented in Fortran for Analysis of Dynamic Parameters Influenced by the Backlash as a Design Tolerance.” Acta Mechanica Et Automatica 17 (2): 272-280. doi:10.2478/ama-2023-0031

Bestehorn, Michael. Computational Physics: With Worked Out Examples in FORTRAN® and MATLAB®, Berlin, Boston: De Gruyter, 2023. https://doi.org/10.1515/9783110782523

Hum… FORTRAN® (sic! :face_with_raised_eyebrow:) In the Supplementary Materials, I have seen a few fixed form subroutines.

The ® was absent in the title of the 1st edition:
Bestehorn, Michael. Computational Physics: With Worked Out Examples in FORTRAN and MATLAB, Berlin, Boston: De Gruyter, 2018. Computational Physics

1 Like

Is this some alternative of the older Landau, Paez, Bordeianu - Computational Physics: Problem Solving with Computers https://www.amazon.com/Computational-Physics-Problem-Solving-Computers/dp/3527406263 ? I only have the new Python edition of this one, I did not even know that the older ones used Fortran.

1 Like

A Fortran version of “A First Course in Scientific Computing” (2005) is freely available from the Princeton University Press. The authors is listed as Rubin H. Landau, with Fortran Coauthors: Kyle Augustson and Sally D. Haerer. Unfortunately, the authors use real*8 declarations throughout.

3 Likes

The intermediate 2nd edition (by 2007, then Wiley) of Landau’s Computations Physics which worldcat describes as revised and enlarged can be borrowed from archive.org; it equally uses real*8.

1 Like

Ukkonen, P. and Hogan, R. J.: Implementation of a machine-learned gas optics parameterization in the ECMWF Integrated Forecasting System: RRTMGP-NN 2.0, Geosci. Model Dev., 16, 3241–3261, https://doi.org/10.5194/gmd-16-3241-2023, 2023.

ECMWF IFS is one of the few leading weather prediction models, implemented in Fortran. RRTMGP-NN, also implemented in Fortran, is loosely based on neural-fortran but heavily optimized for array layout and inference on GPUs via cuBLAS.

1 Like

Another project with a recent publication using neural networks in weather prediction, in Fortran, is

tcane_fortran: evaluate pre-trained artificial neural networks to estimate consensus hurricane intensity and track errors, as well as the associated uncertainties of the network predictions. Associated paper: Barnes, Elizabeth A., Randal J. Barnes and Nicolas Gordillo, 2021: Adding Uncertainty to Neural Network Regression Tasks in the Geosciences

1 Like

We provide an interface in the CASTEP Fortran code to evaluate any QUIP-compatible interatomic potential model, including GAP. We designed a simple interface of the Python code as a shell executable that can be used by the CASTEP code via system calls. Decisions are passed as shell exit codes, parsed by the Fortran code. The behavior of the decision-making code is controlled by an input file