- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm attaching some code that compiled fine with Composer XE 2012, but is giving the following errors with 2013 (Package ID: l_ccompxe_2013.5.192):
FEMultiphasic.cpp(30): error: incomplete type is not allowed
void fn(complex<double>& z, complex<double>& fz, vector<double> a)
^
FEMultiphasic.cpp(30): error: identifier "complex" is undefined
void fn(complex<double>& z, complex<double>& fz, vector<double> a)
^
FEMultiphasic.cpp(30): error: type name is not allowed
void fn(complex<double>& z, complex<double>& fz, vector<double> a)
^
FEMultiphasic.cpp(30): error: identifier "z" is undefined
void fn(complex<double>& z, complex<double>& fz, vector<double> a)
^
FEMultiphasic.cpp(30): error: expected a ")"
void fn(complex<double>& z, complex<double>& fz, vector<double> a)
^
FEMultiphasic.cpp(31): error: expected a ";"
{
^
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler pkg id you posted is for Linux. I'm guessing that's a typo.
is the code compiled with VS2012 ok? The code can not be compiled because of the missing header files. if it uses many C++11 features, try adding /Qstd=c++11. It will turn on more C++ 11 support.
Also the coming 14.0 will support even more C++11 features.
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jennifer,
We're compiling the code on multiple platforms. Only linux is having problems. In my makefile I'm including:
INTEL_INC = /opt/intel/composerxe/include/
If I delete that, it compiles without error.
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It might be just the env that is not setup.
did you source the compilervars.sh under the \opt\intel\composerxe\bin folder?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey Kostrov wrote:
Here is a very simple reproducer ( source file attached ):
[ Codes ]
// Test036.cpp
// http://software.intel.com/en-us/forums/topic/413944#include "stdio.h"
int main( void )
{
complex< double > cd;return ( int )0;
}
And here is a very simple fix
[cpp]
#include <stdio.h>
#include <complex>
int main( void )
{
std::complex< double > cd;
return ( int )0;
}
[/cpp]
Compiles with no errors or warnings with icpc (13.1.3 update 5), g++ (4.6.3) and clang++ (3.3).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I isolated that function from your code base and created this code snippet:
[cpp]#include <stdio.h>
#include <complex>
#include <vector>
using namespace std;
void fn(complex<double>& z, complex<double>& fz, vector<double> a) {
int n = (int)a.size()-1;
fz = a[0];
complex<double> x(1,0);
for (int i=1; i<=n; ++i) {
x *= z;
fz += a*x;
}
return;
}
[/cpp]
$ icpc test.cc -c
$ icpc -V
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.1.3.192 Build 20130607
The above command compiles the above file fine. Similarily, the same source compiles fine on Windows too. The command used on Windows is:
>icl test.cc -c
Thanks and Regards
Anoop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dave,
Since you conveyed that by setting the env var "INTEL_INC=" in the Makefile, You are able to reproduce the issue and as Sergey and Jennifer were able to reproduce the errors that you are getting by not including the "math/complex" header file, It hints us that setting this env var in Make file is misleading the "INCLUDE" path, which would be set when we source our compiler script "compilervars.sh <arch".
It would be helpful, if you can zip the project and upload here so we can edit the Makefile and test the issue.
What is the error/effect that you see if you don't include this env var in your Makefile?
Regards,
Sukruth H V
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I concur that INTEL_INC in the Makefile is misleading the include path. As far as I'm concerned the issue is resolved.
Thanks,
Dave

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page