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

Can't build Fortran MKL Blas

nimitzhunter
Beginner
661 Views

I followed the MKL document section 7-2 to create the Blas lib for fortran interface. However, I ran into this problem:

mkdir -p obj
make -f makefile objects
make[1]: Entering directory `/opt/intel/Compiler/11.0/074/mkl/interfaces/blas95'
ifort -module ../../lib/32 -c -o obj/mkl_blas_protos.o source/mkl_blas_protos.f90
make[1]: ifort: Command not found
make[1]: *** [obj/mkl_blas_protos.o] Error 127
make[1]: Leaving directory `/opt/intel/Compiler/11.0/074/mkl/interfaces/blas95'
make: *** [libmkl_blas95.a] Error 2

why is that? any one has any idea? I can use ifort to compile my fortran code, but not in this situation. so weird.

0 Kudos
4 Replies
Vladimir_Koldakov__I
New Contributor III
661 Views
Quoting - nimitzhunter
make[1]: ifort: Command not found


Hello, nimitzhunter,

Please, set Intel Fortran Compiler(ifort) environement before building library.

To do this run ifortvars.sh script - find it in the bin directory (or ifortvars.csh).

Thanks,

Vladimir

0 Kudos
nimitzhunter
Beginner
661 Views


Hello, nimitzhunter,

Please, set Intel Fortran Compiler(ifort) environement before building library.

To do this run ifortvars.sh script - find it in the bin directory (or ifortvars.csh).

Thanks,

Vladimir

Hi Vladimir.

what do you mean by running ifortvars.sh? I'm using ubuntu, how do I do it in terminal? Btw, i don't know how that will help becuase I can use the ifort command to compile my code but not in this case.

0 Kudos
Vladimir_Koldakov__I
New Contributor III
661 Views
Quoting - nimitzhunter
what do you mean by running ifortvars.sh? I'm using ubuntu, how do I do it in terminal? Btw, i don't know how that will help becuase I can use the ifort command to compile my code but not in this case.

Hi nimitzhunter,

To check command, run "which ifort" in terminal window. If you see the full path to ifort you can use it.

To run ifortvars script, find it in the Compiler directory. Then run in terminal window something like:

. /opt/intel/Compiler/11.0/074/bin/ia32/ifortvars.sh

If you use cshell, run ifortvars.csh instead.

Thanks,

Vladimir

0 Kudos
TimP
Honored Contributor III
661 Views

. /opt/intel/Compiler/11.0/074/bin/ia32/ifortvars.sh

If you use cshell, run ifortvars.csh instead.

"." is an abbreviation for "source" which works in bash, but not in tcsh.

0 Kudos
Reply