First release of the Fortran standard library

I think Milan Curcic’s recent book especially focuses on Coarray parallel Fortran (Chapter 7). I do not have it unfortunately and I have not read it yet. Metcalf’s book “Modern Fortran Explained: Incorporating Fortran 2018” is also a comprehensive resource on Coarray Fortran. It is effectively a comprehensible version of the Fortran standard. Intel website also has many examples on Coarrays. There is more, but time is limited.

3 Likes

The fortran-stdlib package is presented in Guru repo (Gentoo user overlay) .

P.S.
There are also some more fortran related packages maintained by me: FoBiS, ford, ftl, gtk-fortran (update is required), opencoarrays, StringiFor.

I currently don’t use packages but I try to check if it’s build and pass tests if available.

Maybe opencoarrays package will be moved to main Gentoo portage tree.

The main Gentoo portage tree provides “Codeblocks + FortranProject plugin” (optionally, up to v1.8) out of the box.

4 Likes

Welcome to the forum, happy to see more package maintainers joining here.

I had to search a bit but found stdlib’s package file here:

I know ebuild files from the easybuild project, an HPC software management system. Is this the same thing?

Yes, that is the mentioned above package for fortran stdlib of Gentoo user repository (guru).

In this case the “.ebuild” is a file used by Gentoo package manager (portage) specifying how package manager should handle the package. It’s not related with HPC software management system.

A side question: what will be the scope of std? My understanding is that std to Fortran is like Boost to C++. Since Fortran’s focus is scientific computing, then std should grow to something like Scipy + Numpy.

Scope

The goal of the Fortran Standard Library is to achieve the following general scope:

  • Utilities (containers, strings, files, OS/environment integration, unit testing & assertions, logging, …)
  • Algorithms (searching and sorting, merging, …)
  • Mathematics (linear algebra, sparse matrices, special functions, fast Fourier transform, random numbers, statistics, ordinary differential equations, numerical integration, optimization, …)

That said, the scope is what the stdlib developers want it to be, and one can contribute code or make suggestions.

2 Likes

It’s also been discussed a few times before, some relevant threads:

1 Like

I’ve created a package for AUR (for Arch linux and related distributions): AUR (en) - fortran_stdlib

4 Likes

Thanks for doing this, some minor comments:

  • I recommend to use python-fypp for the preprocessor since most Python packages are prefixed this way
  • you don’t have the variables MINGW_PREFIX and _realname defined
  • the install prefix should be /usr

Here is a patch:

diff --git a/PKGBUILD b/PKGBUILD
index 181a951..574c86a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
 _fname=stdlib
 pkgname=fortran_${_fname}
 pkgver=0.1.0
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 pkgdesc="Fortran standard library"
 url="https://github.com/fortran-lang/stdlib"
@@ -22,7 +22,7 @@ build() {
 
   FC=gfortran cmake \
     -GNinja \
-    -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
+    -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_BUILD_TYPE=Release \
     -B"${_build}"
   cmake --build "${_build}"
@@ -34,5 +34,5 @@ package() {
   DESTDIR="${pkgdir}" \
   cmake --install .
 
-  install -Dm0644 ${srcdir}/${_fname}-${pkgver}/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE
+  install -Dm0644 "${srcdir}/${_fname}-${pkgver}/LICENSE" "${pkgdir}/share/licenses/${pkgname}/LICENSE"
 }

thanks! Should I add you as contributor?
I recently had a discussion regarding the python prefix and even though there are some inconsistencies, it seems to be best practice to prefix only python libraries while executables based on python don’t get a prefix