OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
mumps_fac_maprow_data_m Module Reference

Data Types

type  maprow_struc_t

Functions/Subroutines

logical function, public mumps_fmrd_is_maprow_stored (iwhandler)
subroutine, public mumps_fmrd_init (initial_size, info)
subroutine, public mumps_fmrd_save_maprow (iwhandler, inode, ison, nslaves_pere, nfront_pere, nass_pere, lmap, nfs4father, slaves_pere, trow, info)
subroutine mumps_fmrd_store_maprow (iwhandler, maprow_struc, info)
subroutine mumps_fmrd_fill_maprow (maprow_struc, inode, ison, nslaves_pere, nfront_pere, nass_pere, lmap, nfs4father, slaves_pere, trow, info)
subroutine, public mumps_fmrd_free_maprow_struc (iwhandler)
subroutine, public mumps_fmrd_retrieve_maprow (iwhandler, maprow_struc)
subroutine, public mumps_fmrd_end (info1)

Variables

type(maprow_struc_t), dimension(:), pointer, save fmrd_array

Function/Subroutine Documentation

◆ mumps_fmrd_end()

subroutine, public mumps_fac_maprow_data_m::mumps_fmrd_end ( integer, intent(in) info1)

Definition at line 287 of file fac_maprow_data_m.F.

288C
289C Purpose:
290C =======
291C Module final termination.
292C
293C Arguments:
294C =========
295C
296 INTEGER, INTENT(IN) :: INFO1
297C Local variables:
298C ===============
299 INTEGER :: I, IWHANDLER
300C
301 IF (.NOT. associated(fmrd_array)) THEN
302 WRITE(*,*) "Internal error 1 in MUMPS_FAC_FMRD_END"
303 CALL mumps_abort()
304 ENDIF
305 DO i=1, size(fmrd_array)
306 IF (fmrd_array(i)%INODE .GE. 0) THEN
307C Node is not free: possible only in
308C case of fatal error (INFO1 < 0)
309 IF (info1 .GE.0) THEN
310C Should have been freed earlier while consuming MAPLIG
311 WRITE(*,*) "Internal error 2 in MUMPS_FAC_FMRD_END",i
312 CALL mumps_abort()
313 ELSE
314C May happen in case an error has forced finishing
315C factorization before all MAPROW msgs were processed.
316C We copy the loop index I in the local variable IWHANDLER
317C because there would otherwise be a risk for the loop index
318C I to be modified by MUMPS_FMRD_FREE_MAPROW_STRUC
319 iwhandler=i
320 CALL mumps_fmrd_free_maprow_struc(iwhandler)
321 ENDIF
322 ENDIF
323 ENDDO
324 DEALLOCATE(fmrd_array)
325 RETURN
#define mumps_abort
Definition VE_Metis.h:25

◆ mumps_fmrd_fill_maprow()

subroutine mumps_fac_maprow_data_m::mumps_fmrd_fill_maprow ( type (maprow_struc_t), intent(out) maprow_struc,
integer, intent(in) inode,
integer, intent(in) ison,
integer, intent(in) nslaves_pere,
integer, intent(in) nfront_pere,
integer, intent(in) nass_pere,
integer, intent(in) lmap,
integer, intent(in) nfs4father,
integer, dimension(max(1,nslaves_pere)), intent(in) slaves_pere,
integer, dimension( lmap), intent(in) trow,
integer, dimension(2), intent(inout) info )
private

Definition at line 183 of file fac_maprow_data_m.F.

189C
190C Purpose:
191C =======
192C Fill the MAPROW_STRUC into
193C
194C Arguments:
195C =========
196C
197 INTEGER, INTENT(IN) :: INODE, ISON, NSLAVES_PERE, NFRONT_PERE,
198 & NASS_PERE, LMAP, NFS4FATHER
199 INTEGER, INTENT(IN) :: SLAVES_PERE(max(1,NSLAVES_PERE))
200 INTEGER, INTENT(IN) :: TROW( LMAP)
201 TYPE (MAPROW_STRUC_T), INTENT(OUT) :: MAPROW_STRUC
202 INTEGER, INTENT(INOUT) :: INFO(2)
203C
204C Local variables:
205C ===============
206C
207 INTEGER :: IERR, I
208C
209 maprow_struc%INODE = inode
210 maprow_struc%ISON = ison
211 maprow_struc%NSLAVES_PERE = nslaves_pere
212 maprow_struc%NFRONT_PERE = nfront_pere
213 maprow_struc%NASS_PERE = nass_pere
214 maprow_struc%LMAP = lmap
215 maprow_struc%NFS4FATHER = nfs4father
216 ALLOCATE(maprow_struc%SLAVES_PERE(max(1,nslaves_pere)),
217 & maprow_struc%TROW(lmap), stat=ierr)
218 IF (ierr .GT.0) THEN
219 info(1) = -13
220 info(2) = nslaves_pere + lmap
221 RETURN
222 ENDIF
223 DO i=1, nslaves_pere
224 maprow_struc%SLAVES_PERE(i) = slaves_pere(i)
225 ENDDO
226 DO i=1, lmap
227 maprow_struc%TROW(i) = trow(i)
228 ENDDO
229 RETURN
#define max(a, b)
Definition macros.h:21

