Installation PATH Pollution

Submit New Article

March 31, 2011 12:00 AM PDT


After installing the Intel® Composer XE package or the Intel® Parallel Studio XE package or the standalone Intel® IPP library you may find all sorts of new variables added to your system environment and/or appended to your existing environment variables, especially the system PATH environment variable. This is particularly troublesome if you installed both the 32-bit and the 64-bit versions of the tools on a 64-bit Windows development system.

What to do!?

The biggest problems, in this case, are modifications to the PATH environment variable. In particular, if you installed both the 32-bit and the 64-bit shared libraries (DLLs) that comprise the Intel IPP library, the Intel TBB library, the Intel MKL library and the Intel Compiler common library components you'll find both are now part of your PATH specification. In most cases you probably want to have just one architecture (32-bit or 64-bit) referenced in your default path.

Sometimes the PATH modifications result in such a long PATH variable definition that it causes strange behavior when you try to run the Intel® Parallel Studio XE "Command Prompt" scripts from the Windows start menu (or the Microsoft Visual Studio "Command Prompt" scripts). It isn't always obvious that you are having trouble with these, but you may experience incomplete system configuration after running these scripts.

Following is the net PATH that resulted from installing Intel® Composer XE update 2 on my system. From a DOS (cmd.exe) prompt I typed the command "path" and piped it through the old UNIX "tr" command to make it easier to read:

> path | tr ;= \n
PATH
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\tbb\vc10
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\ia32\tbb\vc10
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\ipp
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\ia32\ipp
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\mkl
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\ia32\mkl
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\compiler
C:\Program Files (x86)\Intel\ComposerXE-2011\redist\ia32\compiler
C:\Program Files (x86)\Intel\ComposerXE-2011\compiler\lib
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files\ThinkPad\Bluetooth Software\
C:\Program Files\ThinkPad\Bluetooth Software\syswow64
C:\Program Files\TortoiseSVN\bin
C:\Program Files\Intel\WiFi\bin\
C:\Program Files\Common Files\Intel\WirelessCommon\
C:\Program Files\Common Files\Microsoft Shared\Windows Live
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live
C:\Program Files (x86)\Windows Live\Shared
C:\Program Files\Intel\DMIX
C:\Program Files (x86)\QuickTime\QTSystem\
C:\Program Files (x86)\GnuWin32\bin
C:\Program Files (x86)\UnxUtils\bin
C:\Program Files (x86)\UnxUtils\usr\local\wbin
C:\PROGRA~2\strawberry\perl\bin
C:\Program Files (x86)\SysInternals
C:\Program Files (x86)\Windows Resource Kits\Tools\

You can get a Windows version of the UNIX "tr" utility by installing the "GnuWin32 CoreUtils" on your system.

It's easy to see what the installation added to my system PATH variable, all those extra directories at the beginning. If you're like me, you may have several editions of the libraries installed on your system (I work with the Intel® IPP library, so I'll use it as an example) and I really don't want my PATH setup this way. Instead, I prefer to specify these variable using one of the "Command Prompt" scripts that are installed by Composer XE and/or Microsoft Visual Studio and then amend my build environment using the supplied ippvars.bat file supplied in the %ipproot%\bin directory. (See the getting started guide for more info.)

These extra directories are included in the PATH environment to make it easier to locate the library DLL files at run time. So they are convenient if you are building an application that will use the standard distribution DLL files. You can still have some default directories placed in your PATH, but I recommend they be defined in your user's PATH, not the system PATH. This way, they'll be defined at the end of the PATH environment and any scripts you run will normally override the defaults by inserting additional definitions at the front of the PATH.

So, find the "System Properties" page on your system (there are multiple ways to get there, precise instructions vary as a function of the version of Windows you are using) and click the "Environment Variables.." button at the bottom of that dialog box, as shown below on a Windows 7 system:

From here, find the system PATH environment variable and remove all those extra directories that were inserted at the beginning of your PATH, which is the PATH environment variable definition located in the lower scroll box labeled "System variables":

Put the ones you want to keep, as part of your default build environment, in the PATH environment variable defined in the upper scroll box, labeled "User variables for <%USERNAME%>" – as shown above. And only insert the ones you want to use as your default, for example, only the 32-bit or only the 64-bit defintions, not both. Then, when you save the changes and open a new DOS prompt (cmd.exe) you'll see something more like the following:

> path | tr ;= \n
PATH
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files\ThinkPad\Bluetooth Software\
C:\Program Files\ThinkPad\Bluetooth Software\syswow64
C:\Program Files\TortoiseSVN\bin
C:\Program Files\Intel\WiFi\bin\
C:\Program Files\Common Files\Intel\WirelessCommon\
C:\Program Files\Common Files\Microsoft Shared\Windows Live
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live
C:\Program Files (x86)\Windows Live\Shared
C:\Program Files\Intel\DMIX
C:\Program Files (x86)\QuickTime\QTSystem\
C:\Program Files (x86)\GnuWin32\bin
C:\Program Files (x86)\UnxUtils\bin
C:\Program Files (x86)\UnxUtils\usr\local\wbin
C:\PROGRA~2\strawberry\perl\bin
C:\Program Files (x86)\SysInternals
C:\Program Files (x86)\Windows Resource Kits\Tools\
C:\Program Files (x86)\Intel\ComposerXE-2011\\redist\intel64\tbb\vc10
C:\Program Files (x86)\Intel\ComposerXE-2011\\redist\intel64\ipp
C:\Program Files (x86)\Intel\ComposerXE-2011\\redist\intel64\mkl
C:\Program Files (x86)\Intel\ComposerXE-2011\\redist\intel64\compiler
C:\Program Files (x86)\Intel\ComposerXE-2011\\redist\intel64\compiler\lib


You may not see the changes in all application until you logout and log back into Windows.



Do you need more help?


This article applies to: Intel® Integrated Performance Primitives Knowledge Base