Setting environmental variables for MKL in Ubuntu

Setting environmental variables for MKL in Ubuntu

I am now studying to use Intel Fortran compiler in Linux. My operation system is Ubuntu 12.04.

I followed the install procedures in the documents. Now, the command "ifort" runs well. However, when I attempt to link the source file with MKL, errors can be found.

According to the documents, I've already added the following in the ~/.profile

./opt/intel/composer_xe_2013_sp1.1.106/mkl/bin/intel64/mklvars_intel64.sh intel64 mod lp64

After that, I tried to link the examples with MKL. For example, the source file "zgemvx.f" in the examples_core/blas/source. I used the following command

ifort zgemvx.f -mkl

However, it says "undefined reference to 'printvectorz_'"

So I think I still have not yet configured the MKL well.

What can I do now?

Thanks!

publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

You may not have set the command correctly in your .profile.  ". space" is synonymous with "source ".  If you use the . notation, the space is mandatory.

If you source the corresponding compilervars.sh intel64 script, it will take care of setting up the MKL if it is installed by the compiler install script.

Best Reply

The undefined reference is not to be found in the MKL libraries, but is contained (along with other service routines) in the file common_func.f, which is either in the .../mkl/examples/blas/source directory (if you have extracted the tar/zip file with the examples), or is contained in the zip/tgz file with all the MKL examples. Try

ifort -mkl zgemvx.f common_func.f

or use the provided makefile.

Inicie sesión para dejar un comentario.