Skip to content

GSoC 2023 Project ideas

Ondřej Čertík edited this page Mar 20, 2023 · 17 revisions

Welcome to the Fortran-Lang ideas page for contributors applying for Google Summer of Code (GSoC). If you are interested in applying for GSoC, see the Contributor Instructions for more information on how to apply.

The list here is based on priorities identified by Fortran-Lang contributors and should inform you about the state and direction of each project. If you are interested in an idea on this page, please contact us on our Discourse to ask any questions and get the latest information about the project idea. Please read the existing discussion(s) in any linked issues.

The project ideas on this page are grouped by the repository. Please familiarize yourself with each repository before exploring the ideas here.

We are not limited to the project ideas listed on this page. If you have your own project idea that is not listed here, let us know.

Contacts for prospective mentors: Mentors list

Version Constraint Resolution (fpm)

The current decentralized package system in fpm allows dependencies to be fetched via a git repository URL. As part of this, a git tag or commit can be given to require a specific version of a dependency. There is however no way of specifying version compatibility requirements (e.g. >= 1.0.0, <2.0.0) and no way to resolve such requirements across a dependency tree.

This project will involve:

  • Defining a manifest syntax for version compatibility matching
  • Implementing support in fpm for solving a set of version compatibility constraints

A possible approach would be to interface with an existing satisfiability solver such as:

  • libsolv: interface via iso_c_binding as a separate fpm package

See also: existing options for version matching syntax:

Expected outcomes: Implemented a working version constraint mechanism in fpm

Skills preferred: Fortran programming, experience with one or more build systems

Difficulty: intermediate, 350 hours

Mentors: Brad Richardson (@everythingfunctional), Sebastian Ehlert (@awvwgk), Umashankar Sivakumar (@usivakum)

Local Package Repository (fpm)

Fpm currently supports decentralized package dependencies whereby dependencies are specified without a central registry. A long-term goal for Fortran-Lang is to host a community-supported registry of fpm packages and for fpm to support interfacing with this and other registries to simplify dependency management.

This project idea aims to accomplish a major step towards a central package registry by implementing support in fpm for a locally hosted package registry. In particular, this project will entail:

  • Defining the manifest syntax to use dependencies from a registry
  • Implementing support for looking up and loading a (local) registry
  • Allowing fpm to manage a local registry by fetching it from a remote registry

Related issues:

  • fpm#321: Implement support for a local registry
  • fpm#35: Full package registry

See also:

Expected outcomes: Implemented a repository of fpm packages as a service

Skills preferred: Fortran programming, experience using fpm and one or more package managers

Difficulty: intermediate, 350 hours

Mentors: Laurence Kedward (@lkedward), Brad Richardson (@everythingfunctional), Milan Curcic (@milancurcic)

Extended Testing Support (fpm)

The aim of this project is to create a manifest specification to provide defaults to executable targets in fpm projects. Information can be passed as environment variables, command-line arguments or as a runner. Desired features include:

  • Programs should have a way to find resources of which the relative position within the project source directory is known.
  • The current binary directory to access other targets within a project.
  • Default runners like mpirun/cafrun or scripts from test frameworks should be usable to launch programs.
  • A general syntax to define environment variables and command-line arguments should be defined.

Some features should be implemented directly in fpm, while more elaborated functionality could be implemented in a separate fpm package as an official Fortran-lang fpm package.

Related issues:

Related discussions:

  • fpm#328: Example which requires external data

Expected outcomes: fpm has broader and deeper testing functionality

Skills preferred: Fortran programming and writing unit tests

Difficulty: easy, 175 hours

Mentors: Sebastian Ehlert (@awvwgk), Brad Richardson (@everythingfunctional)

Source Code Distribution with Foreign Build Systems (fpm)

The aim of this project is to enable fpm to create source code distributions of itself that can be bootstrapped without fpm. Desired features include:

  • Allow fpm to generate source code distributions with non-fpm build systems.
  • Generated source code distribution should allow to build fpm project without fpm, git or internet access.
  • Potential third-party build systems are CMake and Meson.
  • Allow easier distribution and packaging of fpm via various packaging ecosystems.

Related issues:

  • fpm#69: Have CMake and Make backends
  • fpm#70: Have a Conda backend

Expected outcomes: fpm can generate source code distributions of packages that can be build using CMake and/or Meson.

