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

Go to the source code of this file.

Modules

module  zmumps_sol_es

Functions/Subroutines

subroutine, public zmumps_sol_es::zmumps_sol_es_init (size_of_block_arg, keep201)
subroutine, public zmumps_sol_es::zmumps_tree_prun_nodes (fill, dad, ne_steps, frere, keep28, fils, step, n, nodes_rhs, nb_nodes_rhs, to_process, nb_prun_nodes, nb_prun_roots, nb_prun_leaves, pruned_list, pruned_roots, pruned_leaves)
subroutine, public zmumps_sol_es::zmumps_chain_prun_nodes (fill, dad, keep28, step, n, nodes_rhs, nb_nodes_rhs, pruned_sons, to_process, nb_prun_nodes, nb_prun_roots, nb_prun_leaves, pruned_list, pruned_roots, pruned_leaves)
subroutine, public zmumps_sol_es::zmumps_initialize_rhs_bounds (step, n, irhs_ptr, nbcol, irhs_sparse, nz_rhs, jbeg_rhs, perm_rhs, size_perm_rhs, k242, k243, uns_perm_inv, size_uns_perm_inv, k23, rhs_bounds, nsteps, nb_sparse, myid, mode)
subroutine, public zmumps_sol_es::zmumps_propagate_rhs_bounds (pruned_leaves, nb_pruned_leaves, step, n, pruned_sons, dad, rhs_bounds, nsteps, myid, comm, keep485, iw, liw, ptrist, kixsz, ooc_fct_loc, phase, ldlt, k38)
integer(8) function zmumps_sol_es::zmumps_local_factor_size (iw, liw, ptr, phase, ldlt, is_root)
integer(8) function zmumps_sol_es::zmumps_local_factor_size_blr (iw, liw, ptr, lrstatus, iwhandler, phase, ldlt, is_root)
subroutine, public zmumps_sol_es::zmumps_tree_prun_nodes_stats (myid, n, keep28, keep201, fr_fact, step, pruned_list, nb_prun_nodes, ooc_fct_type_loc)
subroutine, public zmumps_sol_es::zmumps_chain_prun_nodes_stats (myid, n, keep28, keep201, keep485, fr_fact, step, pruned_list, nb_prun_nodes, ooc_fct_type_loc)
subroutine zmumps_permute_rhs_gs (lp, lpok, prokg, mpg, perm_strat, sym_perm, n, nrhs, irhs_ptr, size_irhs_ptr, irhs_sparse, nzrhs, perm_rhs, ierr)
subroutine zmumps_permute_rhs_am1 (perm_strat, sym_perm, irhs_ptr, nhrs, perm_rhs, sizeperm, ierr)
subroutine zmumps_interleave_rhs_am1 (perm_rhs, size_perm, iptr_working, size_iptr_working, working, size_working, irhs_ptr, step, sym_perm, n, nbrhs, procnode, nsteps, slavef, keep199, behaviour_l0, reorder, n_select, prokg, mpg)

Variables

integer(8), dimension(:,:), pointer zmumps_sol_es::size_of_block
integer(8), public zmumps_sol_es::pruned_size_loaded

Function/Subroutine Documentation

◆ zmumps_interleave_rhs_am1()

subroutine zmumps_interleave_rhs_am1 ( integer, dimension(size_perm), intent(inout) perm_rhs,
integer, intent(in) size_perm,
integer, dimension(size_iptr_working), intent(in) iptr_working,
integer, intent(in) size_iptr_working,
integer, dimension(size_working), intent(in) working,
integer, intent(in) size_working,
integer, dimension(n+1), intent(in) irhs_ptr,
integer, dimension(n), intent(in) step,
integer, dimension(n), intent(in) sym_perm,
integer, intent(in) n,
integer, intent(in) nbrhs,
integer, dimension(nsteps), intent(in) procnode,
integer, intent(in) nsteps,
integer, intent(in) slavef,
integer, intent(in) keep199,
logical, intent(in) behaviour_l0,
logical, intent(in) reorder,
integer, intent(in) n_select,
logical, intent(in) prokg,
integer, intent(in) mpg )

