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

Go to the source code of this file.

Functions/Subroutines

subroutine mumps_sol_get_npiv_liell_ipos (istep, keep, npiv, liell, ipos, iw, liw, ptrist, step, n)
subroutine mumps_build_irhs_loc (myid_nodes, nslaves, n, ptrist, keep, keep8, iw, liw, step, procnode_steps, irhs_loc, row_or_col_indices)
subroutine mumps_sol_rhsmapinfo (n, nloc_rhs, info23, irhs_loc, map_rhs_loc, posinrhscomp_fwd, nslaves, myid_nodes, comm_nodes, icntl, info)
subroutine mumps_compute_lastfs_dyn (inode, lastfssbtr_dyn, mtype, keep, iw, liw, n, step, ptrist, fils, frere)

Function/Subroutine Documentation

◆ mumps_build_irhs_loc()

subroutine mumps_build_irhs_loc ( integer, intent(in) myid_nodes,
integer, intent(in) nslaves,
integer, intent(in) n,
integer, dimension(keep(28)), intent(in) ptrist,
integer, dimension(500), intent(in) keep,
integer(8), dimension(150), intent(in) keep8,
integer, dimension(liw), intent(in) iw,
integer, intent(in) liw,
integer, dimension(n), intent(in) step,
integer, dimension(keep(28)), intent(in) procnode_steps,
integer, dimension(keep(89)), intent(out) irhs_loc,
integer, intent(in) row_or_col_indices )

Definition at line 52 of file sol_common.F.

55 IMPLICIT NONE
56 INTEGER, INTENT(IN) :: KEEP(500)
57 INTEGER(8), INTENT(IN) :: KEEP8(150)
58 INTEGER, INTENT(IN) :: MYID_NODES, NSLAVES, N, LIW
59 INTEGER, INTENT(IN) :: PTRIST(KEEP(28))
60 INTEGER, INTENT(IN) :: IW(LIW), STEP(N)
61 INTEGER, INTENT(IN) :: PROCNODE_STEPS(KEEP(28))
62 INTEGER, INTENT(OUT) :: IRHS_loc(KEEP(89))
63 INTEGER, INTENT(IN) :: ROW_OR_COL_INDICES
64 INTEGER :: ISTEP
65 INTEGER :: NPIV, LIELL, IPOS
66 INTEGER :: IIRHS_loc
67 INTEGER :: J1
68 include 'mumps_headers.h'
69 INTEGER, EXTERNAL :: MUMPS_PROCNODE
70 iirhs_loc = 0
71 DO istep = 1, keep(28)
72 IF (myid_nodes == mumps_procnode(procnode_steps(istep),
73 & keep(199))) THEN
74 CALL mumps_sol_get_npiv_liell_ipos ( istep, keep,
75 & npiv, liell, ipos, iw, liw, ptrist, step, n )
76 IF ( row_or_col_indices .EQ. 0 .OR. keep(50).NE.0 ) THEN
77 j1 = ipos + 1
78 ELSE IF (row_or_col_indices .EQ. 1 ) THEN
79 j1 = ipos + liell + 1
80 ELSE
81 WRITE(*,*) "Internal error 1 in MUMPS_BUILD_IRHS_loc",
82 & row_or_col_indices
83 CALL mumps_abort()
84 ENDIF
85 IF (iirhs_loc+npiv .GT. keep(89)) THEN
86 WRITE(*,*) "Internal error 2 in MUMPS_BUILD_IRHS_loc",
87 & iirhs_loc, keep(89)
88 CALL mumps_abort()
89 ENDIF
90 irhs_loc(iirhs_loc+1:iirhs_loc+npiv)=iw(j1:j1+npiv-1)
91 iirhs_loc=iirhs_loc+npiv
92 ENDIF
93 ENDDO
94 IF (iirhs_loc .NE. keep(89)) THEN
95 WRITE(*,*) "Internal error 3 in MUMPS_BUILD_IRHS_loc",
96 & iirhs_loc, keep(89)
97 CALL mumps_abort()
98 ENDIF
99 RETURN
#define mumps_abort
Definition VE_Metis.h:25
subroutine mumps_sol_get_npiv_liell_ipos(istep, keep, npiv, liell, ipos, iw, liw, ptrist, step, n)
Definition sol_common.F:16
integer function mumps_procnode(procinfo_inode, k199)

