I cannot reproduce this behavior using the docker image:
docker run -it -v $(pwd):/home/fenics/shared -w /home/fenics/shared --rm quay.io/fenicsproject/dev:latest
which gives output
fenics@ae1d6668589f:~/shared$ mpirun -n 4 python3 test_mpi.py
Hello I am process 0
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Hello I am process 1
Hello I am process 2
Hello I am process 3
Therefore, for anyone to help you, you need to supply more information about how you installed FEniCS, what system you are running on, etc. Follow the guidelines in: Read before posting: How do I get my question answered?