Skills preferred: Fortran programming, experience using one or more build systems

Difficulty: intermediate, 175 hours

Mentors: Sebastian Ehlert (@awvwgk), Laurence Kedward (@lkedward)

Standard Conformance Suite

Fortran compilers' support for ISO Fortran standards generally lag the publication of the standard by several years or longer. Fortran consultants Ian Chivers and Jane Sleightholme periodically publish a paper containing a table detailing the standard features supported by 10 compilers. Gathering the tabulated data requires a considerable amount of effort on the part of the authors and the compiler developers. The chosen venue for publishing the table also puts it behind a paywall: access requires a subscription to ACM SIGPLAN Fortran Forum. The project will automate the generation of the table, make it more detailed and empower the community to contribute to by submitting small tests to an open-source conformance test suite.

Prior work:

Expected outcomes: A comprehensive test suite that generates a report of standard conformance for any Fortran compiler. The suite is not expected to be 100% complete by the end of the project, but should be significant in terms of standard coverage.

Skills preferred: Fortran programming, experience reading and interpreting the Fortran Standard, and writing tests

Difficulty: advanced, 350 hours

Mentors: Damian Rouson (@rouson), Arjen Markus (@arjenmarkus), Ondřej Čertík (@certik)

Support for C++ (fpm)

Enabling fpm to compile C++ projects would make a whole number of projects available in the Fortran ecosystems, most importantly the LFortran compiler and its AST parser. This requires fpm to handle C++ headers and modules (source scanner) and being able to link Fortran and C++ correctly into executables.

Expected outcomes: fpm integrates with a C++ compiler and successfully builds a C++ package.

Skills preferred: Fortran and C++ programming

Difficulty: easy, 175 hours

Mentors: Sebastian Ehlert (@awvwgk), Ivan Pribec (@ivan-pi), Umashankar Sivakumar (@usivakum)

Parallel builds (fpm)

Currently, fpm builds Fortran packages serially: one file at a time. Because fpm is written in Fortran, however, independent branches of the file dependency tree could be built parallel using Fortran's native parallel programming features, which are usually referred to as Coarray Fortran. The International Fortran Conference 2021 keynote address presented a mock demonstration how the use of the Framework for Extensible Asynchronous Task Scheduling (FEATS) could be applied to parallelize the fpm build process based on traversing a dependency tree encapsulated in a Directed Acyclic Graph (DAG) bobject.

Expected outcomes: fpm successfully executes package-building processes in parallel

Skills preferred: Fortran programming and parallel programming

Difficulty: advanced, 350 hours

Mentors: Damian Rouson @rouson Brad Richardson @everythingfunctional

File system library (stdlib)

Currently, file system operations such as listing contents of directories, traversing directories, and similar, are restricted to 3rd party libraries and compiler extensions that are platform-specific and not portable. This project will entail designing and implementing a cross-platform solution for file system operations.

Related issues:

  • stdlib#201: File system operations
  • stdlib#220: API for file system operations, directory manipulation

WIP implementation:

Expected outcomes: Implemented an stdlib module that provides cross-platform file-system utilities

Skills preferred: Fortran and C programming, experience using Linux, macOS, and Windows

Difficulty: intermediate, 350 hours

Mentors: Arjen Markus (@arjenmarkus), Milan Curcic (@milancurcic)

Library to work with OS processes (stdlib)

Cross-platform solution to abstract POSIX and Windows API for creating subprocesses.

Related issues:

Discourse thread:

Difficulty: intermediate, 350 hours

Mentors: Sebastian Ehlert (@awvwgk)

Sparse matrices (stdlib)

Implementing a standardized API for procedures to handle (COO and CSR) sparse matrices. Both non-OO low-level API and OO API should be implemented.

Related issue: #38

WIP implementation: #189

Expected outcomes: Implemented sparse matrix functionality in the stdlib_linalg module

Skills preferred: Fortran programming, understanding of linear algebra

Difficulty: advanced, 350 hours

Mentors: Ondřej Čertík (@certik), Ivan Pribec (@ivan-pi), Jeremie Vandenplas (@jvdp1)

Faster string to number conversion (stdlib)

