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

Eclipse integreation problems

jimdempseyatthecove
Honored Contributor III
1,746 Views
Installing parallel_studio_xe_2011_sp1_update1_intel64.tgz (after failing on install of 32-bit/64-bit).
The 32-bit only install went well (had to uninstall failed install too)

Now my remaining problem is the Eclipse Integration is failing.

Eclipse 8, Ubuntu 11.10, x64

Following instructions, Eclipse cannot successfully Add Local

Work with: file:/opt/intel/composer_xe_2011_sp1.7.256/eclipse_support/cdt8.0/eclipse/

In the Name checkbox list
[ ] (i) There are no catagorized items

Is there a missing file?

Jim Dempsey
0 Kudos
1 Solution
Georg_Z_Intel
Employee
1,733 Views
Hello Jim,

please uncheck check box Group items by category after having added the plug-in:



You should see the three plug-ins from the screenshot then.

Best regards,

Georg Zitzlsberger

View solution in original post

0 Kudos
21 Replies
Georg_Z_Intel
Employee
1,734 Views
Hello Jim,

please uncheck check box Group items by category after having added the plug-in:



You should see the three plug-ins from the screenshot then.

Best regards,

Georg Zitzlsberger
0 Kudos
jimdempseyatthecove
Honored Contributor III
1,646 Views
George, that did the trick.

Thanks,

Jim Dempsey
0 Kudos
jimdempseyatthecove
Honored Contributor III
1,646 Views
Now for issues after "integration" into Eclipse...

When I build an Intel C++ converted project (execuitable) using -v I see -D__INTEL_COMPILER=....
IOW a nice define to be used for conditional compilation - great.
When in edit mode though, the editor highlighter is not aware of the macro defines. IOW

#if defined(__INTEL_COMPILER)
// this is greyed out
#else
// this is shown as expanded
#endif

When compiling the expansion goes correctly.
... However
While editing, the numerous syntax errors are reported.
Worse yet, some of the errors report mismatched #endif (erroniously as the source compiles fine).

------
From my workspace, GCC C++ project for Execuitable I can

Right click on project (GCC C++ project for Execuitable)
Properties
Intel Tools

And I see two choices:

Guided Autoparallelism
Update Projects

And I can convert to ICPC project.

However, when I do this for a static library project, the Intel Tools does not show the Update Projects

I can use the Tool Chain Editor and select the Intel tool chain.

----------------

The code I produce has one source that is to be compiled with

MS VC++, GCC C++, Intel C++, on both Windows and Linux

On Windows with MS VC++ or ICPC Iuse the bit-sized integertypedefs

__int8, __int16, __int32, __int64,__uint8, __uint16, __uint32, __uint64

Linux GCC C++ did not have these, so I used conditionals that if on __linux and __GCC__ I have

typedef __INT8_TYPE__ __int8;
...
typedef __UINT64_TYPE__ __uint64;

And this worked.

Excepting that __uint64 is not typedef'ed

-----------

BOOST seems to be broken

/usr/include/boost/type_traits/is_rvalue_reference.hpp(21) error: expecting a ">"
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_rvalue_reference,T&&,true)

is one example.

I am using Intel 12.1, have not installed earlier version of Intel, so although the selections are listed in the Tool Chain Editor, choosing the earlier versions does not make the change.

Jim Dempsey
0 Kudos
jimdempseyatthecove
Honored Contributor III
1,646 Views
0 Kudos
Georg_Z_Intel
Employee
1,646 Views
Hello Jim,

let's start from scratch to address your problems. I'm telling you what I did to get a working integration and continue with that:

After installing the plug-ins (above) quit from Eclipse. Before starting it, make sure you sourced the compiler tools, like:
$ source /bin/compilervars.sh [intel64|ia32]
...and then start Eclipse IDE in the same shell.

Create a small project (or open one). Right click on your project in Project Explorer window and select Properties. Navigate to the Tool Chain Editor and select the compiler you've sourced.

In my case I've sourced Intel Composer XE 2011 SP1 Update 7 for 64 bit and selected it accordingly:



Regarding the __INTEL_COMPILER macro, I see it correctly evaluated and displayed in the editor (see screenshot). Switching between ICC and GCC works, too.

When following those steps, do you see the same results?

Best regards,

Georg Zitzlsberger
0 Kudos
jimdempseyatthecove
Honored Contributor III
1,646 Views
George,

Thanks. This exposes an additional bug.

When from terminal window, I source the compilervars.sh intel64, then launch Eclipse...

