OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
estim_flops.F File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine mumps_estim_flops (inode, n, procnode_steps, keep199, nd, fils, frere_steps, step, pimaster, keep28, keep50, keep253, flop1, iw, liw, xsize)
subroutine mumps_update_flops_root (opeliw, keep50, nfront, npiv, nprow, npcol, myid)
subroutine mumps_get_flops_cost (nfront, npiv, nass, keep50, level, cost)
subroutine mumps_print_still_active (myid, keep, dkeep17, opeliw, oplast_printed, mpa)

Function/Subroutine Documentation

◆ mumps_estim_flops()

subroutine mumps_estim_flops ( integer inode,
integer n,
integer, dimension(keep28) procnode_steps,
integer keep199,
integer, dimension(keep28) nd,
integer, dimension(n) fils,
integer, dimension(keep28) frere_steps,
integer, dimension(n) step,
integer, dimension(keep28) pimaster,
integer keep28,
integer keep50,
integer keep253,
double precision flop1,
integer, dimension( liw ) iw,
integer liw,
integer xsize )

Definition at line 14 of file estim_flops.F.

20 IMPLICIT NONE
21 INTEGER INODE, N, KEEP50, LIW, KEEP199, KEEP28, KEEP253
22 INTEGER PROCNODE_STEPS(KEEP28), ND(KEEP28),
23 & FILS(N), FRERE_STEPS(KEEP28),
24 & STEP(N),
25 & PIMASTER(KEEP28),
26 & IW( LIW )
27 INTEGER XSIZE
28 DOUBLE PRECISION FLOP1
29 INTEGER NUMORG, IN, NASS, IFSON, NUMSTK, NFRONT, NPIV, NCB,
30 & LEVEL, ISON
31 LOGICAL MUMPS_IN_OR_ROOT_SSARBR
32 INTEGER MUMPS_TYPENODE
34 include 'mumps_headers.h'
35 FLOP1 = 0.0D0
36 IF (MUMPS_IN_OR_ROOT_SSARBR(PROCNODE_STEPS(STEP(INODE)),
37 & KEEP199) ) RETURN
38 IN = INODE
39 NUMORG = 0
40 10 NUMORG = NUMORG + 1
41 IN = FILS(IN)
42.GT. IF (IN 0) GOTO 10
43 NUMSTK = 0
44 NASS = 0
45 IFSON = -IN
46 ISON = IFSON
47.EQ. IF (ISON 0) GOTO 30
48 20 NUMSTK = NUMSTK + 1
49 NASS = NASS + IW(PIMASTER(STEP(ISON)) + 1 +XSIZE)
50 ISON = FRERE_STEPS(STEP(ISON))
51.GT. IF (ISON 0) GOTO 20
52 30 NFRONT = ND(STEP(INODE)) + NASS + KEEP253
53 NPIV = NASS + NUMORG
54 NCB = NFRONT - NPIV
55 LEVEL = MUMPS_TYPENODE(PROCNODE_STEPS(STEP(INODE)),KEEP199)
56 CALL MUMPS_GET_FLOPS_COST(NFRONT,NPIV,NPIV,KEEP50,LEVEL,FLOP1)
57 RETURN
logical function mumps_in_or_root_ssarbr(procinfo_inode, k199)
integer function mumps_typenode(procinfo_inode, k199)

◆ mumps_get_flops_cost()

subroutine mumps_get_flops_cost ( integer, intent(in) nfront,
integer, intent(in) npiv,
integer, intent(in) nass,
integer, intent(in) keep50,
integer, intent(in) level,
double precision, intent(out) cost )

Definition at line 72 of file estim_flops.F.