◆ mumps_compute_lastfs_dyn()

subroutine mumps_compute_lastfs_dyn ( integer, intent(in) inode,
integer, intent(out) lastfssbtr_dyn,
integer, intent(in) mtype,
integer, dimension(500), intent(in) keep,
integer, dimension(liw), intent(in) iw,
integer, intent(in) liw,
integer, intent(in) n,
integer, dimension( n ), intent(in) step,
integer, dimension( keep(28) ), intent(in) ptrist,
integer, dimension(n), intent(in) fils,
integer, dimension( keep(28) ), intent(in) frere )

Definition at line 161 of file sol_common.F.

163 IMPLICIT NONE
164 INTEGER, INTENT(IN) :: INODE
165 INTEGER, INTENT(OUT) :: LASTFSSBTR_DYN
166 INTEGER, INTENT(IN) :: N, MTYPE, LIW, KEEP(500)
167 INTEGER, INTENT(IN) :: IW(LIW), STEP( N ), PTRIST( KEEP(28) )
168 INTEGER, INTENT(IN) :: FILS(N), FRERE( KEEP(28) )
169 INTEGER :: NPIV, LIELL, IPOS, INODE_CUR, IN
170 inode_cur = inode
171 10 CONTINUE
172 CALL mumps_sol_get_npiv_liell_ipos ( step(inode_cur), keep,
173 & npiv, liell, ipos, iw, liw, ptrist, step, n )
174 IF ( npiv .NE. 0 ) THEN
175 IF (mtype .EQ. 1 .OR. keep(50) .NE. 0) THEN
176 lastfssbtr_dyn = iw( ipos + npiv )
177 ELSE
178 lastfssbtr_dyn = iw( ipos+npiv+liell )
179 ENDIF
180 ELSE
181 in = inode_cur
182 DO WHILE (in.GT. 0)
183 in = fils(in)
184 ENDDO
185 IF (in .LT. 0) THEN
186 inode_cur = -in
187 GOTO 10
188 ELSE
189 DO
190 IF (inode_cur .EQ. inode) THEN
191 lastfssbtr_dyn = 0
192 EXIT
193 ENDIF
194 inode_cur = frere(step(inode_cur))
195 IF (inode_cur .GT. 0) THEN
196 GOTO 10
197 ELSE
198 inode_cur = -inode_cur
199 ENDIF
200 ENDDO
201 ENDIF
202 ENDIF
203 RETURN

◆ mumps_sol_get_npiv_liell_ipos()

subroutine mumps_sol_get_npiv_liell_ipos ( integer, intent(in) istep,
integer, dimension(500), intent(in) keep,
integer, intent(out) npiv,
integer, intent(out) liell,
integer, intent(out) ipos,
integer, dimension( liw ), intent(in) iw,
integer, intent(in) liw,
integer, dimension( keep(28) ), intent(in) ptrist,
integer, dimension( n ), intent(in) step,
integer, intent(in) n )

Definition at line 14 of file sol_common.F.

16 IMPLICIT NONE
17 INTEGER, INTENT(IN) :: ISTEP, LIW, KEEP(500), N
18 INTEGER, INTENT(IN) :: IW( LIW )
19 INTEGER, INTENT(IN) :: STEP( N ), PTRIST( KEEP(28) )
20 INTEGER, INTENT(OUT) :: NPIV, LIELL, IPOS
21 include 'mumps_headers.h'
22 INTEGER :: SROOT
23 IF (keep(38) .NE. 0) THEN
24 sroot = step(keep(38))
25 ELSE IF (keep(20) .NE. 0) THEN
26 sroot = step(keep(20))
27 ELSE
28 sroot = 0
29 ENDIF
30 ipos = ptrist(istep)
31 IF (ipos .LE. 0) THEN
32 WRITE(*,*) "Internal error 1 in MUMPS_SOL_GET_NPIV_LIELL_IPOS",
33 & istep
34 CALL mumps_abort()
35 ENDIF
36 npiv = iw(ipos+3+keep(ixsz))
37 IF ( istep.EQ.sroot ) THEN
38 ipos = ptrist(istep)
39 liell = iw(ipos+3+keep(ixsz))
40 npiv = liell
41 ipos= ptrist(istep)+5+keep(ixsz)
42 ELSE
43 ipos = ptrist(istep) + 2+ keep(ixsz)
44 liell = iw(ipos-2)+iw(ipos+1)
45 ipos= ipos+1
46 npiv = iw(ipos)
47 ipos= ipos+1
48 ipos= ipos+1+iw( ptrist(istep) + 5 +keep(ixsz))
49 ENDIF
50 RETURN

