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

Go to the source code of this file.

Functions/Subroutines

subroutine smumps_root_solve (nrhs, desca_par, cntxt_par, local_m, local_n, mblock, nblock, ipiv, lpiv, master_root, myid, comm, rhs_seq, size_root, a, info, mtype, ldlt)
subroutine smumps_solve_2d_bcyclic (size_root, nrhs, mtype, a, desca_par, local_m, local_n, local_n_rhs, ipiv, lpiv, rhs_par, ldlt, mblock, nblock, cntxt_par, ierr)

Function/Subroutine Documentation

◆ smumps_root_solve()

subroutine smumps_root_solve ( integer nrhs,
integer, dimension( 9 ) desca_par,
integer cntxt_par,
integer local_m,
integer local_n,
integer mblock,
integer nblock,
integer, dimension( lpiv ) ipiv,
integer lpiv,
integer master_root,
integer myid,
integer comm,
real, dimension( size_root *nrhs) rhs_seq,
integer size_root,
real, dimension( local_m, local_n ) a,
integer, dimension(80) info,
integer mtype,
integer ldlt )

Definition at line 14 of file ssol_root_parallel.F.

18 IMPLICIT NONE
19 INTEGER NRHS, MTYPE
20 INTEGER DESCA_PAR( 9 )
21 INTEGER LOCAL_M, LOCAL_N, MBLOCK, NBLOCK
22 INTEGER CNTXT_PAR, MASTER_ROOT, SIZE_ROOT
23 INTEGER MYID, COMM
24 INTEGER LPIV, IPIV( LPIV )
25 INTEGER INFO(80), LDLT
26 REAL RHS_SEQ( SIZE_ROOT *NRHS)
27 REAL A( LOCAL_M, LOCAL_N )
28 INTEGER IERR, NPROW, NPCOL, MYROW, MYCOL
29 INTEGER LOCAL_N_RHS
30 REAL, ALLOCATABLE, DIMENSION( :,: ) ::RHS_PAR
31 EXTERNAL numroc
32 INTEGER numroc
33 INTEGER allocok
34 CALL blacs_gridinfo( cntxt_par, nprow, npcol, myrow, mycol )
35 local_n_rhs = numroc(nrhs, nblock, mycol, 0, npcol)
36 local_n_rhs = max(1,local_n_rhs)
37 ALLOCATE(rhs_par(local_m, local_n_rhs),stat=allocok)
38 IF (allocok > 0 ) THEN
39 WRITE(*,*) ' Problem during solve of the root.'
40 WRITE(*,*) ' Reduce number of right hand sides.'
41 CALL mumps_abort()
42 ENDIF
43 CALL smumps_scatter_root( myid, size_root, nrhs, rhs_seq,
44 & local_m, local_n_rhs,
45 & mblock, nblock, rhs_par, master_root,
46 & nprow, npcol, comm )
47 CALL smumps_solve_2d_bcyclic (size_root, nrhs, mtype,
48 & a, desca_par, local_m, local_n, local_n_rhs,
49 & ipiv, lpiv, rhs_par, ldlt,
50 & mblock, nblock, cntxt_par,
51 & ierr)
52 CALL smumps_gather_root( myid, size_root, nrhs,
53 & rhs_seq, local_m, local_n_rhs,
54 & mblock, nblock, rhs_par, master_root,
55 & nprow, npcol, comm )
56 DEALLOCATE(rhs_par)
57 RETURN
#define mumps_abort
Definition VE_Metis.h:25
#define max(a, b)
Definition macros.h:21
subroutine blacs_gridinfo(cntxt, nprow, npcol, myrow, mycol)
Definition mpi.f:754
integer function numroc(n, nb, iproc, isrcproc, nprocs)
Definition mpi.f:786
subroutine smumps_solve_2d_bcyclic(size_root, nrhs, mtype, a, desca_par, local_m, local_n, local_n_rhs, ipiv, lpiv, rhs_par, ldlt, mblock, nblock, cntxt_par, ierr)
subroutine smumps_gather_root(myid, m, n, aseq, local_m, local_n, mblock, nblock, apar, master_root, nprow, npcol, comm)
subroutine smumps_scatter_root(myid, m, n, aseq, local_m, local_n, mblock, nblock, apar, master_root, nprow, npcol, comm)

◆ smumps_solve_2d_bcyclic()

subroutine smumps_solve_2d_bcyclic ( integer, intent(in) size_root,
integer, intent(in) nrhs,
integer, intent(in) mtype,
real, dimension( local_m, local_n ), intent(in) a,
integer, dimension( 9 ), intent(in) desca_par,
integer, intent(in) local_m,
integer, intent(in) local_n,
integer, intent(in) local_n_rhs,
integer, dimension( lpiv ), intent(in) ipiv,
integer, intent(in) lpiv,
real, dimension(local_m, local_n_rhs), intent(inout) rhs_par,
integer, intent(in) ldlt,
integer, intent(in) mblock,
integer, intent(in) nblock,
integer, intent(in) cntxt_par,
integer, intent(out) ierr )

Definition at line 59 of file ssol_root_parallel.F.

64 IMPLICIT NONE
65 INTEGER, intent (in) :: SIZE_ROOT, NRHS, LDLT, LOCAL_M,
66 & LOCAL_N, LOCAL_N_RHS,
67 & MBLOCK, NBLOCK, CNTXT_PAR, MTYPE
68 INTEGER, intent (in) :: DESCA_PAR( 9 )
69 INTEGER, intent (in) :: LPIV, IPIV( LPIV )
70 REAL, intent (in) :: A( LOCAL_M, LOCAL_N )
71 REAL, intent (inout) :: RHS_PAR(LOCAL_M, LOCAL_N_RHS)
72 INTEGER, intent (out) :: IERR
73 INTEGER :: DESCB_PAR( 9 )
74 ierr = 0
75 CALL descinit( descb_par, size_root,
76 & nrhs, mblock, nblock, 0, 0,
77 & cntxt_par, local_m, ierr )
78 IF (ierr.NE.0) THEN
79 WRITE(*,*) 'After DESCINIT, IERR = ', ierr
80 CALL mumps_abort()
81 END IF
82 IF ( ldlt .eq. 0 .OR. ldlt .eq. 2 ) THEN
83 IF ( mtype .eq. 1 ) THEN
84 CALL psgetrs('N',size_root,nrhs,a,1,1,desca_par,ipiv,
85 & rhs_par,1,1,descb_par,ierr)
86 ELSE
87 CALL psgetrs('T',size_root,nrhs,a,1,1,desca_par,ipiv,
88 & rhs_par, 1, 1, descb_par,ierr)
89 END IF
90 ELSE
91 CALL pspotrs( 'L', size_root, nrhs, a, 1, 1, desca_par,
92 & rhs_par, 1, 1, descb_par, ierr )
93 END IF
94 IF ( ierr .LT. 0 ) THEN
95 WRITE(*,*) ' Problem during solve of the root'
96 CALL mumps_abort()
97 END IF
98 RETURN
subroutine pspotrs(uplo, n, nrhs, a, ia, ja, desca, b, ib, jb, descb, info)
Definition mpi.f:1208
subroutine psgetrs(trans, n, nrhs, a, ia, ja, desca, ipiv, b, ib, jb, descb, info)
Definition mpi.f:1159
subroutine descinit(desc, m, n, mb, nb, irsrc, icsrc, ictxt, lld, info)
Definition mpi.f:777