34 #include "qrm_common.h" 49 real(kind(1.d0)),
optional :: weight(:)
58 integer :: parent(:), rc(:)
67 integer :: parent(:), porder(:)
68 integer,
optional :: weight(:)
76 integer :: parent(:), rc(:), porder(:), nvar(:)
77 real(kind(1.d0)) :: fill_thresh
87 integer :: porder(:), parent(:), rc(:), stair(:)
108 integer,
optional :: unit
111 real(kind(1.e0)) :: a(:)
114 integer,
optional :: unit
117 real(kind(1.d0)) :: a(:)
120 integer,
optional :: unit
123 complex(kind(1.e0)) :: a(:)
126 integer,
optional :: unit
129 complex(kind(1.d0)) :: a(:)
132 integer,
optional :: unit
138 function qrm_swtime() bind(c, name='qrm_swtime')
139 real(kind(1.d0)) :: qrm_swtime
145 function qrm_uwtime() bind(c, name='qrm_uwtime')
146 real(kind(1.d0)) :: qrm_uwtime
152 subroutine qrm_msleep(n) bind(c, name='qrm_msleep')
154 integer(c_int),
value :: n
172 integer(c_int),
value :: id
180 integer(c_int) :: topo(nnodes,*)
188 integer(c_int) :: ncores, nnodes, cnode
229 character(len=*) :: string
232 character(len=len(string)) :: istring
235 character(len=*),
parameter :: name=
'qrm_gseti' 241 if(index(istring,
'qrm_eunit') .eq. 1)
then 243 else if(index(istring,
'qrm_ounit') .eq. 1)
then 245 else if(index(istring,
'qrm_dunit') .eq. 1)
then 247 else if(index(istring,
'qrm_max_mem') .eq. 1)
then 249 else if(index(istring,
'qrm_tot_mem') .eq. 1)
then 251 else if(index(istring,
'qrm_exact_mem') .eq. 1)
then 253 else if(index(istring,
'qrm_error_action') .eq. 1)
then 278 character(len=*) :: string
281 integer(kind=8) :: iival
285 character(len=*),
parameter :: name=
'qrm_ggeti' 290 __qrm_check_ret(name,
'qrm_ggetii',9999)
311 character(len=*) :: string
312 integer(kind=8) :: iival
314 character(len=len(string)) :: istring
318 character(len=*),
parameter :: name=
'qrm_ggeti' 324 if(index(istring,
'qrm_error') .eq. 1)
then 327 else if(index(istring,
'qrm_error_action') .eq. 1)
then 329 else if(index(istring,
'qrm_max_mem') .eq. 1)
then 331 else if(index(istring,
'qrm_tot_mem') .eq. 1)
then 333 else if(index(istring,
'qrm_ounit') .eq. 1)
then 335 else if(index(istring,
'qrm_eunit') .eq. 1)
then 337 else if(index(istring,
'qrm_dunit') .eq. 1)
then 361 real(kind(1.d0)) :: qrm_count_realflops
365 real(kind(1.d0)) :: rk, rm, rn
367 rk =
real(k, kind(1.d0))
368 rm =
real(m, kind(1.d0))
369 rn =
real(n, kind(1.d0))
371 qrm_count_realflops = 0.d0
376 qrm_count_realflops = 2*rk*rk*(rm-rk/3.d0)
378 qrm_count_realflops = 2*rm*rm*(rk-rm/3.d0)
382 qrm_count_realflops = rk*rn*(4*rm-rk)
393 real(kind(1.d0)) :: qrm_count_pureflops
399 qrm_count_pureflops=0
400 do i=j, min(j+nb-1, n)
401 qrm_count_pureflops = qrm_count_pureflops+(stair(i)-i+1)*(3 + 4*(n-i))
subroutine qrm_print_asm_tree(file, parent, rc, n)
This subroutine prints on a file the assembly tree described by a parent and a postorder arrays...
Generic interface for the ::qrm_hwloc_topo routine.
subroutine qrm_err_get(info)
This subroutine return the code of the first error on the stack or zero if the stack is empty...
subroutine qrm_print_nsteps_tree(file, adata, weight)
prints an assembly tree in compressed format
subroutine qrm_prnt_carray(a, lab, digits, unit)
Generic interface for the ::qrm_prnt_iarray, ::qrm_prnt_sarray, ::qrm_prnt_darray, ::qrm_prnt_carray and ::qrm_prnt_zarray routines.
This module contains the interfaces of all non-typed routines.
Generic interface for the ::qrm_msleep routine.
subroutine qrm_err_push(code, sub, ied, aed)
This subroutine pushes an error on top of the stack.
integer, save qrm_dunit
The unit for debug messages.
real(kind(1.d0)) function qrm_count_pureflops(stair, n, j, nb)
Used for counting the real flops (i.e., it ignores the zeros included by the blocking) ...
Generic interface for the ::qrm_uwtime routine.
integer, save qrm_eunit
The unit for error messages.
This module contains the definition of the analysis data type.
subroutine qrm_err_act_save(err_act)
Saves a copy of the qrm_err_act variable.
subroutine qrm_ggetii(string, iival)
subroutine qrm_print_elim_tree(file, parent, n)
This subroutine prints on a file the elimination tree described by a parent array. The tree is written in "dot" format (see graphviz)
This module contains all the error management routines and data.
Generic interface for the ::qrm_reorder_tree routine.
subroutine qrm_prnt_darray(a, lab, digits, unit)
integer(kind=8), dimension(0:qrm_maxthreads-1) qrm_max_mem
a counter to keep track of the peak memory, per thread
subroutine qrm_prnt_iarray(a, lab, unit)
Generic interface for the ::qrm_swtime routine.
The main data type for the analysis phase.
integer, parameter qrm_abort_
Possible actions to be performed upon detection of an error.
Generic interface for the ::qrm_compress_data routine.
integer qrm_err_act
Default action.
Generic interface for the ::qrm_amalg_tree routine.
subroutine qrm_err_check()
This subroutine checks the errors stack. If something is found all the entries in the stack are poppe...
integer(kind=8), dimension(0:qrm_maxthreads-1) qrm_tot_mem
a counter to keep track of the currently allocated memory, per thread
Generic interface for the ::qrm_hwloc_info routine.
subroutine qrm_prnt_sarray(a, lab, digits, unit)
Generic interface for the ::qrm_count_realflops ::qrm_count_pureflops.
Generic interface for the ::qrm_print_nsteps_tree, ::qrm_print_elim_tree and ::qrm_print_asm_tree rou...
Generic interface for the ::qrm_postorder routine.
Generic interface for the ::qrm_hwloc_bind routine.
integer, save qrm_ounit
The unit for output messages.
subroutine qrm_prnt_zarray(a, lab, digits, unit)
Generic interface for the ::qrm_check_cperm routine.
real(kind(1.d0)) function qrm_count_realflops(m, n, k, op)
Used for counting the actual flops.
subroutine qrm_gseti(string, ival)
This module implements the memory handling routines. Pretty mucch allocations and deallocations...
subroutine qrm_err_act_set(err_act)
Sets the default error action.
This module contains various string handling routines.
subroutine qrm_err_act_restore(err_act)
Restores the value of the qrm_err_act variable.
subroutine qrm_ggeti(string, ival)