This project would implement a library or a module for stdlib for fast number parsing in Fortran. It could involve:

  • Extend the methods for different number types
  • Enable defining by the user whether to use ‘.’ or ‘,’ as the decimal place marker. ‘e’/‘E’ or ‘d’/‘D’ for the exponent in case of floats.
  • Explore ways to improve robustness and efficiency, e.g. error handling.
  • Testing and benchmarking across compiler vendors, operating systems, and CPU architectures.

Relevant thread on Fortran Discrouse: Faster string to double

WIP implementation: Fortran-String-to-Num

Expected outcomes: Implement a standalone library or a stdlib module for fast string to real conversion

Skills preferred: Fortran and C programming, understanding of floating-point arithmetic

Difficulty: advanced, 350 hours

Mentors: Jose Alves (@jalvesz)), Carl Burkert (@carltoffel) Brad Richardson (@everythingfunctional), Ivan Pribec (@ivan-pi)

Compile stdlib, fpm, and other Fortran-lang projects (LFortran)

In this project, the student would work on implementing LFortran features toward successfully compiling stdlib, fpm, and other Fortran-lang projects.

The project can be any one of the following,

  1. Compile with --symtab-only mode (Recommended for 18 hours/week sized projects)
  2. Compile with normal lfortran i.e., without using any extra flags - stdlib already compiles with --symtab-only mode (though stdlib/tests don't work as of now but other than that everything works). For compiling without any flags, the work is in progress. This gist contains instructions to find out the current state. You can do something similar for fpm and other Fortran-lang projects. Note that, it would be good to use a specific commit of stdlib, fpm through out the project, instead of always using the master/main branches. (Recommended for 36 hours/week sized projects. For stdlib we will consider 18 hours/week sized projects because, --symtab-only mode is already working to a great extent).
  3. Adding support to LLVM backend for stdlib - This cannot be done without significantly making progress on second idea (i.e., the above point). So, it is recommended for 36 hours/week sized projects.

Expected outcomes: LFortran can build stdlib and fpm.

Skills preferred: Fortran and C++ programming

Difficulty: intermediate, 350 hours

Mentors - Gagandeep Singh (Gitlab - @czgdp18071)

Compiling SciPy with LFortran

Compile all Fortran files in SciPy with LFortran. This project involves making improvements to the fixed form parser in LFortran if needed and then mainly implementing the rest of the semantics that is needed to compile the Fortran files with LFortran.

Being able to compile SciPy with LFortran would make a huge impact on both LFortran and SciPy.

Expected outcomes: LFortran can compile all Fortran code in SciPy.

Skills preferred: Fortran and C++ programming

Difficulty: intermediate, 350 hours

Mentors - Ondřej Čertík

Parser + ASR (for F2PY)

Enhance the frontend parser to allow for more generic extensions and keywords. In particular, parsing the pyf or signature file format consumed by F2PY. This would mean that SciPy can be directly transformed to the ASR representation without a fixed form parser.

This also involves adding nodes to the ASR itself.

Difficulty: intermediate, 350 hours

Expected outcomes: LFortran's ASR is improved such that it can parse the pyf format consumed by F2PY.

Skills preferred: Fortran and C++ programming

Mentors: Rohit Goswami (@HaoZeke)

Language Server (LFortran + fortls)

This project would be used to first serialize the ASR and then use it within a language server.

Expected outcomes: LFortran can be used as a Fortran language server that can be used in other software such as source code editors and IDEs.

Skills preferred: Fortran and C++ programming

Difficulty: intermediate, 350 hours

Mentors: Ondřej Čertík (@certik), Giannis Nikiteas (@gnikit)

Other LFortran ideas

See LFortran's ideas list for more ideas for GSoC projects: https://github.com/lfortran/lfortran/wiki/GSoC-2023-Ideas

Coarray Fortran Framework of Efficient Interfaces to Network Environments (Caffeine)

This project would add support for grouping images (parallel processes) into teams that allow submodes to execute independently. Caffeine 0.1.0 uses the GASNet-EX networking middleware software as a back end for supporting most of the non-coarray parallel features of Fortran 2018 except for the intrinsic derived team_type and related features. Work is underway to support the coarray features that most applications will need for expressing custom parallel algorithms. The teams feature set is the one significant non-coarray parallel group of features not yet implemented in Caffeine.

Expected outcomes: Caffeine can be used to create images groups in execution parallel programs

Skills preferred: Fortran and C programming

Difficulty: intermediate, 175 hours

Mentors: Damian Rouson (@rouson)

Get fortran-lang/minpack to be used in SciPy

fortran-lang/minpack #14

The participant would work with Fortran-lang and SciPy teams toward implementing fortran-lang/minpack in SciPy.

Expected outcomes: fortran-lang/minpack is incorporated into SciPy.

Skills preferred: Fortran-C interop, Python

Difficulty: easy, 175 hours

Mentors: Sebastian Ehlert (@awvwgk)

High-level HTTP client library

In this project, the contributor would work toward implementing a high-level library for HTTP requests, similar to the Python requests library. The library would allow Fortran programmers to make all standard HTTP request methods (GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, and PATCH). This project can use fortran-curl, a set of Fortran bindings to libcurl, under the hood or as a starting point. The outcome of this project is that consuming HTTP web services from Fortran applications would become significantly easier than ever before.

Expected outcomes: Implemented a minimal but working capability to make HTTP requests from Fortran and parse data from response body and headers

Skills preferred: Fortran and C

Difficulty: intermediate, 350 hours

Mentors: Philipp Engel (@interkosmos), Milan Curcic (@milancurcic)

Optimizers in a deep learning framework

neural-fortran is a parallel Fortran framework for deep learning. Currently, neural-fortran is capable of training and inference of dense (fully connected) and convolutional neural networks using stochastic and mini-batch gradient descent optimizers. However, more versatile training and learning from a broader range of problems and datasets require other optimization algorithms such as RMSprop, Adam, and similar (e.g. see Keras optimizers). In this project, the contributor would implement, document, and test several most commonly used optimizers. The outcome of this project would be much broader applicability of neural-fortran.

Expected outcomes: Design and implement several popular optimizers in neural-fortran

Skills preferred: Fortran, linear algebra

Difficulty: intermediate, 175 hours

Mentors: Milan Curcic (@milancurcic), Jeremie Vandenplas (@jvdp1)

Improving fastGPT: Making it Faster, Easier to Use, and More General

The fastGPT project is a Fortran implementation of GPT-2 that is comparable in speed to PyTorch. Although it is already very fast on CPUs, there is still room for improvement in terms of usability and performance on CPU and other architectures, such as GPUs.

This project aims to explore various aspects of fastGPT to improve its usability and performance. Some potential areas of exploration include:

  • Parallelism: Investigate the use of parallelism in fastGPT, including MPI and coarrays, to potentially make it even faster. Given that GPT inference is dominated by large matrix-matrix multiplications over a few layers, we will carefully investigate which parallel approach is the best (whether MPI, coarrays, OpenMP or just parallel BLAS that we already have).

  • Reduced precision models: Experiment with using reduced precision models (e.g., 16-bit or 8-bit floats) instead of the default 32-bit to potentially speed up inference.

  • GPU acceleration: Explore how to optimize fastGPT for GPU architectures to potentially make it even faster.

  • UI improvements: Add a chat mode (similar to chatGPT). Explore how to make it easier to use as a grammar checker, or creating summaries, or other areas where GPT-2 is strong. Make it a nice Fortran library, installable using fpm, usable in other projects. Investigate how to use it with the neural-fortran project.

Expected outcomes: Create an improved fastGPT implementation that is faster, easier to use, and more general.

Skills preferred: Fortran, linear algebra

Difficulty: intermediate, 175 hours

Mentors: Ondřej Čertík (@certik), Milan Curcic (@milancurcic)

Fortran Graphics Library

Fortran does not have native graphics handling capabilities. While several bindings interfacing Fortran to graphics and plotting libraries are available (e.g., f03gl, sdl, pyplot, dislin, plplot ), no up-to-date open-source graphics package with a pure, modern Fortran API is available.

The aim of this project is to lay out the basics of an object-oriented "canvas" representation in object-oriented Fortran. The contributor would implement, document, and test basic graphics classes (2d points, lines, brushes, etc.), an abstract graphics canvas API with backends to both file and graphics devices (i.e., bitmap, PNG, OpenGL, SVG, etc.) The outcome of this project would be a contribution to the development of a platform-agnostic graphics library for Fortran.

Expected outcomes: Design and implement classes for 2d graphics primitives, a unified graphics canvas API, and several backend implementations.

Skills preferred: Fortran, C, 2D graphics basics

Difficulty: intermediate, 350 hours

Mentors: Federico Perini (@perazz)