- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to write a simple matrix inversion routine in Ubuntu 64 bit. I modified one of the MKL example codes as follows:
program inversion
use mkl95_lapack, only: getrf, getri
implicit none
integer:: I, N
integer, dimension(:), allocatable:: IPIV
double precision, dimension(:,:), allocatable:: A, AA
N = 3
allocate( IPIV(N) )
allocate( A(N,N), AA(N,N) )
AA(1,1) = 1.0d0; AA(1,2) = 3.0d0; AA(1,3) = 1.0d0
AA(2,1) = 1.0d0; AA(2,2) = 1.0d0; AA(2,3) = 2.0d0
AA(3,1) = 2.0d0; AA(3,2) = 3.0d0; AA(3,3) = 4.0d0
A = AA
write(*,*) 'The Matrix A is:'
do I = 1,N
write(*,*) AA(I,:)
end do
write(*,*) 'The First Step is to Factorise A'
call getrf( A, IPIV )
write(*,*) 'The Inverted Matrix is:'
do I = 1,N
write(*,*) A(I,:)
end do
write(*,*) 'The Second Step is to Invert A'
call getri( A, IPIV )
write(*,*) 'The Inverted Matrix is:'
do I = 1,N
write(*,*) A(I,:)
end do
end program inversion
I keep getting an error message saying: error #6285: There is no matching specific subroutine for this generic subroutine call. [GETRI]
I am pretty new to using MKL templates for applications, and I was wondering if someone could throw some pointers as to what is happening. My link-line during compilation is as follows:
ifort inversion.f90 -I/opt/intel/mkl/include/intel64/ilp64 -L/opt/intel/mkl/lib/intel64/ -lmkl_lapack95_ilp64 -lmkl_blas95_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -o inversion.out
Any help or tips would be great for this newbie !! :)
I am trying to write a simple matrix inversion routine in Ubuntu 64 bit. I modified one of the MKL example codes as follows:
program inversion
use mkl95_lapack, only: getrf, getri
implicit none
integer:: I, N
integer, dimension(:), allocatable:: IPIV
double precision, dimension(:,:), allocatable:: A, AA
N = 3
allocate( IPIV(N) )
allocate( A(N,N), AA(N,N) )
AA(1,1) = 1.0d0; AA(1,2) = 3.0d0; AA(1,3) = 1.0d0
AA(2,1) = 1.0d0; AA(2,2) = 1.0d0; AA(2,3) = 2.0d0
AA(3,1) = 2.0d0; AA(3,2) = 3.0d0; AA(3,3) = 4.0d0
A = AA
write(*,*) 'The Matrix A is:'
do I = 1,N
write(*,*) AA(I,:)
end do
write(*,*) 'The First Step is to Factorise A'
call getrf( A, IPIV )
write(*,*) 'The Inverted Matrix is:'
do I = 1,N
write(*,*) A(I,:)
end do
write(*,*) 'The Second Step is to Invert A'
call getri( A, IPIV )
write(*,*) 'The Inverted Matrix is:'
do I = 1,N
write(*,*) A(I,:)
end do
end program inversion
I keep getting an error message saying: error #6285: There is no matching specific subroutine for this generic subroutine call. [GETRI]
I am pretty new to using MKL templates for applications, and I was wondering if someone could throw some pointers as to what is happening. My link-line during compilation is as follows:
ifort inversion.f90 -I/opt/intel/mkl/include/intel64/ilp64 -L/opt/intel/mkl/lib/intel64/ -lmkl_lapack95_ilp64 -lmkl_blas95_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -o inversion.out
Any help or tips would be great for this newbie !! :)
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I must add - the above program with the corresponding library linking worked perfectly fine in 32 bit environment Ubuntu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting Debanjan Mukherjee
I must add - the above program with the corresponding library linking worked perfectly fine in 32 bit environment Ubuntu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As Tim suggest, the LP64 libraries should be the choice. The following post may help to provide some clarification on the difference:
http://software.intel.com/en-us/forums/showthread.php?t=83366
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Many thanks. I used the LP64 libraries and it worked. In reponse to the message on using ILP64 - I was actually confused since I had initially written and run the code in Ubuntu 32 bit machine, and then had to include it in a job to be run in a 64 bit machine - hence I ended up wrongly linking ILP64.
Many thanks again
Many thanks. I used the LP64 libraries and it worked. In reponse to the message on using ILP64 - I was actually confused since I had initially written and run the code in Ubuntu 32 bit machine, and then had to include it in a job to be run in a 64 bit machine - hence I ended up wrongly linking ILP64.
Many thanks again
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page