-3

I'm trying to run a c++ file which requires an mkl library. I installed that library in a folder on home. But I'm getting following error. I searched that this error is due to incorrect path assign. How can I correct that path?

`/public/intel/bin/icpc -g -I/public/intel/mkl/include -c main.cc
make: /public/intel/bin/icpc: Command not found
[main.o] Error 127
makefile:6: recipe for target 'main.o' failed
make: *** [main.o] Error 127`
jerry
  • 385
  • 6
  • 18
  • 1
    You have to get the program compiled first, it can't find the compiler. Follow the Intel compiler installation instructions to get ahead. – Hans Passant Sep 12 '19 at 13:06
  • A c++ file isn't run (usually). It's compiled (and linked) to a binary. Afterwards you can run the binary if compiling (and linking) was successful. In your case, the compiling failed because the called compiler `/public/intel/bin/icpc` simply couldn't be found. Hence, `make` (the build tool) stopped building and reported error. – Scheff's Cat Sep 12 '19 at 13:27
  • 1
    The MKL library is not enough - you need to install Intel's toolchain. (`icpc` is Intel's C++ compiler.) – molbdnilo Sep 12 '19 at 13:29
  • You should read the error message. `make: /public/intel/bin/icpc: Command not found`. Does the file `/public/intel/bin/icpc` exist? – Thomas Sablik Sep 12 '19 at 14:11
  • I have corrected the path.previously it was assigning wrong path. Now I changed path in makefile but still getting the same error make: /home/tqc03/intel/bin/icpc: Command not found. Inside bin folder I have two files compilervars.csh and compilervars.sh – jerry Sep 12 '19 at 14:29
  • @jerry The problem is not in the makefile or the path but in your not having installed Intel’s compiler properly. – molbdnilo Sep 12 '19 at 18:52

1 Answers1

0

Jerry,

It looks like you are using Linux or UNIX. Also it looks like you are trying to use ICC (the Intel compiler) with MKL. If you are using ICC, the Linux compile command is "icc", the Windows compile command is "icl".

Beyond that, you need to source the ??vars.sh files if you have not set the environment variables manually. For example, if you installed Parallel Studio, you would set up compiler environment variables as explained here: https://software.intel.com/en-us/articles/setting-up-the-build-environment-for-using-intel-c-or-fortran-compilers; and you would set up MKL environment variables as explained here: https://software.intel.com/en-us/mkl-linux-developer-guide-scripts-to-set-environment-variables.

Let me know if this helps.

Pamela
  • 186
  • 2