Hi Ralph, Thanks for your response. I see your point, I try to change the algorithm but some processes finish while the others are still calling MPI functions. I can't avoid this behaviour. The ideal behavior is the processes go to sleep (or don't use the 100% of load) when the MPI_Finalize is called.
For the time being maybe the fastest solution is instert a "manual" sleep before the MPI_Finalize. Another question, Could be possible kill some MPI processes and avoid that the mpirun fails? Or this behaviuor is impossible? Thanks, Ivan Cores