Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

problem in compiling the mkl_lapack_examples/zgesvd_ex.c.htm

saeedian
Beginner
327 Views

Dear All

I want to run this example : http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_lapack_examples/zgesvd_ex.c.htm

to do this i installed "composer_xe_2013.3.163" 

and pathed it as :  "source $HOME/intel/composer_xe_2013.3.163/bin/compilervars.sh ia32" in .bashrc

then to compile the program, the command line in the terminal is : $ gcc zgesvd.c

but it cant realized the zgesvd as below :

$ gcc zgesvd.c

/tmp/ccJyWTh0.o: In function `main':
zgesvd.c:(.text+0xeb): undefined reference to `zgesvd'
zgesvd.c:(.text+0x1b1): undefined reference to `zgesvd'
collect2: error: ld returned 1 exit status 

how can i fix this problem? 

0 Kudos
4 Replies
mecej4
Honored Contributor III
327 Views

Sourcing the shell script for the Intel compiler is done in preparation for using the Intel compiler. To build an example using the Intel C compiler, the command is [bash]icc -mkl zgesvd.c[/bash].

If you really wish to build using gcc instead, you may need to use additional optional arguments or set up a suitable environment yourself.

0 Kudos
Chao_Y_Intel
Moderator
327 Views

Hi,

As suggest by mecej4, adding "-mkl" is easy way for icc.  If you are using the gcc, the following tools may provide some help on the libraries needed for the application:

http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/

Thanks,
Chao

0 Kudos
saeedian
Beginner
327 Views

Dear

as meseje4 suggested I tried to install C++Cpmposer to utilizing "icc" but some problem Arise in downloading its package.

i tried non-commersional version  http://software.intel.com/en-us/non-commercial-software-development 

after selecting the C++Composer it goes to the page https://registrationcenter.intel.com/RegCenter/NComForm.aspx?ProductID=1517

but the icon of the "accept" in this page is inactive

how can i download this package?

Thanks

0 Kudos
mecej4
Honored Contributor III
327 Views

You have to check each of the three boxes in the acceptance agreement. After you have done that, the ACCEPT button will become active.

0 Kudos
Reply