Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

Intel on Linux...what directory?

lkeene
Beginner
499 Views
Hello all, complete Linux novice here.

By some bumbling miracle I've managed to install the Intel Compiler Suite Pro on our Linux box (Red Hat Enterprise). Since I know next to nothing about Linux I consider this a major victory! Anyway, I installed to the default directory...whatever that is, but I'm perusing the file system and I don't see anywhere the compiler was installed to. I see the directory I created that the download was unpacked into, but I'd like to know the location of the actual installation. Anyone? Thanks in advance.

-L
0 Kudos
1 Solution
TimP
Honored Contributor III
499 Views
If it's the default dir, it's under /opt/intel/.

To use, you need to run the script iccvarsXX.sh like:
$ . iccvarsXX.sh

Then you can use "icc" to compile .c code, "icpc" for .cpp code.

recent versions of the path setup script run like
source /opt/intel/Compiler/11.1/059/iccvars.sh intel64 (bash)
source /opt/intel/Compiler/11.1/059/iccvars.csh intel64 (tcsh)
ia32 instead of intel64 for 32-bit compiler
iccvars and ifortvars have the same effect, when both are present.

View solution in original post

0 Kudos
8 Replies
JenniferJ
Moderator
499 Views
If it's the default dir, it's under /opt/intel/.

To use, you need to run the script iccvarsXX.sh like:
$ . iccvarsXX.sh

Then you can use "icc" to compile .c code, "icpc" for .cpp code.

Jennifer
0 Kudos
TimP
Honored Contributor III
500 Views
If it's the default dir, it's under /opt/intel/.

To use, you need to run the script iccvarsXX.sh like:
$ . iccvarsXX.sh

Then you can use "icc" to compile .c code, "icpc" for .cpp code.

recent versions of the path setup script run like
source /opt/intel/Compiler/11.1/059/iccvars.sh intel64 (bash)
source /opt/intel/Compiler/11.1/059/iccvars.csh intel64 (tcsh)
ia32 instead of intel64 for 32-bit compiler
iccvars and ifortvars have the same effect, when both are present.
0 Kudos
lkeene
Beginner
499 Views
Quoting - tim18
recent versions of the path setup script run like
source /opt/intel/Compiler/11.1/059/iccvars.sh intel64 (bash)
source /opt/intel/Compiler/11.1/059/iccvars.csh intel64 (tcsh)
ia32 instead of intel64 for 32-bit compiler
iccvars and ifortvars have the same effect, when both are present.

Thank you both for the good answers. Running this script does what...set up the environment or something?

Note to anyone else reading:
I believe the correct path (at least on my machine) is "source /opt/Intel/Compiler/11.1/059/bin/iccvars.sh"
0 Kudos
lkeene
Beginner
499 Views
Quoting - lkeene

Thank you both for the good answers. Running this script does what...set up the environment or something?

Note to anyone else reading:
I believe the correct path (at least on my machine) is "source /opt/Intel/Compiler/11.1/059/bin/iccvars.sh"

Okay, I just ran the script. I didn't receive any feedback or anything, the command prompt just incremented to the next line so I assume it executed correctly.

I then created a folder on my desktop called "SourceCode", launched the built-in text editor and created the following text file:

#include

int Main()
{
cout << "Hello world.";
return 0;
}

I launch the Terminal window, navigate to the SourceCode directory and type: "icc Main.c". I get the following compilation error:
"catastrophic error: could not open source file "iostream.h"

Did the script not set up the environment?

-L




0 Kudos
TimP
Honored Contributor III
499 Views
When you invoke icc on a .c file, you restrict the compiler to C.
Make it a .cpp file and use icpc.
0 Kudos
lkeene
Beginner
499 Views
Quoting - tim18
When you invoke icc on a .c file, you restrict the compiler to C.
Make it a .cpp file and use icpc.


Hah! Of course. Thank you.

Does anyone know of any knowledge base articles, or threads, etc that they can point me to to help me setup the environment for the IPP libraries? I need to point the Linker to several libs such as:

"d:RSIIDL63binbin.x86idl.lib ippsemerged.lib ippsmerged.lib ippsremerged.lib ippsrmerged.lib ippmemerged.lib ippmmerged.lib ippcorel.lib libguide.lib"

I'ts easy enough to do this in Visual Studio, but I'm unfamiliar with how to do it via the command line in Linux. I've been searching the docs but I haven't found anything yet.

-L
0 Kudos
TimP
Honored Contributor III
499 Views
When you install the IPP option which comes with the current compiler, the iccvars should include setting up for IPP. The specific required libraries may have changed; in particular, libiomp5 (which supports also gnu OpenMP compilations, or, on Windows, MSVC openmp) is preferred over libguide. If you set -openmp or -parallel as an icpc option in the link step, the OpenMP library and its dependencies are linked automatically. There may be an ippvars script in the ipp installation. Also, you may find useful information or advice on the IPP forum.
0 Kudos
lkeene
Beginner
499 Views
Quoting - lkeene


Hah! Of course. Thank you.

Does anyone know of any knowledge base articles, or threads, etc that they can point me to to help me setup the environment for the IPP libraries? I need to point the Linker to several libs such as:

"d:RSIIDL63binbin.x86idl.lib ippsemerged.lib ippsmerged.lib ippsremerged.lib ippsrmerged.lib ippmemerged.lib ippmmerged.lib ippcorel.lib libguide.lib"

I'ts easy enough to do this in Visual Studio, but I'm unfamiliar with how to do it via the command line in Linux. I've been searching the docs but I haven't found anything yet.

-L

Ignore this request please. I just found a bunch of info in the docs. Thank you.

-L
0 Kudos
Reply