74 IMPLICIT NONE
75 INTEGER, intent(in) :: NFRONT,NPIV,KEEP50,LEVEL, NASS
76 DOUBLE PRECISION, intent(out) :: COST
77 IF (keep50.EQ.0) THEN
78 IF (level.EQ.1 .OR. level.EQ.3) THEN
79 cost = dble(2) * dble(nfront) * dble(npiv) *
80 & dble(nfront - npiv - 1) +
81 & dble(npiv) * dble(npiv + 1) * dble(2 * npiv + 1)
82 & / dble(3)
83 cost = cost + dble(2 * nfront - npiv - 1)
84 & * dble(npiv) /dble(2)
85 ELSEIF (level.EQ.2) THEN
86 cost = dble(2*nass)*dble(nfront) -
87 & dble(nass+nfront)*dble(npiv+1)
88 cost = dble(npiv)*cost +
89 & dble(2 * nass - npiv - 1) * dble(npiv) / dble(2) +
90 & dble(npiv) * dble(npiv + 1) *
91 & dble(2 * npiv + 1) /dble(3)
92 ENDIF
93 ELSE
94 IF (level.EQ.1 .OR. (level.EQ.3 .AND. keep50.EQ.1)) THEN
95 cost = dble(npiv) * (
96 & dble( nfront ) * dble( nfront ) +
97 & dble( nfront ) - (
98 & dble( nfront)*dble(npiv) + dble(npiv+1)
99 & )) +( dble(npiv)*dble(npiv+1)
100 & *dble(2*npiv+1))/ dble(6)
101 ELSE IF (level.EQ.3.AND.keep50.EQ.2) THEN
102 cost = dble(2) * dble(nfront) * dble(npiv) *
103 & dble(nfront - npiv - 1) +
104 & dble(npiv) * dble(npiv + 1) *
105 & dble(2 * npiv + 1) / dble(3)
106 cost = cost + dble(2 * nfront - npiv - 1)
107 & * dble(npiv) / dble(2)
108 ELSE
109 cost = dble(npiv) * (
110 & dble( nass ) * dble( nass ) + dble( nass )
111 & - ( dble( nass) * dble(npiv) + dble( npiv + 1 ) ) )
112 & + ( dble(npiv)*dble(npiv+1)*dble(2*npiv+1) )
113 & / dble( 6 )
114 ENDIF
115 ENDIF
116 RETURN

◆ mumps_print_still_active()

subroutine mumps_print_still_active ( integer, intent(in) myid,
integer, dimension (500), intent(in) keep,
double precision dkeep17,
double precision, intent(in) opeliw,
double precision, intent(inout) oplast_printed,
integer, intent(in) mpa )

Definition at line 118 of file estim_flops.F.

120 IMPLICIT NONE
121 INTEGER, intent(in) :: KEEP (500), MYID, MPA
122 DOUBLE PRECISION :: DKEEP17
123 DOUBLE PRECISION, intent(in) :: OPELIW
124 DOUBLE PRECISION, intent(inout) :: OPLAST_PRINTED
125 IF (mpa.GT.0) THEN
126 IF ( (opeliw-oplast_printed).GT. dkeep17) THEN
127 WRITE(mpa,'(A,I6,A,A,1PD10.3)')
128 & ' ... MPI process', myid,
129 & ': theoretical number of flops locally performed',
130 & ' so far = ',
131 & opeliw
132 oplast_printed = opeliw
133 ENDIF
134 ENDIF
135 RETURN

◆ mumps_update_flops_root()

subroutine mumps_update_flops_root ( double precision, intent(inout) opeliw,
integer, intent(in) keep50,
integer, intent(in) nfront,
integer, intent(in) npiv,
integer, intent(in) nprow,
integer, intent(in) npcol,
integer, intent(in) myid )

Definition at line 59 of file estim_flops.F.

61 DOUBLE PRECISION, intent(inout) :: OPELIW
62 INTEGER, intent(in) :: KEEP50, NFRONT, NPIV,
63 & NPROW, NPCOL, MYID
64 DOUBLE PRECISION :: COST, COST_PER_PROC
65 INTEGER, PARAMETER :: LEVEL3 = 3
66 CALL mumps_get_flops_cost(nfront, npiv, nfront, keep50, level3,
67 & cost)
68 cost_per_proc = dble(int( cost,8) / int(nprow * npcol,8))
69 opeliw = opeliw + cost_per_proc
70 RETURN
subroutine mumps_get_flops_cost(nfront, npiv, nass, keep50, level, cost)
Definition estim_flops.F:74