- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I write a code to call PARDISO in IVF10, and obtain correct results. But when I use the same code in IVF11.1.038, the obtained results is wrong.Is there anyone know how to do with it? My code is:
include 'mkl_pardiso.f90'
program MLQG
use MKL_PARDISO
!!The variable type definitionsare omitted
do i = 1, 64
iparm(i) = 0
end do
iparm(2) = 2 ! fill-in reordering from METIS
iparm(3) = 2 ! numbers of processors
iparm(4) = 0 ! no iterative-direct algorithm
iparm(5) = 0 ! no user fill-in reducing permutation
iparm(6) = 0 ! =0 solution on the first n compoments of x
iparm(7) = 0 ! not in use
iparm(8) = 9 ! numbers of iterative refinement steps
iparm(9) = 0 ! not in use
iparm(10) = 13 ! perturbe the pivot elements with 1E-13
iparm(11) = 1 ! use nonsymmetric permutation and scaling MPS
iparm(12) = 0 ! not in use
iparm(13) = 0 ! not in use
iparm(14) = 0 ! Output: number of perturbed pivots
iparm(15) = 0 ! not in use
iparm(16) = 0 ! not in use
iparm(17) = 0 ! not in use
iparm(18) = -1 ! Output: number of nonzeros in the factor LU
iparm(19) = -1 ! Output: Mflops for LU factorization
iparm(20) = 0 ! Output: Numbers of CG Iterations
iparm(25) = 1 !Parallel Forward/Backward Solve.
iparm(28)=1 !Parallel Reordering for METIS
error = 0 ! initialize error flag
msglvl = 0 ! print statistical information
mtype = 11 ! real unsymmetric
do k=1,3
!Initiliaze the internal solver memory pointer. This is only
! necessary for the FIRST call of the PARDISO solver.
pt(:)=mkl_pardiso_handle(0)
phase = 13 ! only reordering ,factorization and solving
call pardiso (pt, maxfct, mnum, mtype, phase, neq, a(:,k), ia(:,k), ja(:,k),&
idum, nrhs, iparm, msglvl, b(:,k), x(:,k), error)
phase = -1 ! release internal memory
call pardiso (pt, maxfct, mnum, mtype, phase, neq, a(:,k), ia(:,k), ja(:,k),&
idum, nrhs, iparm, msglvl, b(:,k), x(:,k), error)
enddo
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What MKL version you used when used IVF10?
What's your linking line?
Is this ia32/Intel64 or IA64 architecture?
Can you get us the reproducible test case for checking the problem?
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What MKL version you used when used IVF10?
What's your linking line?
Is this ia32/Intel64 or IA64 architecture?
Can you get us the reproducible test case for checking the problem?
--Gennady
Gennady
Fistly, lots of thanks for your reply. Iuse IVF11(ia32) in microsoft visual studio 2008 now and IVF10(ia32) in microsoft 2005 before.The MKL usedin IVF 10 is version 10.0.011 (before). But I don't know where to find the MKL version in IVF11.1.038 because MKL has been automatically installed when I installed compiler. Can you tell mehow to find the MKL version?
Theoptions set in Link/input/additional dependenciesare "mkl_intel_c.lib mkl_intel_thread.lib mkl_solver.lib mkl_core.lib libguide.lib". For the same code, it is strange that the link procedurein IVF 11 takes much more time than that in IVF 10. The linking information is (onlypresenting the warning lines because the information is too long)
(Note. Becausemy visual studio is chinese version, following link informationis translated into English by myself):
1>module mkl_intel_c.lib(_dgemv.obj)" is unsafe for image SAFESEH
1>module "mkl_intel_c.lib(_pardiso.obj)" is unsafe for image SAFESEH
1>module mkl_intel_c.lib(_misc_mkl_lsame_f.obj) is unsafe for image SAFESEH
1>module "mkl_core.lib(intel_f2int.obj)" is unsafe for image SAFESEH
1>module "mkl_core.lib(_p4m3_dswap.obj)" is unsafe for image SAFESEH
1>module "mkl_core.lib(_p4_dswap.obj)"is unsafe for image SAFESEH
1>module "mkl_core.lib(_p4m3_dswap.obj)" is unsafe for image SAFESEH
1>module "mkl_core.lib(_p4m3_zswap.obj)" is unsafe for image SAFESEH
1>module "mkl_core.lib(_p4m_zswap.obj)" is unsafe for image SAFESEH
1>module "mkl_core.lib(_p4p_zswap.obj)" is unsafe for image SAFESEH
1>module "mkl_core.lib(_p4_zswap.obj)" is unsafe for image SAFESEH
1>module "mkl_core.lib(_p4m3_dscal.obj)" is unsafe for image SAFESEH
1>module "mkl_core.lib(_p4m_dscal.obj)" is unsafe for image SAFESEH
1>module "mkl_core.lib(_p4p_dscal.obj)" is unsafe for image SAFESEH
:
: many 'module "mkl_core.lib(*.obj)" is unsafe for image SAFESEH
:
I also run a simple test case for Pardiso in IVF11, although it also take too long time to link, but this simple case can give correct result. Compared with the simple case, code presented in above quesetionmanually set morecontrol parameters (Iparm). Is any parameters set to be wrong values for the Pardiso in this version of MKL? Or, any errors in link setting? Following is the simple test case:
include 'mkl_pardiso.f90'
program pardiso_test
use MKL_PARDISO
real(8),allocatable::a(:),b(:),x(:)
integer::maxfct=1,mnum=1,mtype=11,phase=13,n,nrhs=1,iparm(64),msglvl=0,error
type(mkl_pardiso_handle) :: pt(64)
integer,allocatable::ia(:),ja(:),perm(:)
!!! this matrix is cited by slatec document...
! |11 12 0 0 15| A: 11 12 15 | 21 22 | 33 35 | 44 | 51 53 55
! |21 22 0 0 0| IA: 1 | 4 | 6 | 8 | 9 | 11
! | 0 0 33 0 35| JA: 1 2 5 | 1 2 | 3 5 | 4 | 1 3 5
! | 0 0 0 44 0|
! |51 0 53 0 55|
!!! set parameter of pardiso
pt(:)=mkl_pardiso_handle(0)
iparm(1)=0
!!! assign values to variables
n=5
nzero=10
allocate(a(nzero),b(n),x(n),ia(n+1),ja(nzero),perm(n))
ia(:)=(/1,4,6,8,9,11/)
a(:)=(/11.d0,12.d0,15.d0,21.d0,22.d0,33.d0,35.d0,44.d0,51.d0,53.d0,55.d0/)
ja(:)=(/1,2,5,1,2,3,5,4,1,3,5/)
!!! calculate b when x=(/1.d0,2.d0,3.d0,4.d0,5.d0/)
b(:)=0.d0
do i=1,5
do j=ia(i),ia(i+1)-1
b(i)=b(i)+a(j)*ja(j)
end do
end do
!!! solve linear equation by pardiso
call pardiso(pt,maxfct,mnum,mtype,phase,n,a,ia,ja,perm,nrhs,iparm,msglvl,b,x,error)
if(error /= 0) then
write(*,*) error
stop
end if
write(*,*) x
pause
end program pardiso_test
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page