◆ mumps_fmrd_free_maprow_struc()

subroutine, public mumps_fac_maprow_data_m::mumps_fmrd_free_maprow_struc ( integer, intent(inout) iwhandler)

Definition at line 232 of file fac_maprow_data_m.F.

234C
235C Purpose:
236C =======
237C
238C Free internal arrays of MAPROW_STRUC.
239C Typically used after a MAPROW_STRUC has been retrieved
240C from the module and late-received message has finally
241C been processed.
242C
243C MAPROW_STRUC normally corresponds to a local variable
244C of the calling routine and will not be reused.
245C
246C Arguments:
247C =========
248C
249 INTEGER, INTENT(INOUT) :: IWHANDLER
250C
251C Local variables:
252C ===============
253C
254 TYPE (MAPROW_STRUC_T), POINTER :: MAPROW_STRUC
255C
256 maprow_struc => fmrd_array(iwhandler)
257 maprow_struc%INODE = -7777 ! Special value: negative means unused
258 DEALLOCATE(maprow_struc%SLAVES_PERE, maprow_struc%TROW)
259 NULLIFY (maprow_struc%SLAVES_PERE, maprow_struc%TROW)
260C Release handler IWHANDLER and store it
261C in a new free position for future reuse
262 CALL mumps_fdm_end_idx('A', 'MAPROW', iwhandler)
263 RETURN
subroutine, public mumps_fdm_end_idx(what, from, iwhandler)

◆ mumps_fmrd_init()

subroutine, public mumps_fac_maprow_data_m::mumps_fmrd_init ( integer, intent(in) initial_size,
integer, dimension(2), intent(inout) info )

Definition at line 63 of file fac_maprow_data_m.F.

64C
65C Purpose:
66C =======
67C
68C Module initialization
69C
70C Arguments
71C =========
72C
73 INTEGER, INTENT(IN) :: INITIAL_SIZE
74 INTEGER, INTENT(INOUT) :: INFO(2)
75C
76C Local variables
77C ===============
78C
79 INTEGER :: I, IERR
80C
81 ALLOCATE(fmrd_array( initial_size ), stat=ierr)
82 IF (ierr > 0 ) THEN
83 info(1)=-13
84 info(2)=initial_size
85 RETURN
86 ENDIF
87 DO i=1, initial_size
88 fmrd_array(i)%INODE=-9999
89 NULLIFY(fmrd_array(i)%SLAVES_PERE)
90 NULLIFY(fmrd_array(i)%TROW)
91 ENDDO
92 RETURN

◆ mumps_fmrd_is_maprow_stored()

logical function, public mumps_fac_maprow_data_m::mumps_fmrd_is_maprow_stored ( integer, intent(in) iwhandler)

Definition at line 47 of file fac_maprow_data_m.F.

48 LOGICAL :: MUMPS_FMRD_IS_MAPROW_STORED
49 INTEGER, INTENT(IN) :: IWHANDLER
50 IF (iwhandler .LT. 0 .OR. iwhandler .GT. size(fmrd_array)) THEN
51 mumps_fmrd_is_maprow_stored = .false.
52 ELSE
53 mumps_fmrd_is_maprow_stored =
54 & (fmrd_array(iwhandler)%INODE .GE. 0 )
55 IF (fmrd_array(iwhandler)%INODE .EQ.0) THEN
56 WRITE(*,*) " Internal error 1 in MUMPS_FMRD_IS_MAPROW_STORED"
57 CALL mumps_abort()
58 ENDIF
59 ENDIF
60 RETURN

◆ mumps_fmrd_retrieve_maprow()

subroutine, public mumps_fac_maprow_data_m::mumps_fmrd_retrieve_maprow ( integer, intent(in) iwhandler,
type (maprow_struc_t), pointer maprow_struc )

Definition at line 266 of file fac_maprow_data_m.F.

267C
268C Purpose:
269C =======
270C
271C Given an IWHANDLER, return a pointer to a MAPROW structure,
272C containing information on a previously received MAPROW message.
273C
274C Arguments:
275C =========
276C
277 INTEGER, INTENT(IN) :: IWHANDLER
278#if defined(MUMPS_F2003)
279 TYPE (MAPROW_STRUC_T), POINTER, INTENT(OUT) :: MAPROW_STRUC
280#else
281 TYPE (MAPROW_STRUC_T), POINTER :: MAPROW_STRUC
282#endif
283 maprow_struc => fmrd_array(iwhandler)
284 RETURN

