added MPI scan for case when num procs not power of 2