Nonlinear poisson as parallelisation example

I’m confused by your statement “The code works well in parallel as-is. Even if I run it as a python script from the command-line without mpirun”. If you don’t use mpirun, how can you say it works well in parallel?

In regards to the Algebraic Multigrid preconditioner:
Iterative solvers rarely work out of the box, and more often than not require specialized preconditioning to work effectively and scale efficiently. Simply turning off the preconditions (presumably while still using the iterative solver?) should not be expected to work well.

Relating to nonlinear solvers and mpi, this should certainly not be an issue. Parallelisation is one of FEniCSx’ core design principles. Are you actually running on a platform that has 10 cores?

In an earlier study (Precondition appears not to happen - #3 by Stein) I found that you have to set the ksp prefix to an empty string when manipulating the krylov solver within the Newtonsolver. Might that be related?