◆ mumps_fmrd_save_maprow()

subroutine, public mumps_fac_maprow_data_m::mumps_fmrd_save_maprow ( integer, intent(inout) iwhandler,
integer, intent(in) inode,
integer, intent(in) ison,
integer, intent(in) nslaves_pere,
integer, intent(in) nfront_pere,
integer, intent(in) nass_pere,
integer, intent(in) lmap,
integer, intent(in) nfs4father,
integer, dimension (max(1,nslaves_pere)), intent(in) slaves_pere,
integer, dimension( lmap), intent(in) trow,
integer, dimension(2), intent(inout) info )

Definition at line 95 of file fac_maprow_data_m.F.

102C
103C Arguments:
104C =========
105C
106 INTEGER, INTENT(IN) :: INODE, ISON, NSLAVES_PERE, NFRONT_PERE,
107 & NASS_PERE, LMAP, NFS4FATHER
108 INTEGER, INTENT(IN) :: SLAVES_PERE (max(1,NSLAVES_PERE))
109 INTEGER, INTENT(IN) :: TROW( LMAP)
110 INTEGER, INTENT(INOUT) :: IWHANDLER, INFO(2)
111C
112C Local variables:
113C ===============
114C
115 TYPE(MAPROW_STRUC_T) :: MAPROW_STRUC
116C
117 CALL mumps_fmrd_fill_maprow( maprow_struc,
118 & inode, ison, nslaves_pere, nfront_pere,
119 & nass_pere, lmap, nfs4father,
120 & slaves_pere, !size NSLAVES_PERE
121 & trow, !size LMAP
122 & info)
123 IF (info(1) .LT. 0) RETURN
124 CALL mumps_fmrd_store_maprow(iwhandler, maprow_struc, info)
125 RETURN

◆ mumps_fmrd_store_maprow()

subroutine mumps_fac_maprow_data_m::mumps_fmrd_store_maprow ( integer, intent(inout) iwhandler,
type(maprow_struc_t), intent(in) maprow_struc,
integer, dimension(2), intent(inout) info )
private

Definition at line 128 of file fac_maprow_data_m.F.

130C
131C Purpose:
132C =======
133C
134C Given an IWHANDLER and a MAPROW structure, store the MAPROW
135C structure into the main array of the module.
136C
137C If IWHANDLER is larger than the current array size, the
138C array is reallocated.
139C
140C Arguments:
141C =========
142C
143 INTEGER, INTENT(INOUT) :: IWHANDLER, INFO(2)
144 TYPE(MAPROW_STRUC_T), INTENT(IN) :: MAPROW_STRUC
145C
146C Local variables:
147C ===============
148C
149 TYPE(MAPROW_STRUC_T), POINTER, DIMENSION(:) :: FMRD_ARRAY_TMP
150 INTEGER :: OLD_SIZE, NEW_SIZE
151 INTEGER :: I
152 INTEGER :: IERR
153C
154 CALL mumps_fdm_start_idx('A', 'MAPROW', iwhandler, info)
155 IF (info(1) .LT. 0) RETURN
156 IF (iwhandler > size(fmrd_array)) THEN
157C Reallocate in a bigger array
158 old_size = size(fmrd_array)
159 new_size = max( (old_size * 3) / 2 + 1, iwhandler)
160C
161 ALLOCATE(fmrd_array_tmp(new_size),stat=ierr)
162 IF (ierr.GT.0) THEN
163 info(1)=-13
164 info(2)=new_size
165 RETURN
166 ENDIF
167 DO i=1, old_size
168 fmrd_array_tmp(i)=fmrd_array(i)
169 ENDDO
170C Similar to code in MUMPS_FMRD_INIT:
171 DO i=old_size+1, new_size
172 fmrd_array_tmp(i)%INODE = -9999
173 NULLIFY(fmrd_array_tmp(i)%SLAVES_PERE)
174 NULLIFY(fmrd_array_tmp(i)%TROW)
175 ENDDO
176 DEALLOCATE(fmrd_array)
177 fmrd_array=>fmrd_array_tmp
178 NULLIFY(fmrd_array_tmp)
179 ENDIF
180 fmrd_array(iwhandler) = maprow_struc
181 RETURN
subroutine, public mumps_fdm_start_idx(what, from, iwhandler, info)

Variable Documentation

◆ fmrd_array

type (maprow_struc_t), dimension(:), pointer, save mumps_fac_maprow_data_m::fmrd_array

Definition at line 45 of file fac_maprow_data_m.F.

45 TYPE (MAPROW_STRUC_T), POINTER, DIMENSION(:), SAVE :: FMRD_ARRAY