Fortran lectures using fpm

Is anyone aware of lectures or courses teaching Fortran making use of the Fortran Package Manager (fpm)?


So far I’m aware of those two:

Disclaimer: I’m responsible for exposing chemistry students in Bonn to fpm.

8 Likes

Last month I lead the hands on sessions of a Fortran course, where I introduced fpm to the students as soon as they learned how to create modules.
I’m still thinking about the optimal time when to introduce fpm, since I believe it is important to know how compiling/linking is done without fpm beforehand.
The last course started with data types, control flow, subroutines/functions, modules and after modules I gave a crash course on fpm.
The problem at this point in time was that most students were already used to doing it by hand or using CMake, and most of them didn’t migrate to fpm. Therefore I am trying to find a way to start with fpm right away and then later explore how it would work manually.

4 Likes

I have to disagree on this point, students don’t need to know how to compile and link to write programs in Fortran. Of course this knowledge is required at some point, but not necessarily from the very beginning. I actually found it harmful to teach compiling and linking at the beginning because it distracts from the actual objective, which is learning to program. Especially the introduction of the build system (make) always was a major headache for the tutors.

We switched our course from compiling by hand or with a Makefile to completely use fpm. But we still offered both options via tabbed content in sphinx to allow the students to decide, since fpm was really new at this point and could break in unforeseeable ways. Our experience was quite positive since the students were really productive with fpm.

4 Likes

Well, I kind of agree, but on the other hand I think knowing how to compile and build stuff is part of the ‘actual objective’.
Still, I think you might be right, it maybe isn’t that important to learn at the very beginning. Moreover I think it might be very interesting for the “first contact” with Fortran, to just generate a fpm project with fpm new first and then explore the generated code and experiment with it.

2 Likes

I think the key nuance to recognize here is between “it’s important to learn” and “it’s required”. I recommend introducing new things only at a time when they are truly required. This is something I learned from Manning. The moment a student truly needs a concept, there is an internal tension and a strong incentive to learn, for they can’t move forward without it. In contrast, a concept introduced as “important to learn” already carries an air of being optional (“Do I really need it? OK, I’ll figure it out when I need it”). I applaud all you pioneers who start a Fortran course with fpm new.

5 Likes