Sign in

FortranTip

@fortrantip.bsky.social
29 followers 4 following 23 posts

Tips about Fortran. I also post on X/Twitter and at Fortran Discourse. Past tips are at github.com/Beliavsky/FortranTip

PostsRepliesMedia
FortranTip @fortrantip.bsky.social · 27/05/2025
DO CONCURRENT communicates that an operation should be independent of order, but when there is no parallelization method the compiler must pick some order to follow. Marshall Ward ran some tests and suggests outer to inner loops. github.com/marshallward...
github.com
GitHub - marshallward/do-conc-order: Comparison of non-parallel do concurrent(i,j) vs do concurrent(j,i)
Comparison of non-parallel do concurrent(i,j) vs do concurrent(j,i) - marshallward/do-conc-order
021
FortranTip @fortrantip.bsky.social · 25/05/2025
OpenMP directives can be faster than DO CONCURRENT, since compiler writers have put more effort in implementing the former. fortran-lang.discourse.group/t/do-concurr...
fortran-lang.discourse.group
Do concurrent: not seeing any speedup
I am trying three different poisson solvers: Do loops: program poisson_solver implicit none integer, parameter :: nx=512, ny=512, max_iter=10000 real, parameter :: tol=1.0e-6, dx=1.0/(nx-1), ...
020
FortranTip @fortrantip.bsky.social · 11/05/2025
www.sovereign.tech/tech/gfortran The Sovereign Tech Fund is funding gfortran €360,000 to improve parallel computing support and make other improvements. It is used in climate modeling, aerospace, weather forecasting, computational chemistry, artificial intelligence, and other fields.
sovereign.tech
030
FortranTip @fortrantip.bsky.social · 04/05/2025
github.com/fortran-lang... Fprettify, written in Python, is probably the most used auto-formatter for modern Fortran code. It imposes strict whitespace formatting and integrates with editors such as Vim.
github.com
GitHub - fortran-lang/fprettify: auto-formatter for modern fortran source code
auto-formatter for modern fortran source code. Contribute to fortran-lang/fprettify development by creating an account on GitHub.
020
FortranTip @fortrantip.bsky.social · 27/04/2025
fortran-lang.discourse.group/t/gnu-fortra... Gfortran 15.1 is released. Fortran 2018 and 2023 locality specifiers to DO CONCURRENT are now supported, there is experimental support for unsigned types, and a -Wexternal-interface-mismatch option has been added, among other things.
fortran-lang.discourse.group
GNU Fortran 15.1 has been released
Greetings, the GCC developers announced the release of GCC 15.1. The change log mentions the following updates to GNU Fortran: Fortran 2018 and 2023 locality specifiers to do concurrent are now sup...
020
FortranTip @fortrantip.bsky.social · 26/04/2025
There are efforts to translate Fortran to C++ with LLMs, but Damian Rouson notes that Fortran concepts such as pure functions and SPMD parallelism with a PGAS that both work in distributed memory have no precise counterparts in C++. fortran-lang.discourse.group/t/scientists...
fortran-lang.discourse.group
Scientists are using artificial intelligence and large language models to rewrite old code in modern languages
I see several issues with translating Fortran to C++. The most fundamental is that Fortran has concepts and capabilities that C++ lacks (of course, the reverse is true too). A significant example is...
020
FortranTip @fortrantip.bsky.social · 21/04/2025
Vincent Lafage discusses the evolution of Fortran and how to evolve legacy Fortran codes in a video at youtube.com/watch?v=iXod..., starting at 8:47.
youtube.com
Webinar - Fortran on CPU and GPU
YouTube video by LAPP CNRS
010
FortranTip @fortrantip.bsky.social · 18/04/2025
github.com/Beliavsky/Ge... I wrote Python scripts that prompt LLMs to generate Fortran code and send them compiler error messages until the code compiles. On Groq Cloud, Facebook's llama-3.3-70b-versatile is a good coding model.
github.com
000
FortranTip @fortrantip.bsky.social · 07/04/2025
Compiler engineer Peter Klausler gives advice on writing portable Fortran and examples of non-portable code. github.com/klausler/for...
github.com
GitHub - klausler/fortran-wringer-tests: A collection of non-portable Fortran usage, standard-conformant or otherwise
A collection of non-portable Fortran usage, standard-conformant or otherwise - klausler/fortran-wringer-tests
010
FortranTip @fortrantip.bsky.social · 29/03/2025
If x is an allocatable array, x = y causes the compiler to check if x must be resized before y is copied to it. You can write x(:) = y to bypass the compiler check and perhaps boost speed, but this should be tested. fortran-lang.discourse.group/t/optimizing...
fortran-lang.discourse.group
Optimizing vectorized array operations
There are lots of really good answers here! So I won’t add to those. Let me just add a final note which makes array-syntax sub-optimal, and in this suggestion, it can kill performance. When you do ...
010
FortranTip @fortrantip.bsky.social · 28/03/2025
Gfortran has a DEPRECATED attribute and ifx has a MESSAGE directive to warn about procedures that should not be called in new code but must be preserved for backwards compatibility. fortran-lang.discourse.group/t/what-are-t...
fortran-lang.discourse.group
What are the versioning/dev rules of stdlib?
GCC offers a deprecated attribute: module a contains subroutine foo !GCC$ ATTRIBUTES DEPRECATED :: FOO print *, "Don't call me." end subroutine end module use a, only: foo call foo end that shows a...
020
FortranTip @fortrantip.bsky.social · 26/03/2025
fortran-lang.discourse.group/t/intel-fort... Intel Fortran compiler 2025.1 released
fortran-lang.discourse.group
Intel Fortran compiler 2025.1 released
Intel(R) Fortran Compiler 2025.1.0 was released today. There are a few minor features from Fortran 2023, OpenMP 6.0. These features were part of a total of 168 edits over the 2025.0 release and incl...
010
FortranTip @fortrantip.bsky.social · 20/03/2025
Slides and video for the talk "Fortran 2023 for you: Features and tools" by Katherine Rasmussen are at hpc.fau.de/2025/03/03/n...
hpc.fau.de
NHR PerfLab Seminar: Fortran 2023 for you: Features and tools (March 10, online)
Speaker: Katherine Rasmussen (Lawrence Berkeley National Laboratory) Date and time: Monday, March 10, 2025, 4:00 p.m. CET [3:00 p.m. GMT, 8:00 a.m. PDT] (online) – note the change of date &
000
FortranTip @fortrantip.bsky.social · 17/03/2025
github.com/guntherwille... "When reading a file, line by line, and using a character array with fixed length (len attribute) to store it, trailing spaces will be added to fill the character string." To avoid this, in the READ statement use advance="no", set the size, and reallocate.
github.com
GitHub - guntherwillems/fortran-file-read: Fortran, read a text file without losing trailing spaces
Fortran, read a text file without losing trailing spaces - guntherwillems/fortran-file-read
100
FortranTip @fortrantip.bsky.social · 16/03/2025
fortran-lang.discourse.group/t/first-time... Jean-Christophe Loiseau gives a set of numerical algorithms to code to learn a scientific programming language such as Fortran. His book loiseaujc.github.io/Scientific_C... uses NumPy and SciPy.
fortran-lang.discourse.group
First time fortran-lang programmer : advice for a newbie?
An excellent resource for beginners is the book Modern Fortran: Building efficient parallel applications by @milancurcic, particularly if you’re interested in using Fortran for scientific computing ap...
020
Reposted by FortranTip
Jacob Williams @degenerateconic.bsky.social · 12/03/2025
#Flang #LLVM #Fortran blog.llvm.org/posts/2025-0...
blog.llvm.org
LLVM Fortran Levels Up: Goodbye flang-new, Hello flang!
LLVM has included a Fortran compiler “Flang” since LLVM 11 in late 2020. However, until recently the Flang binary was not flang (like clang) but instead flang-new. LLVM 20 ends the era of flang-new.
041
FortranTip @fortrantip.bsky.social · 09/03/2025
hpc.fau.de/2025/03/03/n... Katherine Rasmussen will give an online talk "Fortran 2023 for you: Features and tools" on Monday March 10 4:00 p.m. CET. One topic will be the Julienne unit testing framework
hpc.fau.de
NHR PerfLab Seminar: Fortran 2023 for you: Features and tools (March 10, online)
Speaker: Katherine Rasmussen (Lawrence Berkeley National Laboratory) Date and time: Monday, March 10, 2025, 4:00 p.m. CET [3:00 p.m. GMT, 8:00 a.m. PDT] (online) – note the change of date &
000
FortranTip @fortrantip.bsky.social · 07/03/2025
github.com/fortuno-repo... Fortuno is a flexible & extensible object-oriented Fortran unit testing framework for serial, MPI-parallel and coarray-parallel projects that minimizes boilerplate code when writing tests while prioritizing modularity and extensibility.
github.com
GitHub - fortuno-repos/fortuno: Flexible & extensible object oriented Fortran unit testing framework for serial, MPI-parallel and coarray-parallel projects
Flexible & extensible object oriented Fortran unit testing framework for serial, MPI-parallel and coarray-parallel projects - fortuno-repos/fortuno
020
FortranTip @fortrantip.bsky.social · 06/03/2025
beliavsky.github.io/Fortran-pack... Here are 400 projects that work with the Fortran Package Manager, listed by topic. FPM lets you build a program/library, run the executables/tests, and distribute it as a dependency to other projects.
beliavsky.github.io
Projects that can be built with the Fortran Package Manager. Also see fortran-lang package index. Please suggest changes here.
List of projects that can be built with the Fortran Package Manager
020
FortranTip @fortrantip.bsky.social · 01/03/2025
github.com/Beliavsky/Fo... Many books with Fortran code have been published in the fields of numerical analysis, mathematical optimization, CFD, finite elements, physics, chemistry, and statistics. They are listed by subject at the repo.
github.com
GitHub - Beliavsky/Fortran-related-books: Books with Fortran code, other than textbooks, listed by subject
Books with Fortran code, other than textbooks, listed by subject - Beliavsky/Fortran-related-books
010
FortranTip @fortrantip.bsky.social · 26/02/2025
github.com/zoush99/f-ikos F-IKOS is a static analyzer for Fortran programs by Sheng Zou et al. that can find run-time errors such as division by zero. It is based on the IKOS analyzer for C and C++. Paper: ceur-ws.org/Vol-3864/qua...
github.com
GitHub - zoush99/f-ikos: This is a static analyzer for Fortran programs, named F-IKOS. It is based on IKOS, and we have made some modifications to make it more powerful.
This is a static analyzer for Fortran programs, named F-IKOS. It is based on IKOS, and we have made some modifications to make it more powerful. - zoush99/f-ikos
010
FortranTip @fortrantip.bsky.social · 25/02/2025
github.com/t-kalinowski... Quickr transpiles numerical R functions with declarations to Fortran, with a 100x typical speed-up.
github.com
GitHub - t-kalinowski/quickr: R to Fortran Transpiler
R to Fortran Transpiler. Contribute to t-kalinowski/quickr development by creating an account on GitHub.
020
FortranTip @fortrantip.bsky.social · 24/02/2025
fortran-lang.org/learn/oop_fe... Fortran-lang just added an article "Putting Fortran’s object-related features to practical use" by Reinhold Bader, revised by nbehrnd, covering object-based and object-oriented programming techniques and performance and ease of use.
fortran-lang.org
Putting Fortran’s object-related features to practical use — Fortran Programming Language
Fortran : High-performance parallel programming language
020