Only use HAVE_MPI around the MPI calls. This reduces the need to use HAVE_MPI in other parts of the code. This makes the code better readable.