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

Intel Compiler 11.1.073 on Ubuntu 10.4

compila
Beginner
1,170 Views
I'm trying to use Intel Compiler 11.1.073 on Ubuntu 10.4

But I have these errors:
/usr/include/c++/4.3.4/type_traits(82): error: expected a ">"
struct is_rvalue_reference<_Tp&&>
^
/usr/include/c++/4.3.4/type_traits(106): error: expected a ">"
struct remove_reference<_Tp&&>
^
/usr/include/c++/4.3.4/type_traits(136): catastrophic error: rvalue references not yet implemented
{ typedef _Tp&& type; };
^
compilation aborted

Why compiler uses the headers with rvalue references?
How to avoid these errors?

Thanks!
0 Kudos
16 Replies
KitturGanesh
Employee
1,170 Views

Hi,
Looks like there is some reference in what you're compiling to the C++0x rvalue feature. This is supported in the Intel Compiler but you'll have to use the option: -std=c++0x when you compile to enable the C++0x feature. Let me know if that resolves your issue?
-regards,
Kittur

0 Kudos
compila
Beginner
1,170 Views
I use-std=c++0x (I need it for lambda support).
This key is not the solution as rvalue references are not supported in intel compiler now.

Before Ubuntu 10.04 with Intel Compiler 11.1.073 I used Ubuntu 9.10 with Intel Compiler 11.1.64, and my program compiled successfully.
0 Kudos
KitturGanesh
Employee
1,170 Views
Oops, yes you're correct. With the latest 11.1 version there's only lambda support but rvalue will be supported in the next upcoming version of the icc on Linux.OF courseit's supported already in the released Intel Parallel Composer 2011 for Windows*, just FYI. Since you mention 11.1.073 worked with Ubuntu 9.10 and it's not working with 10.04 this needs some investigation.BTW, which version of GCC are you using? Is it possible for you to attach a small test case that can reproduce the problem?

-regards,
KIttur

0 Kudos
compila
Beginner
1,170 Views
Simple stub program compiles just fine:
int main(){
return 0;
}
But when I include or or anything else,
#include
int main(){
return 0;
}
I got "catastrophic error: rvalue references not yet implemented"
I tried it with GCC4.4.3,4.4.1 and 4.3.4
The compilation commandline is
icc test.cpp -o test.exe -std=c++0x -openmp -debug
There should be a way to switch off rvalue headers with some kind of #define, but I don't know how to do that =(
0 Kudos
KitturGanesh
Employee
1,170 Views

Thanks for the input. You can try the following:

Try adding -U__GXX_EXPERIMENTAL_CXX0X__

This works with 11.1 and gcc 4.4 (and failed without...)

Let me know if that helps. Of course, in the next release of icc for Linux, rvalue is supported so this should not be an issue.

_Cheers,
Kittur

0 Kudos
aazue
New Contributor I
1,170 Views
Hi
I have allready use Intel Compiler 11.1.073 on Ubuntu 10.4 without problem
I think just at the shell (bash) execute before to compile
export LANG=C;
(UTF8 translate problem ">")
Regards
0 Kudos
compila
Beginner
1,170 Views
Kittur, thanks a lot!
U__GXX_EXPERIMENTAL_CXX0X__ works fine!
Bustaf, export LANG=C does not resolves the issue.
What do you mean sayingUTF8 translate problem ">"(just for my interest)
0 Kudos
TimP
Honored Contributor III
1,170 Views
Bustaf is suggesting you may have a problem in the error message display, which might possibly be resolved by setting environment variable e.g. LANG=C.
0 Kudos
aazue
New Contributor I
1,170 Views
Hi
What do you mean sayingUTF8 translate problem ">"(just for my interest)
your message error given (expected a '>')/usr/include/c /4.3.4/type_traits(82): error: expected a '>'
I think without other flag added probably ,it could work also with
LANG=C;export LANG;
Encoding as personal is really complex problem ,
Single Situation example:
when you communicate (Cloud server)
engine database with backend C/C
Think that now you having also tactile screen that keyboard encoding can be changed dynamically by user.
also some characters are not converted by UTF8.
Using C (ascii) could be is better for working with only one unique reference.
if your programming must be working shared on the www.
regards

0 Kudos
aazue
New Contributor I
1,170 Views
Hi
What do you mean sayingUTF8 translate problem ">"(just for my interest)
your message error given (expected a '>')/usr/include/c /4.3.4/type_traits(82): error: expected a '>'
I think without other flag added probably ,it could work also with
LANG=C;export LANG;
Encoding as personal is really complex problem ,
Single Situation example:
when you communicate (Cloud server)
engine database with backend C/C
Think that now you having also tactile screen that keyboard encoding can be changed dynamically by user.
also some characters are not converted by UTF8.
Using C (ascii) could be is better for working with only one unique reference.
if your programming must be working shared on the www.
regards

0 Kudos
KitturGanesh
Employee
1,170 Views

Nice to know the flag U__GXX_EXPERIMENTAL_CXX0X__ worked fine in turning off rvalue header errors.

Hi Bustaf, since icc 11.1 doesn't support C++0x rvalue feature (is supported in next upcoming release. Of courseit's supportedalready in Parallel Composer 2011 for Windows* though) without the above flag it's not possible to turn off the errors. The LANG option of course is good to set the proper locale setting....

-regards,
Kittur

