Add changes to mpi-thread.c