- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I just started using Fortran and Linux a week ago, so I'm still in the progress of learning.
I'm using the Intel Fortran Compiler v11 to compile some Fortran code on quantum mechanics. I'm down to a problem where i need to solve a symmetrical n*n matrix, and someone told me to just use the "ssyev" command. This has, however, proved to be more diffifcult than I imagined!
Apparantly the "ssyev" command is from this mathpack, LAPACK, included in MKL, and to use it i got something like this:
program gaulag
(lots of stuff here)
call eigen(Ham, eig ,jobz ,U ,info)
(more stuff)
contains
(some functions and subroutines)
subroutine eigen(Ham, eig ,jobz ,U ,info)
USE mkl95_PRECISION
USE mkl95_LAPACK
implicit none
character :: N,U, jobz
integer :: nt
real :: info
real, dimension(:,:), allocatable :: Ham
real, dimension(:), allocatable :: eig
allocate(Ham(0:nt,0:nt))
allocate(eig(0:nt))
call ssyev(Ham,eig,N,U,info)
end subroutine eigen
end program laulag
But !!
It seems I need to compile some files, something to do with LEPACK and BLAS? And further more, I can no longer just comepile using:
ifort myprogram.f90
?
I would really appreciate some help, I'm totally at a loss as to what I need to do, to get this working.
Im using the 32bit Intel Fortran Conpiler, on Ubuntu 8.10.
-Happyjazz
I just started using Fortran and Linux a week ago, so I'm still in the progress of learning.
I'm using the Intel Fortran Compiler v11 to compile some Fortran code on quantum mechanics. I'm down to a problem where i need to solve a symmetrical n*n matrix, and someone told me to just use the "ssyev" command. This has, however, proved to be more diffifcult than I imagined!
Apparantly the "ssyev" command is from this mathpack, LAPACK, included in MKL, and to use it i got something like this:
program gaulag
(lots of stuff here)
call eigen(Ham, eig ,jobz ,U ,info)
(more stuff)
contains
(some functions and subroutines)
subroutine eigen(Ham, eig ,jobz ,U ,info)
USE mkl95_PRECISION
USE mkl95_LAPACK
implicit none
character :: N,U, jobz
integer :: nt
real :: info
real, dimension(:,:), allocatable :: Ham
real, dimension(:), allocatable :: eig
allocate(Ham(0:nt,0:nt))
allocate(eig(0:nt))
call ssyev(Ham,eig,N,U,info)
end subroutine eigen
end program laulag
But !!
It seems I need to compile some files, something to do with LEPACK and BLAS? And further more, I can no longer just comepile using:
ifort myprogram.f90
?
I would really appreciate some help, I'm totally at a loss as to what I need to do, to get this working.
Im using the 32bit Intel Fortran Conpiler, on Ubuntu 8.10.
-Happyjazz
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
LAPACK linking never gets any simpler than
ifort myprogram.f90 -lmkl_lapack
which might work in your situation. That's what the examples are for.
ifort myprogram.f90 -lmkl_lapack
which might work in your situation. That's what the examples are for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With Intel Fortran Compiler v11 you have to use the following linking dependencies:
libmkl_intel.so libmkl_intel_thread.so libmkl_core.so libiomp5.so
--Gennady
libmkl_intel.so libmkl_intel_thread.so libmkl_core.so libiomp5.so
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Gennady Fedorov (Intel)
With Intel Fortran Compiler v11 you have to use the following linking dependencies:
libmkl_intel.so libmkl_intel_thread.so libmkl_core.so libiomp5.so
--Gennady
libmkl_intel.so libmkl_intel_thread.so libmkl_core.so libiomp5.so
--Gennady
ifort -openmp myprogram.f90 -lmkl_intel -lmkl_core -lmkl_thread
would be equivalent to Gennady's recommendation. mkl_lapack, if you cat it, is a script invoking those 3 libraries, and -openmp adds libiomp5 and libpthread.
If you aren't looking for threading.
ifort myprogram.f90 -lmkl_intel -lmkl_core -lmkl_sequential
would do.
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