0 Kudos
aazue
New Contributor I
1,170 Views
Hi , Kittur
Sorry ,
I think with my bad English that you not having understand correctly sens of my answer.
You have write
The LANG option of course is good to set the proper locale setting....
yes, but only some variable enviroment
use command locale to show several variable enviromnent values LC .....
LANG=
LC_CTYPE=
LC_NUMERIC=
LC_TIME=
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATION=
LC_ALL=
for compiler using LANG=C (Unix linux) declared could be very important.
if is used UTF8, probably is default for Ubuntu O/S , your progamming (binary) could be resulting
as wrong when it working to an other different enviromnent language.
Read about backend and other task same (access external shared lib),(also now url in several languages) you understand probably better potential problem.
with virtual keyboards users can now change dynamically encodingmultiplein same fork real time, up your native environment.
you recieve characteres blank value of encoded false.. when you call request.
It is not an problem linked of specifical compiler that can be changed with an falg flag.
when i have time i add picture moresignificantto context problem.
Regards
0 Kudos
KitturGanesh
Employee
1,170 Views

Thanks Bustaf. Yes I do understand it's important to set the LANG option (BTW, yes it's LANG+C is default for Ubuntu). I was only trying to mention that the switch I suggested is still the solution to turn off the rvalue reference header errors since it's not supported in 11.1 version, that's all. But, I do get your message on the importance of LANG setting, appreciate that.

-regards,
Kittur

0 Kudos
aazue
New Contributor I
1,170 Views
Hi all,
After new verified , it given true that the complementary flag required
for it work correctly.
Sorry for my false answer, probably I have confused
with an other fronted compiler.
Regards
0 Kudos
KitturGanesh
Employee
1,170 Views
Thanks, no confusion really. We're all clear on the resolution now...

-Cheers,
Kittur
0 Kudos
Rahul_S_2
Beginner
1,170 Views

I am trying to compile OpenFOAM CFD package in SUSE Enterprise HPC Cluster. 

I was struggling with same errors but U__GXX_EXPERIMENTAL_CXX0X__ switch solve the problem. However, now new type of error is coming, it is related to the overload definitions in compiling. A snippet of same is pasted below:

SOURCE=LienCubicKE/LienCubicKE.C ;  icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,525,654,819,1125,1476,1505,1572  -DNoRepository -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/turbulenceModels -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/transportModels -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude -IlnInclude -I. -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude   -fPIC -U__GXX_EXPERIMENTAL_CXX0X__ -c $SOURCE -o Make/linux64IccDPOpt/LienCubicKE.o
SOURCE=LienCubicKELowRe/LienCubicKELowRe.C ;  icpc -std=c++0x -Dlinux64 -DWM_DP -wd327,525,654,819,1125,1476,1505,1572  -DNoRepository -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/turbulenceModels -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/transportModels -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude -IlnInclude -I. -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude   -fPIC -U__GXX_EXPERIMENTAL_CXX0X__ -c $SOURCE -o Make/linux64IccDPOpt/LienCubicKELowRe.o
/home1/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricSymmTensorField.C(56): error: more than one instance of overloaded function "Foam::dot" matches the argument list:
            function template "void Foam::dot(Foam::GeometricField<Foam::innerProduct<Type1, Type2>::type, PatchField, GeoMesh> &, const Foam::GeometricField<TypeR, PatchField, GeoMesh> &, const Foam::GeometricField<Type1, PatchField, GeoMesh> &)"
            function template "void Foam::dot(Foam::GeometricField<Foam::tensor, PatchField, GeoMesh> &, const Foam::GeometricField<Foam::symmTensor, PatchField, GeoMesh> &, const Foam::GeometricField<Foam::symmTensor, PatchField, GeoMesh> &)"
            argument types are: (Foam::GeometricField<Foam::tensor, Foam::fvPatchField, Foam::volMesh>, const Foam::GeometricField<Foam::symmTensor, Foam::fvPatchField, Foam::volMesh>, const Foam::GeometricField<Foam::symmTensor, Foam::fvPatchField, Foam::volMesh>)
  BINARY_OPERATOR(tensor, symmTensor, symmTensor, &, '&', dot)
  ^
          detected during instantiation of "Foam::tmp<Foam::GeometricField<Foam::tensor, PatchField, GeoMesh>> Foam::operator&(const Foam::GeometricField<Foam::symmTensor, PatchField, GeoMesh> &, const Foam::GeometricField<Foam::symmTensor, PatchField, GeoMesh> &) [with PatchField=Foam::fvPatchField, GeoMesh=Foam::volMesh]" at line 59 of "realizableKE/realizableKE.C"

compilation aborted for realizableKE/realizableKE.C (code 2)
make: *** [Make/linux64IccDPOpt/realizableKE.o] Error 2

 

 

 

The file where I added the  switch looks like below:

service0 rules/linux64Icc> cat c++
.SUFFIXES: .C .cxx .cc .cpp

c++WARN     = -wd327,525,654,819,1125,1476,1505,1572

CC          = icpc -std=c++0x

include $(RULES)/c++$(WM_COMPILE_OPTION)

ptFLAGS     = -DNoRepository

c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -U__GXX_EXPERIMENTAL_CXX0X__

Ctoo        = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo      = $(Ctoo)
cctoo       = $(Ctoo)
cpptoo      = $(Ctoo)

LINK_LIBS   = $(c++DBUG) -L$(IA64ROOT)/lib

LINKLIBSO   = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
LINKEXE     = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed

 

 

Further, details regarding system are as follows:

cat /proc/version 

Code:
Linux version 2.6.32.12-0.7-default (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP 2010-05-20 11:14:20 +0200

icc --version

Code:
icc (ICC) 11.1 20100806
Copyright (C) 1985-2010 Intel Corporation.  All rights reserved.

lsb_release -a

Code:
LSB Version:    core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description:    SUSE Linux Enterprise Server 11 (x86_64)
Release:        11
Codename:       n/a

uname -m

Code:
x86_64

 

0 Kudos
Reply