I was following installation guide up to environmental variable step: https://software.intel.com/en-us/mkl-windows-developer-guide-setting-environment-variables.
in the command shell. The script got executed fine and when I checked PATH variable in the command shell, I could see the added path. But if I check System properties -> environment variables, the Path variable remained unchanged. Also, when I restarted the command shell Path variable was the same as before running the script.
Also if I try to run a sample code in VS2017, the line
gets underscored with a message "cannot open source file mkl.h"
Installation of mkl went without errors and all files that are mentioned in https://software.intel.com/en-us/mkl-windows-developer-guide-checking-your-installation are on their place.
If I understand correctly, this error is due to the absence of mkl.h in the path.
Am I missing something? How can I correct it?
This bat script will set the MKL environments into the local working session. If you manually add these environments to the system properties -> environment variables then you will resolve this issues.
In the case of Visual Studio – please refer to this article to set MKL environments in VS.
For others who run into this problem, the solution is to source the script rather than execute it.
source /opt/intel/bin/compilervars.sh <arch>
Executing a shell script executes it in a new shell process. The environment settings are lost when that process terminates. Sourcing it executes it in the current process.