- Johannes Gutenberg University of Mainz, Institute of Geosciences, Mainz, Germany (kaus@uni-mainz.de)
PETSc is a widely used scientific computing library that allows you to write software that runs on massively parallel supercomputers. PETSc is written in C but provides interfaces for Fortran and Python. Here, I present PETSc.jl, which is a Julia interface to the (nearly) full PETSc library.
There are a number of advantages compared to other attempts:
- It can be very easily installed by typing "add PETSc" in the Julia package manager and is distributed with precompiled PETSc binaries and MPI.
- We provide both a high-level and a low-level interface. The low-level interface automatically wraps nearly the full PETSc library with over 3000 functions, whereas the high-level interface gives a more Julia-like experience but is currently limited to part of the library.
- Automatic testing and CI/CD is performed with currently >50’000 tests.
- Users can combine features from Julia, the Julia ecosystem, such as automatic differentiation and plotting with PETSc solvers.
- The resulting codes are much more compact than their counterparts in lower-level languages; yet, users still have access to all PETSc features, such as multigrid solvers for DMDA or DMStag grids.
- It allows running code on both a local workstation and on a large HPC system.
In the presentation, I will summarise some of the work done to achieve this and show scalability results of typical codes. I will also compare the timing with native compiled code.
How to cite: Kaus, B.: PETSc.jl - a julia interface to the Portable, Extensible Toolkit for Scientific Computation, EGU General Assembly 2026, Vienna, Austria, 3–8 May 2026, EGU26-13531, https://doi.org/10.5194/egusphere-egu26-13531, 2026.