Add code to the MPICluster and it works fine on local machine.