mpi_flag in pp.cc should be checked. I see allocation after request