28 REAL(kind(1.e0)) :: S(2)
29 REAL(kind(1.d0)) :: D(2)
30 COMPLEX(kind(1.e0)) :: C(2)
31 COMPLEX(kind(1.d0)) :: Z(2)
32 CALL mumps_size_c(i(1), i(2),
isize)
33 CALL mumps_size_c(s(1), s(2),
ssize)
34 CALL mumps_size_c(d(1), d(2),
dsize)
35 CALL mumps_size_c(c(1), c(2),
csize)
36 CALL mumps_size_c(z(1), z(2),
zsize)
37 CALL mumps_size_c(i8(1), i8(2),
i8size)
41 & STRING, MEMCNT, ERRCODE)
42 INTEGER,
POINTER :: ARRAY(:)
44 INTEGER :: MINSIZE, LP
45 LOGICAL,
OPTIONAL :: FORCE
46 LOGICAL,
OPTIONAL :: COPY
47 CHARACTER,
OPTIONAL :: STRING*(*)
48 INTEGER,
OPTIONAL :: ERRCODE
49 INTEGER(8),
OPTIONAL :: MEMCNT
50 LOGICAL :: ICOPY, IFORCE
51 INTEGER,
POINTER :: TEMP(:)
52 INTEGER :: I, IERR, ERRTPL(2)
53 CHARACTER(len=60) :: FMTA, FMTD
54 IF(
present(copy))
THEN
59 IF (
present(force))
THEN
64 IF (
present(string))
THEN
65 fmta =
"Allocation failed inside realloc: "//string
66 fmtd =
"Deallocation failed inside realloc: "//string
68 fmta =
"Allocation failed inside realloc: "
69 fmtd =
"Deallocation failed inside realloc: "
71 IF (
present(errcode))
THEN
79 IF(
associated(array))
THEN
80 IF ((
size(array) .LT. minsize) .OR.
81 & ((
size(array).NE.minsize) .AND. iforce))
THEN
82 allocate(temp(minsize), stat=ierr)
88 IF(
present(memcnt))memcnt = memcnt+
89 & int(minsize,8)*
isize
91 DO i=1,
min(
size(array), minsize)
94 IF(
present(memcnt))memcnt = memcnt-
95 & int(
size(array),8)*
isize
96 deallocate(array, stat=ierr)
108 &
'("Input array is not associated. nothing to copy here")')
112 IF(
associated(array))
THEN
113 IF ((
size(array) .LT. minsize) .OR.
114 & ((
size(array).NE.minsize) .AND. iforce))
THEN
115 IF(
present(memcnt))memcnt = memcnt-
116 & int(
size(array),8)*
isize
117 deallocate(array, stat=ierr)
127 allocate(array(minsize), stat=ierr)
133 IF(
present(memcnt)) memcnt = memcnt+
140 & STRING, MEMCNT, ERRCODE)
141 INTEGER(8),
POINTER :: ARRAY(:)
143 INTEGER :: MINSIZE, LP
144 LOGICAL,
OPTIONAL :: FORCE
145 LOGICAL,
OPTIONAL :: COPY
146 CHARACTER,
OPTIONAL :: STRING*(*)
147 INTEGER,
OPTIONAL :: ERRCODE
148 INTEGER(8),
OPTIONAL :: MEMCNT
149 LOGICAL :: ICOPY, IFORCE
150 INTEGER(8),
POINTER :: TEMP(:)
151 INTEGER :: I, IERR, ERRTPL(2)
152 CHARACTER(len=60) :: FMTA, FMTD
153 IF(
present(copy))
THEN
158 IF (
present(force))
THEN
163 IF (
present(string))
THEN
164 fmta =
"Allocation failed inside realloc: "//string
165 fmtd =
"Deallocation failed inside realloc: "//string
167 fmta =
"Allocation failed inside realloc: "
168 fmtd =
"Deallocation failed inside realloc: "
170 IF (
present(errcode))
THEN
178 IF(
associated(array))
THEN
179 IF ((
size(array) .LT. minsize) .OR.
180 & ((
size(array).NE.minsize) .AND. iforce))
THEN
181 allocate(temp(minsize), stat=ierr)
187 IF(
present(memcnt))memcnt = memcnt+
190 DO i=1,
min(
size(array), minsize)
193 IF(
present(memcnt))memcnt = memcnt-
194 & int(
size(array),8)*
i8size
195 deallocate(array, stat=ierr)
207 &
'("Input array is not associated. nothing to copy here")')
211 IF(
associated(array))
THEN
212 IF ((
size(array) .LT. minsize) .OR.
213 & ((
size(array).NE.minsize) .AND. iforce))
THEN
214 IF(
present(memcnt))memcnt = memcnt-
215 & int(
size(array),8)*
i8size
216 deallocate(array, stat=ierr)
226 allocate(array(minsize), stat=ierr)
232 IF(
present(memcnt)) memcnt = memcnt+
239 & STRING, MEMCNT, ERRCODE)
240 INTEGER,
POINTER :: ARRAY(:)
243 INTEGER(8) :: MINSIZE
244 LOGICAL,
OPTIONAL :: FORCE
245 LOGICAL,
OPTIONAL :: COPY
246 CHARACTER,
OPTIONAL :: STRING*(*)
247 INTEGER,
OPTIONAL :: ERRCODE
248 INTEGER(8),
OPTIONAL :: MEMCNT
249 LOGICAL :: ICOPY, IFORCE
250 INTEGER,
POINTER :: TEMP(:)
252 INTEGER :: IERR, ERRTPL(2)
253 CHARACTER(len=60) :: FMTA, FMTD
254 IF(
present(copy))
THEN
259 IF (
present(force))
THEN
264 IF (
present(string))
THEN
265 fmta =
"Allocation failed inside realloc: "//string
266 fmtd =
"Deallocation failed inside realloc: "//string
268 fmta =
"Allocation failed inside realloc: "
269 fmtd =
"Deallocation failed inside realloc: "
271 IF (
present(errcode))
THEN
273 errtpl(2) = int(
min(minsize,huge(i)))
276 errtpl(2) = int(
min(minsize,huge(i)))
279 IF(
associated(array))
THEN
280 IF ((int(
size(array),8) .LT. minsize) .OR.
281 & ((int(
size(array),8).NE.minsize) .AND. iforce))
THEN
282 allocate(temp(minsize), stat=ierr)
288 IF(
present(memcnt))memcnt = memcnt+minsize*
isize
290 DO i=1,
min(int(
size(array),8), minsize)
293 IF(
present(memcnt))memcnt = memcnt-
294 & int(
size(array),8)*
isize
295 deallocate(array, stat=ierr)
307 &
'("Input array is not associated. nothing to copy here")')
311 IF(
associated(array))
THEN
312 IF ((int(
size(array),8) .LT. minsize) .OR.
313 & ((int(
size(array),8).NE.minsize) .AND. iforce))
THEN
314 IF(
present(memcnt))memcnt = memcnt-
315 & int(
size(array),8)*
isize
316 deallocate(array, stat=ierr)
326 allocate(array(minsize), stat=ierr)
332 IF(
present(memcnt)) memcnt = memcnt+minsize*
isize
338 & STRING, MEMCNT, ERRCODE)
339 INTEGER(8),
POINTER :: ARRAY(:)
340 INTEGER :: INFO(:), LP
341 INTEGER(8) :: MINSIZE
342 LOGICAL,
OPTIONAL :: FORCE
343 LOGICAL,
OPTIONAL :: COPY
344 CHARACTER,
OPTIONAL :: STRING*(*)
345 INTEGER,
OPTIONAL :: ERRCODE
346 INTEGER(8),
OPTIONAL :: MEMCNT
347 LOGICAL :: ICOPY, IFORCE
348 INTEGER(8),
POINTER :: TEMP(:)
349 INTEGER :: IERR, ERRTPL(2)
350 CHARACTER(len=60) :: FMTA, FMTD
352 asize = int(
size(array),8)
353 IF(
present(copy))
THEN
358 IF (
present(force))
THEN
363 IF (
present(string))
THEN
364 fmta =
"Allocation failed inside realloc: "//string
365 fmtd =
"Deallocation failed inside realloc: "//string
367 fmta =
"Allocation failed inside realloc: "
368 fmtd =
"Deallocation failed inside realloc: "
370 IF (
present(errcode))
THEN
372 errtpl(2) = int(minsize)
375 errtpl(2) = int(minsize)
378 IF(
associated(array))
THEN
379 IF ((asize .LT. minsize) .OR.
380 & ((asize.NE.minsize) .AND. iforce))
THEN
381 allocate(temp(minsize), stat=ierr)
387 IF(
present(memcnt))memcnt = memcnt+
390 DO i=1,
min(asize, minsize)
393 IF(
present(memcnt))memcnt = memcnt-
395 deallocate(array, stat=ierr)
407 &
'("Input array is not associated. nothing to copy here")')
411 IF(
associated(array))
THEN
412 IF ((asize .LT. minsize) .OR.
413 & ((asize.NE.minsize) .AND. iforce))
THEN
414 IF(
present(memcnt))memcnt = memcnt-
416 deallocate(array, stat=ierr)
426 allocate(array(minsize), stat=ierr)
432 IF(
present(memcnt)) memcnt = memcnt+
439 & STRING, MEMCNT, ERRCODE)
440 REAL(kind(1.E0)),
POINTER :: ARRAY(:)
442 INTEGER :: MINSIZE, LP
443 LOGICAL,
OPTIONAL :: FORCE
444 LOGICAL,
OPTIONAL :: COPY
445 CHARACTER,
OPTIONAL :: STRING*(*)
446 INTEGER,
OPTIONAL :: ERRCODE
447 INTEGER(8),
OPTIONAL :: MEMCNT
448 LOGICAL :: ICOPY, IFORCE
449 REAL(kind(1.E0)),
POINTER :: TEMP(:)
450 INTEGER :: I, , ERRTPL(2)
451 CHARACTER(len=60) :: FMTA, FMTD
452 IF(
present(copy))
THEN
457 IF (
present(force))
THEN
462 IF (
present(string))
THEN
463 fmta =
"Allocation failed inside realloc: "//string
464 fmtd =
"Deallocation failed inside realloc: "//string
466 fmta =
"Allocation failed inside realloc: "
467 fmtd =
"Deallocation failed inside realloc: "
469 IF (
present(errcode))
THEN
477 IF(
associated(array))
THEN
478 IF ((
size(array) .LT. minsize) .OR.
479 & ((
size(array).NE.minsize) .AND. iforce))
THEN
480 allocate(temp(minsize), stat=ierr)
486 IF(
present(memcnt))memcnt = memcnt+
487 & int(minsize,8)*
ssize
489 DO i=1,
min(
size(array), minsize)
492 IF(
present(memcnt))memcnt = memcnt-
493 & int(
size(array),8)*
ssize
494 deallocate(array, stat=ierr)
506 &
'("Input array is not associated. nothing to copy here")')
510 IF(
associated(array))
THEN
511 IF ((
size(array) .LT. minsize) .OR.
512 & ((
size(array).NE.minsize) .AND. iforce))
THEN
513 IF(
present(memcnt))memcnt = memcnt-
514 & int(
size(array),8)*
ssize
515 deallocate(array, stat=ierr)
525 allocate(array(minsize), stat=ierr)
531 IF(
present(memcnt)) memcnt = memcnt+minsize*
ssize
537 & STRING, MEMCNT, ERRCODE)
538 REAL(kind(1.D0)),
POINTER :: ARRAY(:)
540 INTEGER :: MINSIZE, LP
541 LOGICAL,
OPTIONAL :: FORCE
542 LOGICAL,
OPTIONAL :: COPY
543 CHARACTER,
OPTIONAL :: STRING*(*)
544 INTEGER,
OPTIONAL :: ERRCODE
545 INTEGER(8),
OPTIONAL :: MEMCNT
546 LOGICAL :: ICOPY, IFORCE
547 REAL(kind(1.D0)),
POINTER :: TEMP(:)
548 INTEGER :: I, IERR, ERRTPL(2)
549 CHARACTER(len=60) :: FMTA, FMTD
550 IF(
present(copy))
THEN
555 IF (
present(force))
THEN
560 IF (
present(string))
THEN
561 fmta =
"Allocation failed inside realloc: "//string
562 fmtd =
"Deallocation failed inside realloc: "//string
564 fmta =
"Allocation failed inside realloc: "
565 fmtd =
"Deallocation failed inside realloc: "
567 IF (
present(errcode))
THEN
575 IF(
associated(array))
THEN
576 IF ((
size(array) .LT. minsize) .OR.
577 & ((
size(array).NE.minsize) .AND. iforce))
THEN
578 allocate(temp(minsize), stat=ierr)
584 IF(
present(memcnt))memcnt = memcnt+
585 & int(minsize,8)*
dsize
587 DO i=1,
min(
size(array), minsize)
590 IF(
present(memcnt))memcnt = memcnt-
591 & int(
size(array),8)*
dsize
592 deallocate(array, stat=ierr)
604 &
'("Input array is not associated. nothing to copy here")')
608 IF(
associated(array))
THEN
609 IF ((
size(array) .LT. minsize) .OR.
610 & ((
size(array).NE.minsize) .AND. iforce))
THEN
611 IF(
present(memcnt))memcnt = memcnt-
612 & int(
size(array),8)*
dsize
613 deallocate(array, stat=ierr)
623 allocate(array(minsize), stat=ierr)
629 IF(
present(memcnt)) memcnt = memcnt+
630 & int(minsize,8)*
dsize
636 & STRING, MEMCNT, ERRCODE)
637 COMPLEX(kind((1.E0,1.E0))),
POINTER :: ARRAY(:)
639 INTEGER :: MINSIZE, LP
640 LOGICAL,
OPTIONAL :: FORCE
641 LOGICAL,
OPTIONAL :: COPY
642 CHARACTER,
OPTIONAL :: STRING*(*)
643 INTEGER,
OPTIONAL :: ERRCODE
644 INTEGER(8),
OPTIONAL :: MEMCNT
645 LOGICAL :: ICOPY, IFORCE
646 COMPLEX(kind((1.E0,1.E0))),
POINTER :: TEMP(:)
647 INTEGER :: I, IERR, ERRTPL(2)
648 CHARACTER(len=60) :: FMTA, FMTD
649 IF(
present(copy))
THEN
654 IF (
present(force))
THEN
659 IF (
present(string))
THEN
660 fmta =
"Allocation failed inside realloc: "//string
661 fmtd =
"Deallocation failed inside realloc: "//string
663 fmta =
"Allocation failed inside realloc: "
664 fmtd =
"Deallocation failed inside realloc: "
666 IF (
present(errcode))
THEN
674 IF(
associated(array))
THEN
675 IF ((
size(array) .LT. minsize) .OR.
676 & ((
size(array).NE.minsize) .AND. iforce))
THEN
677 allocate(temp(minsize), stat=ierr)
683 IF(
present(memcnt))memcnt = memcnt+
684 & int(minsize,8)*
csize
686 DO i=1,
min(
size(array), minsize)
689 IF(
present(memcnt))memcnt = memcnt-
690 & int(
size(array),8)*
csize
691 deallocate(array, stat=ierr)
703 &
'("Input array is not associated. nothing to copy here")')
707 IF(
associated(array))
THEN
708 IF ((
size(array) .LT. minsize) .OR.
709 & ((
size(array).NE.minsize) .AND. iforce))
THEN
710 IF(
present(memcnt))memcnt = memcnt-
711 & int(
size(array),8)*
csize
712 deallocate(array, stat=ierr)
722 allocate(array(minsize), stat=ierr)
728 IF(
present(memcnt)) memcnt = memcnt+
729 & int(minsize,8)*
csize
735 & STRING, MEMCNT, ERRCODE)
736 COMPLEX(kind((1.D0,1.D0))),
POINTER :: ARRAY(:)
738 INTEGER :: MINSIZE, LP
739 LOGICAL,
OPTIONAL :: FORCE
740 LOGICAL,
OPTIONAL :: COPY
741 CHARACTER,
OPTIONAL :: STRING*(*)
742 INTEGER,
OPTIONAL :: ERRCODE
743 INTEGER(8),
OPTIONAL :: MEMCNT
744 LOGICAL :: ICOPY, IFORCE
745 COMPLEX(kind((1.D0,1.D0))),
POINTER :: TEMP(:)
746 INTEGER :: I, IERR, ERRTPL(2)
747 CHARACTER(len=60) :: FMTA, FMTD
748 IF(
present(copy))
THEN
753 IF (
present(force))
THEN
758 IF (
present(string))
THEN
759 fmta =
"Allocation failed inside realloc: "//string
760 fmtd =
"Deallocation failed inside realloc: "//string
762 fmta =
"Allocation failed inside realloc: "
763 fmtd =
"Deallocation failed inside realloc: "
765 IF (
present(errcode))
THEN
773 IF(
associated(array))
THEN
774 IF ((
size(array) .LT. minsize) .OR.
775 & ((
size(array).NE.minsize) .AND. iforce))
THEN
776 allocate(temp(minsize), stat=ierr)
782 IF(
present(memcnt))memcnt = memcnt+int(minsize,8)*16_8
784 DO i=1,
min(
size(array), minsize)
787 IF(
present(memcnt))memcnt =memcnt-
788 & int(
size(array),8)*
zsize
789 deallocate(array, stat=ierr)
801 &
'("Input array is not associated. nothing to copy here")')
805 IF(
associated(array))
THEN
806 IF ((
size(array) .LT. minsize) .OR.
807 & ((
size(array).NE.minsize) .AND. iforce))
THEN
808 IF(
present(memcnt))memcnt =memcnt-
809 & int(
size(array),8)*
zsize
810 deallocate(array, stat=ierr)
820 allocate(array(minsize), stat=ierr)
826 IF(
present(memcnt)) memcnt = memcnt+
827 & int(minsize,8)*
zsize
833 INTEGER,
POINTER :: A1(:)
834 INTEGER,
POINTER,
OPTIONAL :: A2(:), A3(:), A4(:), A5(:),
836 INTEGER(8),
OPTIONAL :: MEMCNT
837 INTEGER(8) :: IMEMCNT
839 IF(
associated(a1))
THEN
840 imemcnt = imemcnt+int(
size(a1),8)*
isize
845 IF(
associated(a2))
THEN
846 imemcnt = imemcnt+int(
size(a2),8)*
isize
852 IF(
associated(a3))
THEN
853 imemcnt = imemcnt+int(
size(a3),8)*
isize
859 IF(
associated(a4))
THEN
860 imemcnt = imemcnt+int(
size(a4),8)*
isize
866 IF(
associated(a5))
THEN
867 imemcnt = imemcnt+int(
size(a5),8)*
isize
873 IF(
associated(a6))
THEN
874 imemcnt = imemcnt+int(
size(a6),8)*
isize
880 IF(
associated(a7))
THEN
881 imemcnt = imemcnt+int(
size(a7),8)*
isize
886 IF(
present(memcnt)) memcnt = memcnt-imemcnt
890 INTEGER(8),
POINTER :: A1(:)
891 INTEGER(8),
POINTER,
OPTIONAL :: A2(:), A3(:), A4(:), A5(:),
893 INTEGER(8),
OPTIONAL :: MEMCNT
894 INTEGER(8) :: IMEMCNT
896 IF(
associated(a1))
THEN
897 imemcnt = imemcnt+int(
size(a1),8)*
i8size
902 IF(
associated(a2))
THEN
903 imemcnt = imemcnt+int(
size(a2),8)*
i8size
909 IF(
associated(a3))
THEN
910 imemcnt = imemcnt+int(
size(a3),8)*
i8size
916 IF(
associated(a4))
THEN
917 imemcnt = imemcnt+int(
size(a4),8)*
i8size
923 IF(
associated(a5))
THEN
924 imemcnt = imemcnt+int(
size(a5),8)*
i8size
930 IF(
associated(a6))
THEN
931 imemcnt = imemcnt+int(
size(a6),8)*
i8size
937 IF(
associated(a7))
THEN
938 imemcnt = imemcnt+int(
size(a7),8)*
i8size
943 IF(
present(memcnt)) memcnt = memcnt-imemcnt
subroutine mumps_memory_set_data_sizes()
integer(8), private csize
subroutine mumps_irealloc(array, minsize, info, lp, force, copy, string, memcnt, errcode)
integer(8), private isize
integer(8), private zsize
integer(8), private dsize
subroutine mumps_i8realloc8(array, minsize, info, lp, force, copy, string, memcnt, errcode)
subroutine mumps_crealloc(array, minsize, info, lp, force, copy, string, memcnt, errcode)
subroutine mumps_i8realloc(array, minsize, info, lp, force, copy, string, memcnt, errcode)
integer(8), private ssize
subroutine mumps_srealloc(array, minsize, info, lp, force, copy, string, memcnt, errcode)
subroutine mumps_drealloc(array, minsize, info, lp, force, copy, string, memcnt, errcode)
integer(8), private i8size
subroutine mumps_idealloc(a1, a2, a3, a4, a5, a6, a7, memcnt)
subroutine mumps_i8dealloc(a1, a2, a3, a4, a5, a6, a7, memcnt)
subroutine mumps_zrealloc(array, minsize, info, lp, force, copy, string, memcnt, errcode)
subroutine mumps_irealloc8(array, minsize, info, lp, force, copy, string, memcnt, errcode)