wrap MPI sends and recvs around a send and recv lock since MPI is not thread safe