Bugfixes for setaff.c (add MPI)