-
Notifications
You must be signed in to change notification settings - Fork 68
GSoC 2022 Project ideas
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
Fortran Package Manager (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 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:
Mentors: Brad Richardson (@everythingfunctional), Sebastian Ehlert (@awvwgk)
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:
See also:
- fpm-registry: Prototype central registry
- fpm-search: fpm app for searching the registry for fpm packages
Mentors: Laurence Kedward (@lkedward), Brad Richardson (@everythingfunctional), Milan Curcic (@milancurcic)
Research the Fortran library and application ecosystem (on GitHub and beyond) and collaborate with package maintainers on making their package fpm-compatible. In this project, the contributor and mentor would research and identify a limited number of Fortran packages that would be feasible to make compatible with fpm, and that would have a relatively high impact.
Mentors: Milan Curcic (@milancurcic)
Adding support for both built-in compiler preprocessors and external third-party preprocessors is important for fpm due to the additional flexibility they provide when building complex packages. In particular, the Fortran-lang stdlib project exploits the powerful fypp preprocessor for code generation and we intend for stdlib to eventually be compatible as an fpm package.
This project will require:
- Implementing a manifest syntax for defining preprocessor variables in a preprocessor-independent manner
- Passing defined preprocessor variables to built-in preprocessors if necessary
- Defining a manifest syntax for specifying a third-party preprocessor and the corresponding file suffixes
- Modifying fpm to optionally invoke a third-party preprocessor before compiling sources
Third-party preprocessors should be specified on a per-project basis, i.e. multiple preprocessors might be required, and fpm should be able to report useful errors for missing third-party preprocessors.
Related issues:
- fpm#78: support for third-party preprocessors (e.g. fypp)
- fpm#308: Fortran-based smart code generation in fpm
Mentors: Laurence Kedward (@lkedward), Milan Curcic (@milancurcic), Jeremie Vandenplas (@jvdp1)
The aim of this project is it 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 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 and official Fortran-lang fpm package.
Related issues:
- fpm#179: Testing with fpm test
Related discussions:
- fpm#328: Example which requires external data
Mentors: Sebastian Ehlert (@awvwgk), Brad Richardson (@everythingfunctional)
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:
Mentors: Sebastian Ehlert (@awvwgk), Laurence Kedward (@lkedward)
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:
Mentors: Damian Rouson (@rouson), Arjen Markus (@arjenmarkus), Ondřej Čertík (@certik)
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.
Mentors: Sebastian Ehlert (@awvwgk), Ivan Pribec (@ivan-pi)
Building a large dependency (such as stdlib, for example) is both slow and increases the size
of the produced object and executable binaries.
"Tree shaking" is an optimization technique commonly used in the JavaScript ecosystem.
It allows a build system to exclude unused modules and procedures from dependencies.
For example, if a small fpm project uses only optval()
from stdlib_optval
,
fpm should only need to build stdlib_optval
and stdlib_kinds
(dependency of stdlib_optval
).
While initially perhaps negligible, this problem will become more apparent as the fpm
ecosystem grows and more large packages become fpm-compatible.
Mentors: Laurence Kedward (@lkedward), Sebastian Ehlert (@awvwgk)
Fortran Standard 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:
Mentors: Arjen Markus (@arjenmarkus), Milan Curcic (@milancurcic)
Cross-platform solution to abstract POSIX and Windows API for creating subprocesses.
Related issues:
- stdlib#22: Interface to POSIX I/O API
- stdlib#308: Subprocesses and Multiprocessing
Discourse thread:
Mentors: Sebastian Ehlert (@awvwgk)
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:
WIP implementation:
Mentors: Ondřej Čertík (@certik), Milan Curcic (@milancurcic), Ivan Pribec (@ivan-pi), Jeremie Vandenplas (@jvdp1)
LFortran (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,
- Compile with
--symtab-only
mode (Recommended for 18 hours/week sized projects) - Compile with normal
lfortran
i.e., without using any extra flags -stdlib
already compiles with--symtab-only
mode (thoughstdlib/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 forfpm
and other Fortran-lang projects. Note that, it would be good to use a specific commit ofstdlib
,fpm
through out the project, instead of always using themaster
/main
branches. (Recommended for 36 hours/week sized projects. Forstdlib
we will consider 18 hours/week sized projects because,--symtab-only
mode is already working to a great extent). - 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.
Mentors - Gagandeep Singh (Gitlab - @czgdp18071)
This project would entail working with LFortran, LLVM, Emscripten, and Webassembly to allow running Fortran in the browser.
- use LLVM and Emscripten to compile Fortran code to Webassembly
- create custom Webassembly backend for LFortran and compile LFortran itself to Webassembly
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.
Mentors: Rohit Goswami (@HaoZeke)
This project would be used to first serialize the ASR and then use it within a language server.
This project would involve porting the Fortran-lang website from the current framework (Jekyll) to Sphinx+Myst parser for internationalization support and ease of maintenance.
Mentors: Sebastian Ehlert (@awvwgk)
An online (in-browser) Fortran playground on the landing page of fortran-lang.org would allow visitors to try out Fortran immediately, without having to install the compiler locally. There are different possible approaches:
- Send source code to a server that compiles and runs the code and returns the output
- Compile and run a subset of Fortran in the browser via Webassembly and Emscripten
- Embed a reduced version of an LFortran Jupyter notebook
- Embed an existing playground like Repl.it or Compiler Explorer
The participant would work with Fortran-lang and SciPy teams toward implementing fortran-lang/minpack in SciPy.