Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29361 Discussions

c++ Intel compiler - eclipse integration

noona
Beginner
1,192 Views
During the installation process I am notified that JRE is missing (though it is optional I do need it), I installed it and tried to complete the installation but the intel compiler installer wasn't able to detect it, the Intel compiler install folder is located in the home folder, I installed the JRE there, I am not familiar with folders hierarchy in linux, could someone please guide me through this while having in mind that I will not know what to do if they say something like "you need to set the correct path, or you need to install it in root". I tried reading the manuals about integrating it with an existing installation of eclipse, but they're either obsolute or targeted at someone with previous above basic knowledge in Linux.

thanks
0 Kudos
7 Replies
Hubert_H_Intel
Employee
1,192 Views
Quoting - noona
During the installation process I am notified that JRE is missing (though it is optional I do need it), I installed it and tried to complete the installation but the intel compiler installer wasn't able to detect it, the Intel compiler install folder is located in the home folder, I installed the JRE there, I am not familiar with folders hierarchy in linux, could someone please guide me through this while having in mind that I will not know what to do if they say something like "you need to set the correct path, or you need to install it in root". I tried reading the manuals about integrating it with an existing installation of eclipse, but they're either obsolute or targeted at someone with previous above basic knowledge in Linux.

thanks

The Java Runtime Environment (JRE) is required only for using the graphical Intel IDB Debugger. Currently there is an issue with the installer; although there may be a valid JRE on the system, the installer may issuea waring.
You can safely ignore this warning as long as you havea right JRE (1.5/5.0 or later) on your system, e.g.:
$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu11)
OpenJDK Client VM (build 14.0-b08, mixed mode, sharing)
$

Unfortunately most Linux distros contain an olderJRE, e.g. version1.4.
So, if you don't find a JRE 1.5(also referred to as 5.0) or later, you can download it fromwww.java.com. Take care to download the right platform version (32- or 64-bit!).
For system wide usage, you should install the JRE as root under, e.g., /opt. But you can install it on your home dir for own usage also. Before invocation of the debugger idb, you need to include the JRE bin path to PATH, e.g.:
$ export PATH=/opt/jre1.6.0_14/bin:$PATH
Regards,
Hubert.

0 Kudos
noona
Beginner
1,192 Views

The Java Runtime Environment (JRE) is required only for using the graphical Intel IDB Debugger. Currently there is an issue with the installer; although there may be a valid JRE on the system, the installer may issuea waring.
You can safely ignore this warning as long as you havea right JRE (1.5/5.0 or later) on your system, e.g.:
$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu11)
OpenJDK Client VM (build 14.0-b08, mixed mode, sharing)
$

Unfortunately most Linux distros contain an olderJRE, e.g. version1.4.
So, if you don't find a JRE 1.5(also referred to as 5.0) or later, you can download it fromwww.java.com. Take care to download the right platform version (32- or 64-bit!).
For system wide usage, you should install the JRE as root under, e.g., /opt. But you can install it on your home dir for own usage also. Before invocation of the debugger idb, you need to include the JRE bin path to PATH, e.g.:
$ export PATH=/opt/jre1.6.0_14/bin:$PATH
Regards,
Hubert.


Ok I have installed JRE 1.6 in the OPT folder, and installed the C++ Intel compiler as well, i sat the environment variables using the file iccvars.h located in /opt/intel/Compiler/11.1/059/bin/ and iccvars_ia32 located in /opt/intel/Compiler/11.1/059/bin/ia32 from the command line, but the commands icc and icpc were not recognized in the shell.
Another question, I noticed the eclipse support files were there too, how do I integrate them into eclipse so that i can use Intel IDB Debugger?
(I am using Ubuntu 9.04.)
thanks
0 Kudos
Hubert_H_Intel
Employee
1,192 Views
Quoting - noona

Ok I have installed JRE 1.6 in the OPT folder, and installed the C++ Intel compiler as well, i sat the environment variables using the file iccvars.h located in /opt/intel/Compiler/11.1/059/bin/ and iccvars_ia32 located in /opt/intel/Compiler/11.1/059/bin/ia32 from the command line, but the commands icc and icpc were not recognized in the shell.
Another question, I noticed the eclipse support files were there too, how do I integrate them into eclipse so that i can use Intel IDB Debugger?
(I am using Ubuntu 9.04.)
thanks
The only thing to do is to source the compiler script which set ALL environment variables for Compiler, Debugger and Libraries. Only in case you want to use the graphical Intel IDB Debugger you need toadditionally exportthe Java bin dir to PATH.
So after installation,run the sourcing script as follows, e.g. (32-bit):
$ source /opt/intel/Compiler/11.1/059/bin/iccvars.sh ia32
$ export PATH=/opt/jre1.6.0_14/bin:$PATH
$ java -version
java version "1.6.0_14"
Java SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot Client VM (build 14.0-b16, mixed mode, sharing)
$ which icc
/opt/intel/Compiler/11.1/059/bin/ia32/icc
$ which idb
/opt/intel/Compiler/11.1/059/bin/ia32/idb
$

