integrating mpi code