Definition at line 612 of file zmumps_sol_es.F.

620 IMPLICIT NONE
621 INTEGER, INTENT(IN) :: SIZE_PERM,
622 & SIZE_IPTR_WORKING,
623 & IPTR_WORKING(SIZE_IPTR_WORKING),
624 & SIZE_WORKING,
625 & WORKING(SIZE_WORKING),
626 & N,
627 & IRHS_PTR(N+1),
628 & STEP(N),
629 & SYM_PERM(N),
630 & NBRHS,
631 & NSTEPS,
632 & PROCNODE(NSTEPS),
633 & SLAVEF, KEEP199,
634 & n_select, MPG
635 LOGICAL, INTENT(IN) :: behaviour_L0,
636 & reorder, PROKG
637 INTEGER, INTENT(INOUT) :: PERM_RHS(SIZE_PERM)
638 INTEGER :: I, J, K,
639 & entry,
640 & node,
641 & SIZE_PERM_WORKING,
642 & NB_NON_EMPTY,
643 & to_be_found,
644 & posintmprhs,
645 & selected,
646 & local_selected,
647 & current_proc,
648 & NPROCS,
649 & n_pass,
650 & pass,
651 & nblocks,
652 & n_select_loc,
653 & IERR
654 INTEGER, ALLOCATABLE, DIMENSION(:) :: TMP_RHS,
655 & PTR_PROCS,
656 & LOAD_PROCS,
657 & IPTR_PERM_WORKING,
658 & PERM_WORKING,
659 & MYTYPENODE,
660 & PERM_PO
661 LOGICAL, ALLOCATABLE, DIMENSION(:) :: USED
662 LOGICAL :: allow_above_L0
663 INTEGER, EXTERNAL :: MUMPS_TYPENODE_ROUGH
664 nprocs = size_iptr_working - 1
665 ALLOCATE(tmp_rhs(size_perm),
666 & ptr_procs(nprocs),
667 & load_procs(nprocs),
668 & used(size_perm),
669 & iptr_perm_working(nprocs+1),
670 & mytypenode(nsteps),
671 & stat=ierr)
672 IF(ierr.GT.0) THEN
673 WRITE(*,*)'Allocation error in ZMUMPS_INTERLEAVE_RHS_AM1'
674 CALL mumps_abort()
675 END IF
676 DO i=1, nsteps
677 mytypenode(i) = mumps_typenode_rough( procnode(i), keep199 )
678 ENDDO
679 nb_non_empty = 0
680 DO i=1,size_perm
681 IF(irhs_ptr(i+1)-irhs_ptr(i).NE.0) THEN
682 nb_non_empty = nb_non_empty + 1
683 END IF
684 END DO
685 k = 0
686 iptr_perm_working(1)=1
687 DO i=1,nprocs
688 used = .false.
689 DO j=iptr_working(i),iptr_working(i+1)-1
690 used(working(j)) = .true.
691 END DO
692 DO j=1,n
693 IF (used(abs(step(perm_rhs(j)))).AND.
694 & ((irhs_ptr(perm_rhs(j)+1)-irhs_ptr(perm_rhs(j))).NE.0))
695 & THEN
696 k = k + 1
697 END IF
698 END DO
699 iptr_perm_working(i+1) = k+1
700 END DO
701 size_perm_working = k
702 ALLOCATE(perm_working(size_perm_working),
703 & stat=ierr)
704 IF(ierr.GT.0) THEN
705 WRITE(*,*)'Allocation error in ZMUMPS_INTERLEAVE_RHS_AM1'
706 CALL mumps_abort()
707 END IF
708 k = 0
709 DO i=1,nprocs
710 used = .false.
711 DO j=iptr_working(i),iptr_working(i+1)-1
712 used(working(j)) = .true.
713 END DO
714 DO j=1,n
715 IF (used(abs(step(perm_rhs(j)))).AND.
716 & ((irhs_ptr(perm_rhs(j)+1)-irhs_ptr(perm_rhs(j))).NE.0))
717 & THEN
718 k = k + 1
719 perm_working(k) = perm_rhs(j)
720 END IF
721 END DO
722 END DO
723 IF(behaviour_l0) THEN
724 n_pass = 2
725 allow_above_l0 = .false.
726 to_be_found = 0
727 DO i=1,size_perm
728 IF((mytypenode(abs(step(i))).LE.1).AND.
729 & (irhs_ptr(i+1)-irhs_ptr(i).NE.0))
730 & THEN
731 to_be_found = to_be_found + 1
732 END IF
733 END DO
734 ELSE
735 n_pass = 1
736 allow_above_l0 = .true.
737 to_be_found = nb_non_empty
738 END IF
739 ptr_procs(1:nprocs) = iptr_perm_working(1:nprocs)
740 load_procs = 0
741 used = .false.
742 current_proc = 1
743 n_select_loc = n_select
744 IF (n_select_loc.LE.0) THEN
745 n_select_loc = 1
746 ENDIF
747 posintmprhs = 0
748 DO pass=1,n_pass
749 selected = 0
750 DO WHILE(selected.LT.to_be_found)
751 local_selected = 0
752 DO WHILE(local_selected.LT.n_select_loc)
753 IF(ptr_procs(current_proc).EQ.
754 & iptr_perm_working(current_proc+1))
755 & THEN
756 EXIT
757 ELSE
758 entry = perm_working(ptr_procs(current_proc))
759 node = abs(step(entry))
760 IF(.NOT.used(entry)) THEN
761 IF(allow_above_l0.OR.(mytypenode(node).LE.1)) THEN
762 used(entry) = .true.
763 selected = selected + 1
764 local_selected = local_selected + 1
765 posintmprhs = posintmprhs + 1
766 tmp_rhs(posintmprhs) = entry
767 IF(selected.EQ.to_be_found) EXIT
768 END IF
769 END IF
770 ptr_procs(current_proc) = ptr_procs(current_proc) + 1
771 END IF
772 END DO
773 current_proc = mod(current_proc,nprocs)+1
774 END DO
775 to_be_found = nb_non_empty - to_be_found
776 allow_above_l0 = .true.
777 ptr_procs(1:nprocs) = iptr_perm_working(1:nprocs)
778 END DO
779 DO i=1,size_perm
780 IF(irhs_ptr(perm_rhs(i)+1)-irhs_ptr(perm_rhs(i)).EQ.0) THEN
781 posintmprhs = posintmprhs+1
782 tmp_rhs(posintmprhs) = perm_rhs(i)
783 IF(posintmprhs.EQ.size_perm) EXIT
784 END IF
785 END DO
786 IF(reorder) THEN
787 posintmprhs = 0
788 ALLOCATE(perm_po(n),stat=ierr)
789 IF(ierr.GT.0) THEN
790 WRITE(*,*)'Allocation error in INTERLEAVE_RHS_AM1'
791 CALL mumps_abort()
792 END IF
793 DO j=1,n
794 perm_po(sym_perm(j))=j
795 END DO
796 nblocks = n/nbrhs
797 DO i = 1, nblocks
798 used = .false.
799 DO j=1, nbrhs
800 used(tmp_rhs(nbrhs*(i-1)+j))=.true.
801 END DO
802 DO j=1,n
803 IF(used(perm_po(j))) THEN
804 posintmprhs = posintmprhs + 1
805 perm_rhs(posintmprhs) = perm_po(j)
806 END IF
807 END DO
808 END DO
809 IF(mod(n,nbrhs).NE.0) THEN
810 used = .false.
811 DO j=1, mod(n,nbrhs)
812 used(tmp_rhs(nbrhs*nblocks+j))=.true.
813 END DO
814 DO j=1,n
815 IF(used(perm_po(j))) THEN
816 posintmprhs = posintmprhs + 1
817 perm_rhs(posintmprhs) = perm_po(j)
818 END IF
819 END DO
820 END IF
821 DEALLOCATE(perm_po)
822 ELSE
823 perm_rhs = tmp_rhs
824 END IF
825 DEALLOCATE(tmp_rhs,
826 & ptr_procs,
827 & load_procs,
828 & used,
829 & iptr_perm_working,
830 & perm_working,
831 & mytypenode)
832 RETURN
#define mumps_abort
Definition VE_Metis.h:25
integer function mumps_typenode_rough(procinfo_inode, k199)

