Finished code, but unknown bug when runnning with MPI. Check with lecturer.