7 include
'mkl_pardiso.f90'
23 logical,
save :: INITIALIZED = .false.
25 type(MKL_PARDISO_HANDLE) :: pt(64)
27 integer maxfct, mnum, mtype, nrhs, msglvl
29 data nrhs /1/, maxfct /1/, mnum /1/
31 integer,
save :: iparm(64)
37 type (sparse_matrix),
intent(inout) :: spmat
38 integer(kind=kint),
intent(in) :: phase_start
39 integer(kind=kint),
intent(out) :: istat
40 real(kind=
kreal),
pointer,
intent(inout) :: solx(:)
44 integer(kind=kint) :: myrank, phase
45 real(kind=
kreal) :: t2,t3,t4,t5
49 if (.not. initialized)
then
63 if (spmat%loglevel > 1) msglvl = 1
67 if ( phase_start == 1 )
then
69 call pardiso(pt, maxfct, mnum, mtype, phase, spmat%N, spmat%A, spmat%IRN, spmat%JCN, idum, &
70 nrhs, iparm, msglvl, spmat%RHS, solx, istat)
72 write(*,*)
'ERROR: MKL returned with error', istat
88 call pardiso(pt, maxfct, mnum, mtype, phase, spmat%N, spmat%A, spmat%IRN, spmat%JCN, idum, &
89 nrhs, iparm, msglvl, spmat%RHS, solx, istat)
91 write(*,*)
'ERROR: MKL returned with error', istat
96 if (myrank==0 .and. spmat%loglevel > 0) &
97 write(*,
'(A)')
' [Pardiso]: Analysis completed.'
98 if (myrank==0 .and. spmat%timelog > 0) &
99 write(*,
'(A,f10.3)')
' [Pardiso]: Analysis time(sec)=',t3-t2
103 if ( phase_start .le. 2 )
then
107 call pardiso(pt, maxfct, mnum, mtype, phase, spmat%N, spmat%A, spmat%IRN, spmat%JCN, idum, &
108 nrhs, iparm, msglvl, spmat%RHS, solx, istat)
110 write(*,*)
'ERROR: MKL returned with error', istat
115 if (myrank==0 .and. spmat%loglevel > 0) &
116 write(*,
'(A)')
' [Pardiso]: Factorization completed.'
117 if (myrank==0 .and. spmat%timelog > 0) &
118 write(*,
'(A,f10.3)')
' [Pardiso]: Factorization time(sec)=',t4-t3
124 call pardiso(pt, maxfct, mnum, mtype, phase, spmat%N, spmat%A, spmat%IRN, spmat%JCN, idum, &
125 nrhs, iparm, msglvl, spmat%RHS, solx, istat)
127 write(*,*)
'ERROR: MKL returned with error', istat
132 if (myrank==0 .and. spmat%loglevel > 0) &
133 write(*,
'(A)')
' [Pardiso]: Solution completed.'
134 if (myrank==0 .and. spmat%timelog > 0) &
135 write(*,
'(A,f10.3)')
' [Pardiso]: Solution time(sec)=',t5-t4
138 stop
"MKL Pardiso not available"
integer(kind=4), parameter kreal
integer(kind=kint) function hecmw_comm_get_rank()
real(kind=kreal) function hecmw_wtime()
This module provides linear equation solver interface for Pardiso.
subroutine, public hecmw_mkl_wrapper(spMAT, phase_start, solx, istat)
This module provides DOF based sparse matrix data structure (CSR and COO)
integer(kind=kint), parameter, public sparse_matrix_symtype_sym
integer(kind=kint), parameter, public sparse_matrix_symtype_spd