Frequently Asked Questions

1. Can I use my own PETSc library?

Yes, see the function set_petsclib. You do need to compile this library as a dynamic library, and MPI.jl must be configured to be compatible with the MPI library used to compile PETSc. If you run this on a HPC system, and you don't know exactly which options were used, you can compile one of the PETSc examples and run it with the -log_view command line option. At the end of the simulation, it will give you the configuration options used on that machine.

Please note that the version of PETSc should be compatible with the version used for the wrapper.

2. Help, my code crashes?

That is very possible. If you provide a short minimum working example (MWE), feel free to open an issue on the github repo, so we can check it out.

3. What about the garbage collector in Julia?

Using the GC in combination with MPI code is a tricky business. The users are therefore responsible to free PETSc objects in the code, as shown in the various examples. We have some help for that:

  1. The julia function PETSc.audit_petsc_file("path/to/your/file.jl") which scans your julia file and tries to guess whether objects are destroyed.
  2. You can initialize the PETSc library with log_view=true. At the end of the code, it will give an

4. Is it compatible with GPUs?

The precompiled PETSc_jll binaries are currently not compatible with GPUs. You can, however, use your own PETSc compilation and things should be fine.

5. I really like this package!

Thanks a lot, we appreciate if you give us a star on github!

6. How do I cite this in publications?

We are planning to submit a JOSS paper once the current release is sufficiently stable. Meanwhile, you can cite the zenodo release.