- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to link my code to syev LAPACK 95 routine and cannot compile it can you help with I am missing?
The code with compile ok with ssyev but is more convenient to use f95 interfaces
Thanks,
ifort -O3 -mkl=sequential test.f90 test.x
...
real :: corr(5,5), eval(5)
...
CALL syev(corr,eval,'V')
PRINT *,eval
...
/tmp/ifortGvqotk.o: In function `MAIN__':
test.f90:(.text+0x411f): undefined reference to `syev_'
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have two mistakes.
1. You called the generic subroutine syev(), which takes optional arguments as well, without providing an interface. You can correct this by inserting the statement use lapack95 in the caller(s). See the section "Fortran 95 Interface Conventions for LAPACK Routines" in the MKL Reference (Fortran).
2. You should specify that the linker should use the Lapack95 library. To find the list of libraries to use, you may use the MKL Link Line Advisor, https://software.intel.com/sites/products/mkl/mkl_link_line_advisor.htm .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you may also take a look at the syev.f90 example and you will see all needed to build and run. you may find out this example into mklroot\examples\lapack95\source folder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, the code will compile with
mpiifort -O2 test.f90 -mkl=parallel -o test.x -lmkl_lapack95_lp64
or
ifort -O2 test.f90 -mkl=sequential -o test.x -lmkl_lapack95_lp64
and insert use lapack95 in the main block
Many thanks for helping!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page