I want to write code and compile in on computor A, run it on cluster B under mpi. Is it possible from python code?
Python is, of course, interpreted, not compiled, so I assume you mean the JIT code. Provided the architecture and fenics installations are the same, you just need the instant cache folder to be the same (usually in ~/.instant).