The build works fine.

But I notice the edit window to source code will not pop-out the elevator buttons (both vertical and horizontal).

If I launch Eclipse without sourcing, then the edit window to source code will pop-out the elevator buttons (both vertical and horizontal).

In either launch mode, I still get the Eclipse IDE bug tracker mark (icon of bug on left side of edit window, and red marker on right side of window), while the compiler compiles fine without error.

Jim Dempsey
0 Kudos
Georg_Z_Intel
Employee
1,646 Views
Hello Jim,

unfortunately I'm not clear about the term "elevator buttons". Maybe you can provide a screenshot to help me understand what is meant by that.

Regarding the icons & markers I think it could be the following:
Errors, warnings and remarks from the compiler are visualized in the editor window by a category icon on the left and markers on the right. In general, all those messages the compiler also writes on the command line:

As you can compile everything those might be warnings from the compiler you're seeing.

You can modify that for C & C++ separately. Switch from default -w1 to -w0 here:


In case this is not what you described, please provide me a screenshot.

Best Regards & a Happy New Year!

Georg Zitzlsberger
0 Kudos
jimdempseyatthecove
Honored Contributor III
1,646 Views
Georg,

Thanks for the tips. I will experiment.

RE: Elevators

In your screenshots above, first one, the vertical elevator shaft is shown with scroll/relative size button visible.On my configuration for Eclipse (when working correctly), the elevator shaft is squished to 1 pixel wide, but where the elevator button is positioned it is 2 pixels wide with color highlight for the button (e.g. dark grey vertical line for shaft, red vertical adjacent line for button). Then when you hover the mouse over/next to the red vertical adjacent line for button, the button pops out such that you can grab it with the mouse. You drag the button up/down, and release then the button pops back into the 1 pixel wide mode. Similar thing with the horizontal scroll. First time I experienced this, it was odd (I thought thescroll feature was missing). Now using this feature, I like it, because I get more content displayed (~3 letters per shaft compressed, perhaps 9 more characters per line and 2-4 more lines on screen). With these puny 1080p line'd screens you cannot get as many lines on the screen as desirable. My older analog monitors could go at least 1600 lines and some more than that.

When the Eclipse elevator mode is in this squish/pop-out mode, then when you source the icpc vars, the IDE will no longer pop out the elevator buttons. I hope this clears upthe circumstances.

Jim Dempsey
0 Kudos
JenniferJ
Moderator
1,646 Views


Did youtry with"-std=c++0x" when using icpc? See this posting - http://www.siafoo.net/user/stou/blog/2012/01/06/Boost-and-Intel-Compiler

Jennifer

0 Kudos
Georg_Z_Intel
Employee
1,646 Views
Hello Jim,

I got it now. You're referring to the different visualization of scroll bars introduced in Ubuntu Unity GUI (with 11.4+).
There are numerous reports out there that say this is still broken. Some users see an improvement if you comment out
export GDK_NATIVE_WINDOWS=true
in the Eclipse start-up script.

There are other workarounds to enable the old, static, scroll bars again. However, I see you're favoring the new ones and the above solution might be best for you.

Best regards,

Georg Zitzlsberger
0 Kudos
jimdempseyatthecove
Honored Contributor III
1,646 Views
>>Did youtry with"-std=c++0x"

Yes. The code I develop is heavily templated. The only use of Boost is for use of their is_convertible. I did not want to "rip off" their copy directly, or rewrite one myself. Something as fundamental as is_convertible should be part of the language and/or available with the vendor's compiler. Templates such as these ove the sole purpose of coercing the compiler to do the right thing (enable/disable sections, add/remove code). One could presumably call these "dysfunctional programming techniques".

Jim Dempsey
0 Kudos
JenniferJ
Moderator
1,646 Views
Something as fundamental as is_convertible should be part of the language and/or available with the vendor's compiler. Templates such as these ove the sole purpose of coercing the compiler to do the right thing (enable/disable sections, add/remove code). One could presumably call these "dysfunctional programming techniques".

Jim Dempsey


The "is_convertible" is provided by VC and gcc. icl/icc does not provide such header files.

But the issue is that "-std=c++0x" didn't solve the compile-time errors for you. It is strange. if you have a test case, we'll be happy to take a look.

thanks,
Jennifer

0 Kudos
dan0112
Beginner
1,646 Views
Hi Georg,

I am using the Intel Fortran Compiler (Version 12.0.3) with CDT 7.0.2. When I follow your procedure, I can select only
"Intel Debugger for applications 12.0 , Version 7.0.0"