Integration into Eclipse is just an option and not required to operate the Compiler and Debugger. The Compiler is usually used on command line. The Debugger is running as command line version idbc or the graphical version idb (using JRE). I strongly recommend to not integrate the IDB Debugger to Eclipse since the graphical Debugger idb is already a Eclipse-Framework based solution.
Does this help?
Hubert.
0 Kudos
TimP
Honored Contributor III
1,192 Views
Quoting - noona
i sat the environment variables using the file iccvars.h located in /opt/intel/Compiler/11.1/059/bin/ and iccvars_ia32 located in /opt/intel/Compiler/11.1/059/bin/ia32 from the command line, but the commands icc and icpc were not recognized in the shell.
Another question, I noticed the eclipse support files were there too, how do I integrate them into eclipse so that i can use Intel IDB Debugger?

The iccvars or ifortvars files have to be sourced to set the paths, e.g.
source /opt/intel/Compiler/11.1/059/bin/iccvars.sh ia32
(.sh or .csh according to your choice of shell)
The debugger has 2 names:
idb starts up the JRE GUI version
idbc the command line version
I don't believe you have a choice to run the idb JRE with eclipse, but I'm no eclipse expert.
Anyway, Hubert gave you the explanation while I was posting.
0 Kudos
noona
Beginner
1,192 Views
The only thing to do is to source the compiler script which set ALL environment variables for Compiler, Debugger and Libraries. Only in case you want to use the graphical Intel IDB Debugger you need toadditionally exportthe Java bin dir to PATH.
So after installation,run the sourcing script as follows, e.g. (32-bit):
$ source /opt/intel/Compiler/11.1/059/bin/iccvars.sh ia32
$ export PATH=/opt/jre1.6.0_14/bin:$PATH
$ java -version
java version "1.6.0_14"
Java SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot Client VM (build 14.0-b16, mixed mode, sharing)
$ which icc
/opt/intel/Compiler/11.1/059/bin/ia32/icc
$ which idb
/opt/intel/Compiler/11.1/059/bin/ia32/idb
$

Integration into Eclipse is just an option and not required to operate the Compiler and Debugger. The Compiler is usually used on command line. The Debugger is running as command line version idbc or the graphical version idb (using JRE). I strongly recommend to not integrate the IDB Debugger to Eclipse since the graphical Debugger idb is already a Eclipse-Framework based solution.
Does this help?
Hubert.

Yes that helped, thanks, how do I permanently set the environment variables so that I don't have to set them at evey terminal session? the reason I want to integrate the compiler into eclipse is because I want to use it through an IDE, does IDB debugger provide an IDE?
There's still an unresolved issue, there's appears to be a missing component in the idb gui folder, I get the following error upon trying to run IDB:

root@noona-laptop:/home/noona# source /opt/intel/Compiler/11.1/059/bin/iccvars.sh ia32
root@noona-laptop:/home/noona# export PATH=/opt/jre1.6.0_16/bin:$PATH
root@noona-laptop:/home/noona# java -version
java version "1.6.0_16"
Java SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot Client VM (build 14.2-b01, mixed mode, sharing)
root@noona-laptop:/home/noona# which idb
/opt/intel/Compiler/11.1/059/bin/ia32/idb
root@noona-laptop:/home/noona# idb
java.lang.UnsatisfiedLinkError: /opt/intel/Compiler/11.1/059/idb/gui/ia32/libOsgJni.so: libstdc++.so.5: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.intel.debugger.ui.jni.NativeCallsProxy.(Unknown Source)
at com.intel.debugger.ui.windows.WindowManager.(Unknown Source)
at com.intel.debugger.ui.windows.WindowManager.(Unknown Source)
at com.intel.debugger.ui.windows.WindowManager$SingletonHolder.initInstance(Unknown Source)
at com.intel.debugger.ui.windows.WindowManager$SingletonHolder.access$1(Unknown Source)
at com.intel.debugger.ui.windows.WindowManager.initInstance(Unknown Source)
at com.intel.debugger.ui.ApplicationWorkbenchWindowAdvisor.postWindowOpen(Unknown Source)
at org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpened(WorkbenchWindow.java:1229)
at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:786)
at org.eclipse.ui.internal.Workbench$22.runWithException(Workbench.java:1041)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3378)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3036)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$27.runWithException(Workbench.java:1361)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3378)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3036)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2293)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.intel.debugger.ui.App.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)




0 Kudos
TimP
Honored Contributor III
1,192 Views
icc and idb require this backward compatibility shared library, variously designated as libcompat-stdc++ or libstdc++-33 32-bit. It's mentioned in the papers posted on the forum header page for various distros. It's one of the prerequisites which the icc installer flags.
0 Kudos
Hubert_H_Intel
Employee
1,192 Views
Quoting - tim18
icc and idb require this backward compatibility shared library, variously designated as libcompat-stdc++ or libstdc++-33 32-bit. It's mentioned in the papers posted on the forum header page for various distros. It's one of the prerequisites which the icc installer flags.

Automatic execution of scriptsor commands is usually done with the .bashrc file where you can enter anything thatshall beexecuted whenever your open a new shell. However, your system may not have a .bashrc in your home directory or you may not use a bash shell so please read proper help about shell script execution.
For bash, your .bashrc could include the source script(s)to setupthe whole compiler environment automatically, for example:
$ cat ~/.bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific aliases and functions

source /opt/intel/Compiler/11.1/059/bin/iccvars.sh ia32

$

Regards,
Hubert.
0 Kudos
Reply