◆ zmumps_permute_rhs_am1()

subroutine zmumps_permute_rhs_am1 ( integer, intent(in) perm_strat,
integer, dimension(sizeperm), intent(in) sym_perm,
integer, dimension(nhrs), intent(in) irhs_ptr,
integer, intent(in) nhrs,
integer, dimension(sizeperm), intent(out) perm_rhs,
integer, intent(in) sizeperm,
integer, intent(out) ierr )

Definition at line 556 of file zmumps_sol_es.F.

561 IMPLICIT NONE
562 INTEGER, INTENT(IN) :: PERM_STRAT, NHRS, SIZEPERM
563 INTEGER, INTENT(IN) :: SYM_PERM(SIZEPERM)
564 INTEGER, INTENT(IN) :: IRHS_PTR(NHRS)
565 INTEGER, INTENT(OUT):: IERR
566 INTEGER, INTENT(OUT):: PERM_RHS(SIZEPERM)
567 DOUBLE PRECISION :: RAND_NUM
568 INTEGER I, J, STRAT
569 ierr = 0
570 strat = perm_strat
571 IF( (strat.NE.-3).AND.
572 & (strat.NE.-2).AND.
573 & (strat.NE.-1).AND.
574 & (strat.NE. 1).AND.
575 & (strat.NE. 2).AND.
576 & (strat.NE. 6) ) THEN
577 WRITE(*,*)"Warning: incorrect value for the RHS permutation; ",
578 & "defaulting to post-order"
579 strat = 1
580 END IF
581 IF (strat .EQ. -3) THEN
582 perm_rhs(1:sizeperm)=0
583 DO i=1, sizeperm
584 CALL random_number(rand_num)
585 rand_num = rand_num*dble(sizeperm)
586 j = ceiling(rand_num)
587 DO WHILE (perm_rhs(j).NE.0)
588 CALL random_number(rand_num)
589 rand_num = rand_num*dble(sizeperm)
590 j = ceiling(rand_num)
591 ENDDO
592 perm_rhs(j)=i
593 ENDDO
594 ELSEIF (strat .EQ. -2) THEN
595 DO i=1, sizeperm
596 perm_rhs(sizeperm -i +1) = i
597 ENDDO
598 ELSEIF (strat .EQ. -1) THEN
599 DO i=1, sizeperm
600 perm_rhs(i) = i
601 ENDDO
602 ELSEIF (strat .EQ. 1) THEN
603 DO i=1, sizeperm
604 perm_rhs(sym_perm(i)) = i
605 ENDDO
606 ELSEIF (strat .EQ. 2) THEN
607 DO i=1, sizeperm
608 perm_rhs(sizeperm-sym_perm(i)+1) = i
609 ENDDO
610 ENDIF

