Commit 14c923613ee917ad1024b77d5e354f4fa6ddc8ff
1 parent
aee8aaaf18
Exists in
master
and in
2 other branches
Return explicit umfpack return code when necessary
git-svn-id: https://lxsd.femto-st.fr/svn/fvn@73 b657c933-2333-4658-acf2-d3c7c2708721
Showing 1 changed file with 30 additions and 29 deletions Side-by-side Diff
fvn_sparse/fvn_sparse.f90
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | |
15 | 15 | function umfpack_return_code(c) |
16 | 16 | implicit none |
17 | - integer(4), intent(in) :: c | |
17 | + integer(kind=sp_kind), intent(in) :: c | |
18 | 18 | character(len=80) :: umfpack_return_code |
19 | 19 | select case(c) |
20 | 20 | case(0) |
... | ... | @@ -51,6 +51,7 @@ |
51 | 51 | umfpack_return_code="Unknown return code" |
52 | 52 | end select |
53 | 53 | end function |
54 | + | |
54 | 55 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
55 | 56 | ! |
56 | 57 | ! SPARSE RESOLUTION |
... | ... | @@ -121,7 +122,7 @@ |
121 | 122 | call umfpack_zl_symbolic(n,n,Ap,Ai,Ax,Az,symbolic, control, info) |
122 | 123 | ! info(1) should be zero |
123 | 124 | if (info(1) /= 0) then |
124 | - write(*,*) "Problem during symbolic analysis" | |
125 | + write(*,*) "Problem during symbolic analysis : ",trim(umfpack_return_code(int(info(1)))) | |
125 | 126 | status=info(1) |
126 | 127 | endif |
127 | 128 | |
... | ... | @@ -129,7 +130,7 @@ |
129 | 130 | call umfpack_zl_numeric (Ap, Ai, Ax, Az, symbolic, numeric, control, info) |
130 | 131 | ! info(1) should be zero |
131 | 132 | if (info(1) /= 0) then |
132 | - write(*,*) "Problem during numerical factorization" | |
133 | + write(*,*) "Problem during numerical factorization : ",trim(umfpack_return_code(int(info(1)))) | |
133 | 134 | status=info(1) |
134 | 135 | endif |
135 | 136 | |
... | ... | @@ -142,7 +143,7 @@ |
142 | 143 | ! info(1) should be zero |
143 | 144 | if (info(1) /= 0) then |
144 | 145 | if ( (info(1) < 1) .or. (info(1) >3) ) then ! not a warning |
145 | - write(*,*) "Problem during sparse determinant, returned code : ",info(1) | |
146 | + write(*,*) "Problem during sparse determinant : ",trim(umfpack_return_code(int(info(1)))) | |
146 | 147 | endif |
147 | 148 | status=info(1) |
148 | 149 | endif |
... | ... | @@ -160,7 +161,7 @@ |
160 | 161 | call umfpack_zl_solve (sys, Ap, Ai, Ax,Az, xx,xz, bx,bz, numeric, control, info) |
161 | 162 | ! info(1) should be zero |
162 | 163 | if (info(1) /= 0) then |
163 | - write(*,*) "Problem during solving" | |
164 | + write(*,*) "Problem during solving : ",trim(umfpack_return_code(int(info(1)))) | |
164 | 165 | status=info(1) |
165 | 166 | endif |
166 | 167 | |
... | ... | @@ -230,7 +231,7 @@ |
230 | 231 | call umfpack_zi_symbolic(n,n,Ap,Ai,Ax,Az,symbolic, control, info) |
231 | 232 | ! info(1) should be zero |
232 | 233 | if (info(1) /= 0) then |
233 | - write(*,*) "Problem during symbolic analysis" | |
234 | + write(*,*) "Problem during symbolic analysis : ",trim(umfpack_return_code(int(info(1)))) | |
234 | 235 | status=info(1) |
235 | 236 | endif |
236 | 237 | |
... | ... | @@ -238,7 +239,7 @@ |
238 | 239 | call umfpack_zi_numeric (Ap, Ai, Ax, Az, symbolic, numeric, control, info) |
239 | 240 | ! info(1) should be zero |
240 | 241 | if (info(1) /= 0) then |
241 | - write(*,*) "Problem during numerical factorization" | |
242 | + write(*,*) "Problem during numerical factorization : ",trim(umfpack_return_code(int(info(1)))) | |
242 | 243 | status=info(1) |
243 | 244 | endif |
244 | 245 | |
... | ... | @@ -251,7 +252,7 @@ |
251 | 252 | ! info(1) should be zero |
252 | 253 | if (info(1) /= 0) then |
253 | 254 | if ( (info(1) < 1) .or. (info(1) >3) ) then ! not a warning |
254 | - write(*,*) "Problem during sparse determinant, returned code : ",info(1) | |
255 | + write(*,*) "Problem during sparse determinant : ",trim(umfpack_return_code(int(info(1)))) | |
255 | 256 | endif |
256 | 257 | status=info(1) |
257 | 258 | endif |
... | ... | @@ -270,7 +271,7 @@ |
270 | 271 | call umfpack_zi_solve (sys, Ap, Ai, Ax,Az, xx,xz, bx,bz, numeric, control, info) |
271 | 272 | ! info(1) should be zero |
272 | 273 | if (info(1) /= 0) then |
273 | - write(*,*) "Problem during solving" | |
274 | + write(*,*) "Problem during solving : ",trim(umfpack_return_code(int(info(1)))) | |
274 | 275 | status=info(1) |
275 | 276 | endif |
276 | 277 | |
... | ... | @@ -331,7 +332,7 @@ |
331 | 332 | call umfpack_dl_symbolic(n,n,Ap,Ai,A,symbolic, control, info) |
332 | 333 | ! info(1) should be zero |
333 | 334 | if (info(1) /= 0) then |
334 | - write(*,*) "Problem during symbolic analysis" | |
335 | + write(*,*) "Problem during symbolic analysis : ",trim(umfpack_return_code(int(info(1)))) | |
335 | 336 | status=info(1) |
336 | 337 | endif |
337 | 338 | |
... | ... | @@ -339,7 +340,7 @@ |
339 | 340 | call umfpack_dl_numeric (Ap, Ai, A, symbolic, numeric, control, info) |
340 | 341 | ! info(1) should be zero |
341 | 342 | if (info(1) /= 0) then |
342 | - write(*,*) "Problem during numerical factorization" | |
343 | + write(*,*) "Problem during numerical factorization : ",trim(umfpack_return_code(int(info(1)))) | |
343 | 344 | status=info(1) |
344 | 345 | endif |
345 | 346 | |
... | ... | @@ -352,7 +353,7 @@ |
352 | 353 | ! info(1) should be zero |
353 | 354 | if (info(1) /= 0) then |
354 | 355 | if ( (info(1) < 1) .or. (info(1) >3) ) then ! not a warning |
355 | - write(*,*) "Problem during sparse determinant, returned code : ",info(1) | |
356 | + write(*,*) "Problem during sparse determinant : ",trim(umfpack_return_code(int(info(1)))) | |
356 | 357 | endif |
357 | 358 | status=info(1) |
358 | 359 | endif |
... | ... | @@ -366,7 +367,7 @@ |
366 | 367 | call umfpack_dl_solve (sys, Ap, Ai, A, x, B, numeric, control, info) |
367 | 368 | ! info(1) should be zero |
368 | 369 | if (info(1) /= 0) then |
369 | - write(*,*) "Problem during solving" | |
370 | + write(*,*) "Problem during solving : ",trim(umfpack_return_code(int(info(1)))) | |
370 | 371 | status=info(1) |
371 | 372 | endif |
372 | 373 | |
... | ... | @@ -426,7 +427,7 @@ |
426 | 427 | call umfpack_di_symbolic(n,n,Ap,Ai,A,symbolic, control, info) |
427 | 428 | ! info(1) should be zero |
428 | 429 | if (info(1) /= 0) then |
429 | - write(*,*) "Problem during symbolic analysis" | |
430 | + write(*,*) "Problem during symbolic analysis : ",trim(umfpack_return_code(int(info(1)))) | |
430 | 431 | status=info(1) |
431 | 432 | endif |
432 | 433 | |
... | ... | @@ -434,7 +435,7 @@ |
434 | 435 | call umfpack_di_numeric (Ap, Ai, A, symbolic, numeric, control, info) |
435 | 436 | ! info(1) should be zero |
436 | 437 | if (info(1) /= 0) then |
437 | - write(*,*) "Problem during numerical factorization" | |
438 | + write(*,*) "Problem during numerical factorization : ",trim(umfpack_return_code(int(info(1)))) | |
438 | 439 | status=info(1) |
439 | 440 | endif |
440 | 441 | |
... | ... | @@ -447,7 +448,7 @@ |
447 | 448 | ! info(1) should be zero |
448 | 449 | if (info(1) /= 0) then |
449 | 450 | if ( (info(1) < 1) .or. (info(1) >3) ) then ! not a warning |
450 | - write(*,*) "Problem during sparse determinant, returned code : ",info(1) | |
451 | + write(*,*) "Problem during sparse determinant : ",trim(umfpack_return_code(int(info(1)))) | |
451 | 452 | endif |
452 | 453 | status=info(1) |
453 | 454 | endif |
... | ... | @@ -459,7 +460,7 @@ |
459 | 460 | call umfpack_di_solve (sys, Ap, Ai, A, x, B, numeric, control, info) |
460 | 461 | ! info(1) should be zero |
461 | 462 | if (info(1) /= 0) then |
462 | - write(*,*) "Problem during solving" | |
463 | + write(*,*) "Problem during solving : ",trim(umfpack_return_code(int(info(1)))) | |
463 | 464 | status=info(1) |
464 | 465 | endif |
465 | 466 | |
... | ... | @@ -521,7 +522,7 @@ |
521 | 522 | call umfpack_zl_symbolic(n,n,Ap,Ai,Ax,Az,symbolic, control, info) |
522 | 523 | ! info(1) should be zero |
523 | 524 | if (info(1) /= 0) then |
524 | - write(*,*) "Problem during symbolic analysis" | |
525 | + write(*,*) "Problem during symbolic analysis : ",trim(umfpack_return_code(int(info(1)))) | |
525 | 526 | status=info(1) |
526 | 527 | endif |
527 | 528 | |
... | ... | @@ -529,7 +530,7 @@ |
529 | 530 | call umfpack_zl_numeric (Ap, Ai, Ax, Az, symbolic, numeric, control, info) |
530 | 531 | ! info(1) should be zero |
531 | 532 | if (info(1) /= 0) then |
532 | - write(*,*) "Problem during numerical factorization" | |
533 | + write(*,*) "Problem during numerical factorization : ",trim(umfpack_return_code(int(info(1)))) | |
533 | 534 | status=info(1) |
534 | 535 | endif |
535 | 536 | |
... | ... | @@ -540,7 +541,7 @@ |
540 | 541 | ! info(1) should be zero |
541 | 542 | if (info(1) /= 0) then |
542 | 543 | if ( (info(1) < 1) .or. (info(1) >3) ) then ! not a warning |
543 | - write(*,*) "Problem during sparse determinant, returned code : ",info(1) | |
544 | + write(*,*) "Problem during sparse determinant : ",trim(umfpack_return_code(int(info(1)))) | |
544 | 545 | endif |
545 | 546 | status=info(1) |
546 | 547 | endif |
... | ... | @@ -600,7 +601,7 @@ |
600 | 601 | call umfpack_zi_symbolic(n,n,Ap,Ai,Ax,Az,symbolic, control, info) |
601 | 602 | ! info(1) should be zero |
602 | 603 | if (info(1) /= 0) then |
603 | - write(*,*) "Problem during symbolic analysis" | |
604 | + write(*,*) "Problem during symbolic analysis : ",trim(umfpack_return_code(int(info(1)))) | |
604 | 605 | status=info(1) |
605 | 606 | endif |
606 | 607 | |
... | ... | @@ -608,7 +609,7 @@ |
608 | 609 | call umfpack_zi_numeric (Ap, Ai, Ax, Az, symbolic, numeric, control, info) |
609 | 610 | ! info(1) should be zero |
610 | 611 | if (info(1) /= 0) then |
611 | - write(*,*) "Problem during numerical factorization" | |
612 | + write(*,*) "Problem during numerical factorization : ",trim(umfpack_return_code(int(info(1)))) | |
612 | 613 | status=info(1) |
613 | 614 | endif |
614 | 615 | |
... | ... | @@ -619,7 +620,7 @@ |
619 | 620 | ! info(1) should be zero |
620 | 621 | if (info(1) /= 0) then |
621 | 622 | if ( (info(1) < 1) .or. (info(1) >3) ) then ! not a warning |
622 | - write(*,*) "Problem during sparse determinant, returned code : ",info(1) | |
623 | + write(*,*) "Problem during sparse determinant : ",trim(umfpack_return_code(int(info(1)))) | |
623 | 624 | endif |
624 | 625 | status=info(1) |
625 | 626 | endif |
... | ... | @@ -670,7 +671,7 @@ |
670 | 671 | call umfpack_dl_symbolic(n,n,Ap,Ai,A,symbolic, control, info) |
671 | 672 | ! info(1) should be zero |
672 | 673 | if (info(1) /= 0) then |
673 | - write(*,*) "Problem during symbolic analysis" | |
674 | + write(*,*) "Problem during symbolic analysis : ",trim(umfpack_return_code(int(info(1)))) | |
674 | 675 | status=info(1) |
675 | 676 | endif |
676 | 677 | |
... | ... | @@ -678,7 +679,7 @@ |
678 | 679 | call umfpack_dl_numeric (Ap, Ai, A, symbolic, numeric, control, info) |
679 | 680 | ! info(1) should be zero |
680 | 681 | if (info(1) /= 0) then |
681 | - write(*,*) "Problem during numerical factorization" | |
682 | + write(*,*) "Problem during numerical factorization : ",trim(umfpack_return_code(int(info(1)))) | |
682 | 683 | status=info(1) |
683 | 684 | endif |
684 | 685 | |
... | ... | @@ -689,7 +690,7 @@ |
689 | 690 | ! info(1) should be zero |
690 | 691 | if (info(1) /= 0) then |
691 | 692 | if ( (info(1) < 1) .or. (info(1) >3) ) then ! not a warning |
692 | - write(*,*) "Problem during sparse determinant, returned code : ",info(1) | |
693 | + write(*,*) "Problem during sparse determinant : ",trim(umfpack_return_code(int(info(1)))) | |
693 | 694 | endif |
694 | 695 | status=info(1) |
695 | 696 | endif |
... | ... | @@ -745,7 +746,7 @@ |
745 | 746 | call umfpack_di_symbolic(n,n,Ap,Ai,A,symbolic, control, info) |
746 | 747 | ! info(1) should be zero |
747 | 748 | if (info(1) /= 0) then |
748 | - write(*,*) "Problem during symbolic analysis" | |
749 | + write(*,*) "Problem during symbolic analysis : ",trim(umfpack_return_code(int(info(1)))) | |
749 | 750 | status=info(1) |
750 | 751 | endif |
751 | 752 | |
... | ... | @@ -753,7 +754,7 @@ |
753 | 754 | call umfpack_di_numeric (Ap, Ai, A, symbolic, numeric, control, info) |
754 | 755 | ! info(1) should be zero |
755 | 756 | if (info(1) /= 0) then |
756 | - write(*,*) "Problem during numerical factorization" | |
757 | + write(*,*) "Problem during numerical factorization : ",trim(umfpack_return_code(int(info(1)))) | |
757 | 758 | status=info(1) |
758 | 759 | endif |
759 | 760 | |
... | ... | @@ -765,7 +766,7 @@ |
765 | 766 | ! info(1) should be zero |
766 | 767 | if (info(1) /= 0) then |
767 | 768 | if ( (info(1) < 1) .or. (info(1) >3) ) then ! not a warning |
768 | - write(*,*) "Problem during sparse determinant, returned code : ",info(1) | |
769 | + write(*,*) "Problem during sparse determinant : ",trim(umfpack_return_code(int(info(1)))) | |
769 | 770 | endif |
770 | 771 | status=info(1) |
771 | 772 | endif |