35 #include "qrm_common.h" 65 real(kind(1.d0)) :: flops
67 integer :: n_rows_orig, i, j, row, col, c, child, roff, crows, f
68 integer :: m, n, np, rsize, hsize, mr, mc, mn, k, p, ne
69 integer :: frow, fcol, nb, b, father, thn
71 type(qrm_adata_type),
pointer :: adata
75 character(len=*),
parameter :: name=
'qrm_activate_front' 77 call qrm_err_act_save(err_act)
86 front => qrm_mat%fdata%front_list(fnum)
87 father = qrm_mat%adata%parent(fnum)
88 adata => qrm_mat%adata
92 do p = adata%childptr(fnum), adata%childptr(fnum+1)-1
95 __qrm_check_ret(name,
'qrm_do_subtree',9999)
99 __qrm_check_ret(name,
'qrm_init_front',9999)
104 do p = adata%childptr(fnum), adata%childptr(fnum+1)-1
106 if(adata%small(c) .eq. 1)
then 108 __qrm_check_ret(name,
'qrm_clean_front',9999)
111 qrm_mat%fdata%done = qrm_mat%fdata%done+1
118 call qrm_err_act_restore(err_act)
122 call qrm_err_act_restore(err_act)
123 if(err_act .eq. qrm_abort_)
then 164 character(len=*),
parameter :: name=
'qrm_clean_front' 166 call qrm_err_act_save(err_act)
168 front => qrm_mat%fdata%front_list(fnum)
191 __qrm_check_ret(name,
'qrm_adealloc',9999)
193 if(qrm_mat%icntl(5) .gt. 0)
then 196 __qrm_check_ret(name,
'qrm_store_h',9999)
199 __qrm_check_ret(name,
'qrm_adealloc',9999)
202 __qrm_check_ret(name,
'qrm_store_r',9999)
205 __qrm_check_ret(name,
'qrm_adealloc',9999)
207 call qrm_err_act_restore(err_act)
211 call qrm_err_act_restore(err_act)
212 if(err_act .eq. qrm_abort_)
then 347 integer :: i, j, cnt, p, c, cs, hsize, m, pk, jp, k
351 character(len=*),
parameter :: name=
'qrm_store_h' 353 call qrm_err_act_save(err_act)
359 do jp = 1, front%ne, front%nb
360 pk = min(front%nb, front%ne-jp+1)
363 do j = jp, jp+pk-1, front%ib
364 k = min(front%ib, jp+pk - j)
366 m = max(front%stair(j+k-1),j+k-1) - j+1
372 __qrm_check_ret(name,
'qrm_aalloc',9999)
378 outer:
do jp = 1, front%ne, front%nb
379 pk = min(front%nb, front%ne-jp+1)
380 if(pk .le. 0)
exit outer
382 inner:
do j = jp, jp+pk-1, front%ib
383 k = min(front%ib, jp+pk - j)
384 if(k .le. 0)
exit inner
385 m = max(front%stair(j+k-1),j+k-1) - j+1
386 front%hsize = front%hsize+k*(k+1)/2 + k*(m-k)
388 front%h(cnt:cnt+c-1) = front%t(1:c, j+c-1)
389 front%h(cnt+c:cnt+m-1) = front%front(j+c:j+m-1,j+c-1)
396 call qrm_err_act_restore(err_act)
400 call qrm_err_act_restore(err_act)
401 if(err_act .eq. qrm_abort_)
then 422 integer :: i, j, cnt, rsize, n, c, jp, k, pk
426 character(len=*),
parameter :: name=
'qrm_store_r' 428 call qrm_err_act_save(err_act)
434 do jp = 1, front%npiv, front%nb
435 pk = min(front%nb, front%npiv-jp+1)
438 do j = jp, jp+pk-1, front%ib
439 k = min(front%ib, jp+pk - j)
447 __qrm_check_ret(name,
'qrm_aalloc',9999)
449 front%rsize = front%npiv*(front%npiv+1)/2 + &
450 & front%npiv*(front%n-front%npiv)
453 outer:
do jp = 1, front%npiv, front%nb
454 pk = min(front%nb, front%npiv-jp+1)
455 if(pk .le. 0)
exit outer
457 inner:
do j = jp, jp+pk-1, front%ib
458 k = min(front%ib, jp+pk - j)
459 if(k .le. 0)
exit inner
463 front%r(cnt:cnt+k-1) = front%front(j:j+k-1,j+c-1)
469 call qrm_err_act_restore(err_act)
473 call qrm_err_act_restore(err_act)
474 if(err_act .eq. qrm_abort_)
then This module contains generic interfaces for a number of auxiliary tools.
Generic interface for the qrm_adealloc_i, qrm_adealloc_2i, qrm_adealloc_s, qrm_adealloc_2s, qrm_adealloc_3s, qrm_adealloc_d, qrm_adealloc_2d, qrm_adealloc_3d, qrm_adealloc_c, qrm_adealloc_2c, qrm_adealloc_3c, qrm_adealloc_z, qrm_adealloc_2z, qrm_adealloc_3z, routines.
This module contains routines for sorting.
This module contains the interfaces of all non-typed routines.
subroutine dqrm_do_subtree(qrm_mat, fnum, flops)
This subroutine does the sequential factorization of an entire subtree.
This module contains all the generic interfaces for the typed routines in the factorization phase...
subroutine dqrm_activate_front(qrm_mat, fnum, flops)
This routine activates a front.
This module contains the definition of the basic sparse matrix type and of the associated methods...
subroutine dqrm_init_front(qrm_mat, fnum, par, work)
This routine initializes a front.
subroutine dqrm_store_r(front)
Generic interface for the qrm_aalloc_i, qrm_aalloc_2i, qrm_aalloc_s, qrm_aalloc_2s, qrm_aalloc_3s, qrm_aalloc_d, qrm_aalloc_2d, qrm_aalloc_3d, qrm_aalloc_c, qrm_aalloc_2c, qrm_aalloc_3c, qrm_aalloc_z, qrm_aalloc_2z, qrm_aalloc_3z, routines.
This module contains an implementation of some operations on triangular/trapezoidal matrices stored i...
subroutine dqrm_clean_front(qrm_mat, fnum)
This routine performs the cleaning of a front.
subroutine dqrm_store_h(front)
This type defines the data structure used to store a matrix.
This type defines a data structure containing all the data related to a front.
This module contains the definition of all the data related to the factorization phase.
This module implements the memory handling routines. Pretty mucch allocations and deallocations...