Do you know whether there should also appear a Fortran Compiler support (like for the C++ compiler in your screenshot)?

Accordingly, I can't select a specific Intel toolchain for this Intel Fortran compiler as shown in your later post in this thread.

Thanks

Daniel
0 Kudos
Georg_Z_Intel
Employee
1,646 Views
Hello Daniel,

we don't have an Eclipse integration for our FORTRAN compiler. Only for CDT which is designed for C/C++. Thus only our C/C++ compilers have such an integration.
The Intel Debugger (IDB) is available for both, though.

AFAIK there's another community sourced Eclipse plug-in called "Photran". Maybe you can use that and select "ifort" as compiler there. Unfortunately I've never used it but you might give it a try.
Don't forget to source the "compilervars.sh" when doing so.

Best regards,

Georg Zitzlsberger
0 Kudos
dan0112
Beginner
1,646 Views
Hi Georg,

yes, I do use Photran. As far as I understand, Photran builds on CDT (CDT is required to install Photran). That's why I thought it would be little effort to provide a C/C++-like plugin, which then enables the recent Intel toolchain and Intel compiler options. Photran could continue doing what it does, like syntax highlighting, code refactorings etc.

If you have a wish list, you can put it on there.

Thanks!

Daniel
0 Kudos
William_H_Intel3
Employee
1,646 Views
Eclipse Photran already includes an Intel Fortran compiler integration and has for several years. It is packaged in it's own feature so all you have to do is install the featurein your Eclipse installation if you have not already.

Bill Hilliard
0 Kudos
dan0112
Beginner
1,646 Views
Hi Bill,

that is true, and yes, I have it installed. However, as far as I understand, the Intel Fortran integration is many years old and Photran is not working on it, because they work on compiler-independent things (maybe they put some effort in the support of gcc/gfortran, but not in commercial, vendor-specific compilers). So none of the many features that Intel has developed over the last years are available through the Eclipse interface, e.g. all the new compiler options. Of course, I can add them manually as command line options, it works, so the situation is not so bad.

Well, just thought it would be a good selling point at low cost, but wishful thinking...

Best

Daniel
0 Kudos
dan0112
Beginner
1,646 Views
Regarding the Intel Debugger (IDB) integration: I have installed the plug-in and can now select Intel Debugger in the launch configuration properties. 2 questions:

Is there a way in Eclipse to provide debugger options (flags) to IDB when starting a Debug run? In the field 'Debugger location' it says 'idbc', but when I add the option -gdb Eclipse complains.

Do you know whether it makes sense to add the -gdb option to make the debugging under Eclipse 'better' (e.g. better ability to view arrays, derived types, etc)?

Best

Daniel
0 Kudos
Georg_Z_Intel
Employee
1,646 Views
Hello Daniel,

it's not possible to provide additional options to the debugger engine. The reason is that it has to communicate with the Eclipse debugging framework using a dedicated protocol (aka. MI mode). Changing the default behavior of the debugger would break this communication protocol.

Secondly, our IDB Eclipse plug-in has the same user experience as the standard Eclipse/CDT debugger.
If you're not happy with it you might take a look at the standalone IDB. It comes with a GUI (idb) and command-line (idbc) version. Its GUI has the same Eclipse look-and-feel but the usability is different and might be better for you. It also supports both FORTRAN & C/C++.

Also: We're currently discussing whether and what we can improve for Photran integration. Thank you for your heads-up!

Best regards,

Georg Zitzlsberger
0 Kudos
dan0112
Beginner
1,367 Views
Hi Georg,

I really don't know much, but it sounds strange that it should be impossible to give options to the debugger. In particular, in Eclipse I can give options / flags to gdb. Also, it seems to work if I do not choose Intel Debugger from the Debugger dropdown menu (in the launch configuration properties), but instead select gdb/mi as the Debugger and then replace the command gdb in the field GDB debugger by the command idbc -gdb. So, in principle it seems possible.

As for Photran integration, it's great news that you are discussing it. Again, I don't have any software engineering background, but where I see areas to improve integration are: update the compiler options that can be checked in the Eclipse(Photran) interface, update the Intel toolchain (and error parsers?). Since you have a lot for C/C++ maybe you can build on that.

If you don't mind I could send an email to the low-traffic Photran user mailing list to make them aware of this thread? Maybe there are some suggestions?

Best

Daniel
0 Kudos
Reply