◆ mumps_sol_rhsmapinfo()

subroutine mumps_sol_rhsmapinfo ( integer, intent(in) n,
integer, intent(in) nloc_rhs,
integer, intent(in) info23,
integer, dimension (max(1,nloc_rhs)), intent(in) irhs_loc,
integer, dimension(max(1,nloc_rhs)), intent(out) map_rhs_loc,
integer, dimension (n), intent(in) posinrhscomp_fwd,
integer, intent(in) nslaves,
integer, intent(in) myid_nodes,
integer, intent(in) comm_nodes,
integer, dimension(60), intent(in) icntl,
integer, dimension(80), intent(inout) info )

Definition at line 101 of file sol_common.F.

106 IMPLICIT NONE
107 INTEGER, INTENT(IN) :: N, Nloc_RHS
108 INTEGER, INTENT(IN) :: INFO23
109 INTEGER, INTENT(IN) :: IRHS_loc (max(1,Nloc_RHS))
110 INTEGER, INTENT(OUT) :: MAP_RHS_loc(max(1,Nloc_RHS))
111 INTEGER, INTENT(IN) :: POSINRHSCOMP_FWD (N)
112 INTEGER, INTENT(IN) :: NSLAVES, MYID_NODES, COMM_NODES
113 INTEGER, INTENT(INOUT) :: INFO(80)
114 INTEGER, INTENT(IN) :: ICNTL(60)
115 include 'mpif.h'
116 INTEGER :: I, NFS_LOC, NFS_TOT, IERR_MPI, allocok
117 INTEGER, ALLOCATABLE, DIMENSION(:) :: GLOBAL_MAPPING
118 ALLOCATE(global_mapping(n), stat=allocok)
119 IF (allocok .GT. 0) THEN
120 info(1)=-13
121 info(2)= n
122 ENDIF
123 CALL mpi_allreduce(mpi_in_place, allocok, 1,
124 & mpi_integer, mpi_sum,
125 & comm_nodes, ierr_mpi)
126 IF (allocok .NE. 0) RETURN
127 nfs_loc = 0
128 nfs_tot = 0
129 DO i = 1, n
130 IF (posinrhscomp_fwd(i) .LE. 0) THEN
131 global_mapping(i) = 0
132 ELSE
133 global_mapping(i) = myid_nodes
134 nfs_loc = nfs_loc + 1
135 ENDIF
136 ENDDO
137 IF (nfs_loc .NE. info23) THEN
138 WRITE(*,*) "Internal error 1 in MUMPS_SOL_RHSMAPINFO",
139 & nfs_loc, info23
140 CALL mumps_abort()
141 ENDIF
142 CALL mpi_allreduce(nfs_loc, nfs_tot, 1, mpi_integer,
143 & mpi_sum, comm_nodes, ierr_mpi)
144 IF (nfs_tot .NE. n) THEN
145 WRITE(*,*) "Internal error 1 in MUMPS_SOL_RHSMAPINFO",
146 & nfs_loc, nfs_tot, n
147 CALL mumps_abort()
148 ENDIF
149 CALL mpi_allreduce(mpi_in_place, global_mapping, n, mpi_integer,
150 & mpi_sum, comm_nodes, ierr_mpi)
151 DO i = 1, nloc_rhs
152 IF (irhs_loc(i) .GE.1 .AND. irhs_loc(i) .LE. n) THEN
153 map_rhs_loc(i) = global_mapping(irhs_loc(i))
154 ELSE
155 map_rhs_loc(i) = -87878787
156 ENDIF
157 ENDDO
158 DEALLOCATE(global_mapping)
159 RETURN
subroutine mpi_allreduce(sendbuf, recvbuf, cnt, datatype, operation, comm, ierr)
Definition mpi.f:103