The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

Lapack for Fortran with Intel Compiler and MKL

Open discussion regarding features, bugs, issues, vendors, etc.

Lapack for Fortran with Intel Compiler and MKL

Postby pideacon » Fri Dec 05, 2008 12:57 pm

Hi you all,
I'm totally new to the whole Linux and Lapack enviroment.
I'm using the free Intel Fortran Compiler 11.0 with the implented MKL-Library on my Ubuntu Linux system. I've written my code in Fortran 90 and now I want to you use one Lapack-routine ( ZGEEV) in my code. But honestly, I have no idea how to do that?

I've written the 'CALL ZGEEV(...)' line in my code, but what else do I have to do?
Is there a special command to call the lapack-library or do I have to write something else in my code?

Thank you for your help
Cheers
Christian
pideacon
 
Posts: 1
Joined: Fri Dec 05, 2008 12:51 pm

Re: Lapack for Fortran with Intel Compiler and MKL

Postby craiglucas » Fri Jan 09, 2009 12:21 pm

Hi Christian,
When you use a library you need to "link" your code with the library code. Essentially you have to tell the compiler that the function lies outside of your code and in the library. So compiling, then linking you code for LAPACK could look like:
Code: Select all
ifort -c mycode.f90
ifort mycode.o -o myexe -lmkl -lmkl_lapack

Here we have linked our "object code" with two libraries. One containing LAPACK and one containing the BLAS required by LAPACK. Although MKL may require you to link to other libraries as well.

It is probably a very good idea to refer to the MKL documentation. Craig
craiglucas
 
Posts: 4
Joined: Mon Feb 14, 2005 4:47 am
Location: University of Manchester, UK


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 7 guests