◆ zmumps_permute_rhs_gs()

subroutine zmumps_permute_rhs_gs ( integer, intent(in) lp,
logical, intent(in) lpok,
logical, intent(in) prokg,
integer, intent(in) mpg,
integer, intent(in) perm_strat,
integer, dimension(n), intent(in) sym_perm,
integer, intent(in) n,
integer, intent(in) nrhs,
integer, dimension(size_irhs_ptr), intent(in) irhs_ptr,
integer, intent(in) size_irhs_ptr,
integer, dimension(nzrhs), intent(in) irhs_sparse,
integer, intent(in) nzrhs,
integer, dimension(nrhs), intent(out) perm_rhs,
integer, intent(out) ierr )
private

Definition at line 465 of file zmumps_sol_es.F.

472 IMPLICIT NONE
473 INTEGER, INTENT(IN) :: LP, MPG, PERM_STRAT, N, NRHS,
474 & SIZE_IRHS_PTR,
475 & NZRHS
476 LOGICAL, INTENT(IN) :: LPOK, PROKG
477 INTEGER, INTENT(IN) :: SYM_PERM(N)
478 INTEGER, INTENT(IN) :: IRHS_PTR(SIZE_IRHS_PTR)
479 INTEGER, INTENT(IN) :: IRHS_SPARSE(NZRHS)
480 INTEGER, INTENT(OUT) :: PERM_RHS(NRHS)
481 INTEGER, INTENT(OUT) :: IERR
482 INTEGER :: I,J,K, POSINPERMRHS, JJ,
483 & KPOS
484 INTEGER, ALLOCATABLE :: ROW_REFINDEX(:)
485 ierr = 0
486 IF ((perm_strat.NE.-1).AND.(perm_strat.NE.1)) THEN
487 ierr=-1
488 IF (lpok)
489 & WRITE(lp,*) " INTERNAL ERROR -1 in ",
490 & " ZMUMPS_PERMUTE_RHS_GS, PERM_STRAT =", perm_strat,
491 & " is out of range "
492 RETURN
493 ENDIF
494 IF (perm_strat.EQ.-1) THEN
495 DO i=1,nrhs
496 perm_rhs(i) = i
497 END DO
498 GOTO 490
499 ENDIF
500 ALLOCATE(row_refindex(nrhs), stat=ierr)
501 IF (ierr.GT.0) THEN
502 ierr=-1
503 IF (lpok) THEN
504 WRITE(lp,*) " ERROR -2 : ",
505 & " ALLOCATE IN ZMUMPS_PERMUTE_RHS_GS OF SIZE :",
506 & nrhs
507 ENDIF
508 RETURN
509 ENDIF
510 DO i=1,nrhs
511 IF (irhs_ptr(i+1)-irhs_ptr(i).LE.0) THEN
512 ierr = 1
513 IF (i.EQ.1) THEN
514 row_refindex(i) = irhs_sparse(irhs_ptr(i))
515 ELSE
516 row_refindex(i) = row_refindex(i-1)
517 ENDIF
518 ELSE
519 row_refindex(i) = irhs_sparse(irhs_ptr(i))
520 ENDIF
521 END DO
522 posinpermrhs = 0
523 DO i=1,nrhs
524 kpos = n+1
525 jj = 0
526 DO j=1,nrhs
527 k = row_refindex(j)
528 IF (k.LE.0) cycle
529 IF (sym_perm(k).LT.kpos) THEN
530 kpos = sym_perm(k)
531 jj = j
532 ENDIF
533 END DO
534 IF (jj.EQ.0) THEN
535 ierr = -3
536 IF (lpok)
537 & WRITE(lp,*) " INTERNAL ERROR -3 in ",
538 & " ZMUMPS_PERMUTE_RHS_GS "
539 GOTO 500
540 ENDIF
541 posinpermrhs = posinpermrhs + 1
542 perm_rhs(posinpermrhs) = jj
543 row_refindex(jj) = -row_refindex(jj)
544 END DO
545 IF (posinpermrhs.NE.nrhs) THEN
546 IF (lpok)
547 & WRITE(lp,*) " INTERNAL ERROR -4 in ",
548 & " ZMUMPS_PERMUTE_RHS_GS ", maxval(row_refindex)
549 ierr = -4
550 GOTO 500
551 ENDIF
552 490 CONTINUE
553 500 CONTINUE
554 IF (allocated(row_refindex)) DEALLOCATE(row_refindex)