Finalize the environment, should be the very last call in the program, and includes the call of MPI_Finalize.
subroutine fin_env()
! ---------------------------------------------------------------------------
integer :: iError
! ---------------------------------------------------------------------------
call MPI_Finalize(iError)
end subroutine fin_env