Running Fenics on a single process in a parallel code

You need to supply an MPI communicator (MPI_COMM_SELF) to your mesh constructor, as explained in: Parallel solving and projecting using comm_world and comm_self - #2 by dokken
and exposed through wrappers: Bitbucket