dcsrilut produces results that are not ascending order at the last row.

dcsrilut produces results that are not ascending order at the last row.

I'm trying to use dcsrilut but it produces output vectors that are not sorted by ascending order.

Should I sort them before use them in another csr formatted matrix-vector routines.

Here is a sample program and you can see 'lu' and 'jlu' are not ordered in ascending at 5-th row in output.

Please check it and let me know the reason why it does or how to use it properly.

Thanks in advance,

skywon.

program dcsrilut_error
implicit none

real *8 a(16), lu(18), dpar(128), tol
integer ia(6), ja(16), ilu(6), jlu(18), n, i, j, k, ipar(128), mfil, ierr

data a / 1.0, 1.0, 4.0, &
2.0, 4.0, 1.0, &
2.0, 1.0, 8.0, 2.0, &
4.0, 1.0, &
3.0, 6.0, 2.0, 1.0/
data ja / 1, 2, 5, &
2, 3, 5, &
1, 2, 3, 4, &
3, 4, &
1, 2, 3, 5/
data ia / 1, 4, 7, 11, 13, 17/

n = 5

ipar(31) = 1
dpar(31) = 1.d-5
tol = 1.d-5

do mfil = 1, 3

call dcsrilut(n, a, ia, ja, lu, ilu, jlu, tol, mfil, ipar, dpar, ierr)

write(*, "(/'mfil = ', i2)") mfil
do i = 1, n
do j = ilu(i), ilu(i+1)-1
write(*, "(i2$)") jlu(j)
end do
write(*,"(' /'$)")
end do
write(*, *)

end do
end program

output of the above program is as follows:

mfil = 1
1 5 / 2 3 / 1 3 5 / 3 4 5 / 1 5 /

mfil = 2
1 2 5 / 2 3 5 / 1 2 3 4 5 / 3 4 5 / 4 1 5 /

mfil = 3
1 2 5 / 2 3 5 / 1 2 3 4 5 / 3 4 5 / 2 4 1 5 /

AdjuntoTamaño
Descargar dcsrilut-error.f901.32 KB
publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Did you check the error value ( ierr)?

Sure, ierr = 0 in all cases

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya