I think, i've found a bug in function mpi_scan