Issue with interpolating a gathered function

I am not certain I understand what you would like to achieve here. Note that the mesh is distributed over the set of processors. Therefore, there is only one function space (with global number of dofs=9) existing.

To create a mesh on each processor, see for instance:

Additionally, you should access the function vector directly, and not through interpolation, if getting arrays from another processor.