Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all 2797 articles
Browse latest View live

Backend signals "Please contact Support" when compiling function with icc 14

$
0
0

Hi,

I get a backend signals / stack overflow error when compiling the attached function with icc 14.

[rgeary@infradev3.skae:~/git/dev]$ icpc13 -c -xc++ rzextr.cpp 
[rgeary@infradev3.skae:~/git/dev]$ icpc14.0.0 -c -xc++ rzextr.cpp 
": internal error: backend signals

compilation aborted for rzextr.cpp (code 4)
[rgeary@infradev3.skae:~/git/dev:4]$ icpc14.0.1 -c -xc++ rzextr.cpp 
": internal error: ** segmentation violation signal raised **
Access violation or stack overflow. Please contact Support.

compilation aborted for rzextr.cpp (code 4)
[rgeary@infradev3.skae:~/git/dev:4]$ icpc14.0.1 --version
icpc (ICC) 14.0.1 20131008
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.

Regards,

Richard

AttachmentSize
Downloadrzextr.cpp1.96 KB

Icl: warning #10316: option '/Qgen-matmul' not supported at optimization levels less than '/O2'

$
0
0

A small inconsistency with a warning message #10316 is detected and more details will be provided.

Compiler fails with access violation

$
0
0

Hi everyone, just tried to build a project in VS13/ICC14 and here is the result

1>source.cpp(88): error : access violation
1>    vector<unaryFunction> unaryFunctions
1>                          ^
1> 

Was just wondering what this could be. Oh, and the project builds just fine in MSVC and no I don't have locked files or readonly directories or anything like that.

Choosing C++11 libraries.

$
0
0

We have multiple installations of GNU and Intel compilers. The version of the libstdc++ that comes on the system does not have support for std::chrono::steady_clock. We are able to use -gxx-name to link to a new g++ version and it works correctly. However, this is not suitable option for our users. Aside from the PATH environment variable, is there some way we can set what g++ version to use for libstdc++?

Intel C++ 14 - error : function "..." is not a type name

$
0
0

Hello,

I do some experiment with constexpr, I saw some error:

Minimal code, for reproduction:

#include <iostream>

template < typename Type >
struct A
{
    static constexpr Type Func0() { return static_cast< Type >( 0.f ); }
    static constexpr Type Func1() { return static_cast< Type >( 1.f ); }
};

template < typename Type >
struct Object
{
    constexpr Object( Type const _a, Type const _b ) :
        a( _a ),
        b( _b )
    {}

private:
    Type a;
    Type b;
};

template < typename Type >
struct Const
{
    static constexpr Type            Func0Value = A< Type >::Func0();
    static constexpr Type            Func1Value = A< Type >::Func1();
    static constexpr Object< Type >    myObject( A< Type >::Func0(), A< Type >::Func1() );
};

int main()
{
    std::cout << Const< int >::Func0Value << std::endl;
    std::cout << Const< int >::Func1Value << std::endl;
    std::cout << Const< float >::Func1Value << std::endl;

    return 0;
}

Error:

1>main.cpp(28): error : function "A<Type>::Func0 [with Type=int]" is not a type name
1>        static constexpr Object< Type >    myObject( A< Type >::Func0(), A< Type >::Func1() );
1>                                                     ^
1>            detected during instantiation of class "Const<Type> [with Type=int]" at line 33
1>  
1>main.cpp(28): error : function "A<Type>::Func1 [with Type=int]" is not a type name
1>        static constexpr Object< Type >    myObject( A< Type >::Func0(), A< Type >::Func1() );
1>                                                                         ^
1>            detected during instantiation of class "Const<Type> [with Type=int]" at line 33
1>  
1>main.cpp(28): error : function "A<Type>::Func0 [with Type=float]" is not a type name
1>        static constexpr Object< Type >    myObject( A< Type >::Func0(), A< Type >::Func1() );
1>                                                     ^
1>            detected during instantiation of class "Const<Type> [with Type=float]" at line 35
1>  
1>main.cpp(28): error : function "A<Type>::Func1 [with Type=float]" is not a type name
1>        static constexpr Object< Type >    myObject( A< Type >::Func0(), A< Type >::Func1() );
1>                                                                         ^
1>            detected during instantiation of class "Const<Type> [with Type=float]" at line 35
1>  
1>  compilation aborted for main.cpp (code 2)

Version of compiler:

Intel® C++ Composer XE 2013 SP1 Update 1 Integration for Microsoft* Visual Studio* 2012, Version 14.0.1278.11

I know en C++03 is not possible to instanciate non-integral object like that. But I would like to know if it is possible with C++11. For me everything is "parsable" at the compilation time.

The question: It is a C++11 limitation OR Compiler issue?

Thanks

internal error in icpc 14

$
0
0

I reproducibly get an 

internal error: assertion failed at: "shared/cfe/edgcpfe/checkdir.c", line 5595

when compiling https://github.com/wwu-numerik/DUNE-Multiscale/blob/threaded_msfem/dune/multiscale/common/righthandside_assembler.cc#L155 with icpc 14.0.1 20131008 on ubuntu 13.10 with gcc 4.7.3 and -fopenmp and -std=c++11. The assertion does not trigger if I disable the parallel section by commenting line 155. I have a couple more, similar regions in other compile units that never trigger the assertion. 

Any advice?

Intel Compiler and zsh

$
0
0

Hello,

I installed the Intel Compiler (icpc) 14.0.1 on Ubuntu 12.04 LTS. I'm using zsh. I included the folliwing lines to the file .zshrc:

source /opt/intel/bin/compilervars.sh intel64
export MKL_DYNAMIC=false
export MKL_NUM_THREADS=16

But each time I open a new terminal, I've got the following error:

/opt/intel/composer_xe_2013_sp1/tbb/bin/tbbvars.sh:45: = not found

How can I fix it?

Thanks,

Clèm

pragma prefetch:0:macroWithParens

$
0
0

#define NX (256)
...
#pragma prefetch Array:0:NX

is invalid. The compiler should be able to accept any expression that is deamed constant.

Jim Dempsey


Behaviour of omp_set_num_threads/omp_get_max_threads

$
0
0

Assuming OMP_NUM_THREADS=4
In my main thread
omp_get_max_threads() returns 4 as expected

I call
omp_set_num_threads(1);

omp_get_max_threads() now returns 1 as expected.

If I launch a separate "worker thread" and call omp_get_max_threads() inside that thread , I get 4. This seems unexpected.

Problem with omp schedule(guided) if construct

$
0
0

My intention for the following omp construct is that more than one thread  will be used only if (n>64)

size_t n=array.size();
#pragma omp parallel for schedule(guided) if(n>64)
for(size_t i=0;i<n;i++){

// do stuff with array[i]

}

On a 6 core machine, I found that my code was "hanging" reproducibly.

When I debugged the code (debug mode, no optimization on.) I found that

  • one of threads was still processing.
  • the other threads had completed, it seemed.
  • Looking at the variables in the "problem thread" showed that i>n ( out of bounds!), although i was not increasing. That , from my understanding, should not be possible.
  • I think there is a bug in the implementation of this contstruct ( Intel Compiler 13.1) in that it is allowing the for index to be "out of bounds"
  • If I remove the "schedule(guided) if(n>64)" all issues go away
  • I have checked the code with Intel Inspector XE for other threading issues, it came away "clean".

 

Difficulty with multi-line raw string literals

$
0
0

I've been having trouble with multi-line raw string literals. This small program will illustrate:

#include <iostream>
#include <string>

using namespace std;

#pragma warning(disable : 1345)
const string grammar = R"!(
tokens

    <comment> : template = <slash_prefix_comment>

rules

    E ::= E '+' T | T
    T ::= T '*' F | F
    F ::= <number> | '(' E ')'

$)!";
#pragma warning(default : 1345)

int main()
{

    for (auto c: grammar)
    {
        cout << c << "   "<< static_cast<int>(c) << endl;
    }

}

The pragma is to stop a warning about unterminated string literals. I don't think I should be getting that but I can live with the pragma. The last character to print here should be '$', but with version 14 of the compiler I get a few characters of junk instead of the '$'. With longer literals much more can be cut off. I gather this feature is intended for regex expressions but I'm trying to use it for something like a `here document', which would be longer. I think that should work too. Am I missing something?

Integration of Compiler 10.0.025 in VS 2005 on Win 7 64bit

$
0
0

Hi,

I had to switch from Win XP 32Bit to Win 7 64 Bit.

Now, I have a problem  with the integration of the Compiler V10.0.025 into VS 2005 on the Win 7 64 bit system.

There is an error message Compiler Integration Package... has failed to load properly

GUID = {D6EEEC80-45EA-4CA7-AE30-747000CA09F81}.

vcvarsall.bat does work.

Maybe there is some help,

Thank you.

 

ICL emits warning #809 when using defaulted virtual destructors

$
0
0

The following code:

struct B
{
    B () = default; 
    virtual ~B () = default;
}; 
 
struct D : public B
{
    virtual ~D () = default;
};

generates this warning:

warning #809: exception specification for virtual function "D::~D" is incompatible with that of overridden function "B::~B"

when compiled with: icl /c /Qstd=c++11

I believe this warning is in error since the defaulted destructors should have the same exception specification.

I'm using the latest Intel C++ Composer XE SP1 Update 1 (14.0.1.139).

Compile error when using variadic template alias as a function return type

$
0
0

The following code:

template<typename ...Args> class X {};
template<typename ...Args> using Alias = X<Args...>;
 
template<typename ...Args>
Alias<Args...> func ()
{
    return Alias<Args...>();
}
 
int main ()
{
    auto x = func();
}

generates this error:

test.cpp(12): error: template instantiation resulted in unexpected function type of "Alias<> ()" (
the meaning of a name may have changed since the template declaration -- the type of the template is
 "Alias<Args...> ()")
        auto x = func();
                       ^
          detected during instantiation of "func" at line 11

when compiled with: icl /c /Qstd=c++11 test.cpp

It compiles fine in other compilers such as VS2013.

I'm using ICL version 14.0.1.139.

OS X 10.9 Xcode 5 error can't open "stdlib.h" OR ld: library not found for -lcrt1.10.6.o

$
0
0

Environment:  OS X 10.9 (Mavericks) and Xcode 5.0

Command line compilations/links fail with either:

"catastrophic error: cannot open source file "stdlib.h" OR with "ld: library not found for -lcrt1.10.6.o"

Affected compiler:  Intel Composer XE 2013 Update 1

Root cause:  Xcode 5.0 installation does not install all command line tools (include files, libraries, SDKs) need for the compiler to link user applications. 

FIX: Install the Xcode 5.0 "Command Line Tools".  Follow this Knowledge Base article for installation of this package:  http://software.intel.com/en-us/articles/installing-intel-compilers-for-os-x-pre-requisite-xcode-command-line-tools


Unresolved symbols after upgrading to C++ compiler 14.0

$
0
0

Dear All,

 

Since I updated to Intel Composer 14.0 (ie 13.0 SP1, and even SP1 update 1) I do have some code which do not link any more.
Although the code work ok with every other compiler I know of.

Here is an exerpt to reproduce my issue. The following code does nothing meaningful here, it is purely illustrative, so don't try to remove useless templates.

struct Base     {         static const int mCount = 0;         virtual int  GetCount() const {return 0;}     };     class A     {         template<typename T>          class Items          {          public:              template <int ID> struct Prop {};             template <>  struct Prop<0> : public Base             {                  static const int mCount = Base::mCount+1;                 int parA;                 Prop() : parA(0) {}                  int GetCount() const { return this->mCount;}              };         };     public:         struct ParsStruct : public Items<int>::Prop<0> {};         ParsStruct* mPars;         A() : mPars(new ParsStruct()) {}     };     int main(int argc, const char *argv[])     {         A a;         a.mPars->parA = 1;         return 0;     }

 

 

At link time, I get unresolved symbols on A::Items<int>::Prop<0>::Getcount(void) const like:
error LNK2001: unresolved external symbol "public: virtual int __thiscall A::Items<int>::Prop<0>::GetCount(void)const " (?GetCount@?$Prop@$0A@@?$Items@H@A@@UBEHXZ)

Although the metod is clearly defined. the specialized class Prop<0> is also dfined and Items<int>::Prop<0> explicitely used.
Can some guru explain me what has changed between Composer XE 13.0 and 14.0, such that this code links correctly in the old version and not in the new one ?

Any hint ? Is it a compiler bug or a feature ?

Very best regards,

Jean-Michel

 

icpc cannot find libstdc++ include files for non-standard GCC installation

$
0
0

I used to have icpc 13.x running on Mac OS X with a copy of GCC 4.7.1 which I compiled manually from source residing in ~/gcc-4.7.1. When I call icpc -gcc-name=gcc-4.7.1 -gxx-name=g++-4.7.1 -std=c++11 it correctly sets up the compilation environment and finds all the standard c++ include headers without problem.

I've recently upgraded to Mavericks (OS X 10.9) and icpc starts spewing random linkage error so I decided to upgrade to 14.x (2013 SP1 Update 1). This works fine one I figured out that I needed to also include "-no-use-clang-env".

Next, I tried to also upgrade my GCC. This time I used Homebrew to build a copy of GCC 4.8.2 residing in its standard location in /usr/local/. However, if I now run icpc -gcc-name=gcc-4.8 -gxx-name=g++-4.8 it complains:

icpc: error #10001: could not find directory in which the set of libstdc++ include files resides

Since everything still works well if I switch back to 4.7.1 this isn't too much of a problem at the moment, but I cannot figure out why ICC is failing to find libstdc++ with my new GCC installation. (A quick look at the output of "cpp-4.8 -x c++ -v" seems to suggest that the new GCC has its own internal search paths set up correctly. Since I was under the impression that the Intel Compiler uses this to set up its own lookup paths, I am rather baffled...)

 

Question regarding opencl

$
0
0

Is there a flag for icl to compile code that include <CL/cl.h> ??? gcc has the flag -OpenCL or so

 

thanks

annoying warning with last updete Of the compiler

$
0
0

After the last update when I use the command ICPC appears: warning: directory not found for option-L/opt/intel/compiler/1.1.105/composer_xe_2013_2013_sp
I'm using the compiler with MAC and Xcode 5.
Despite the warning everything works correctly, but the message is annoying.
Someone knows what I need to do to delete the message?

Giorgio

boost::asio::write only works on 1 of 2 boost::thread

$
0
0

My program uses 2 ports simultaneously in separate threads but when the second thread writes on its own connection with its own port it seems to complete successfully but does not send anything, I verified this using process monitor.

I have tried a single boost::asio::io_service for both threads and one for either thread, I tried calling run() on 1 or both threads or not at all and none of that makes a difference.

Here are the relevant methods:

const int conport=48625;
const int vidport=48624;
boost::asio::io_service iosvc;
boost::asio::ip::tcp::socket consock(iosvc);
void ControlThread::operator()(NameEdit* nameptr){
    try{
        boost::asio::ip::tcp::endpoint endp(boost::asio::ip::tcp::v6(), conport);
        boost::asio::ip::tcp::acceptor acc(iosvc, endp);
        iosvc.run();
        boost::system::error_code ec;
acc:    acc.accept(consock, ec);
        boost::asio::streambuf buf;
        auto n=boost::asio::read(consock, buf, boost::asio::transfer_exactly(1), ec);
        buf.commit(n);
        if(BufCast(buf)[0]!=2){
            consock.close();
            goto acc;
        }
        boost::asio::write(consock, boost::asio::buffer((char*)2, 1), boost::asio::transfer_exactly(1), ec);
        ConMain(nameptr);
    }catch(std::exception& ex){
        MessageBoxExA(NULL, (LPCSTR)ex.what(), "Error", MB_ICONEXCLAMATION, 0);
    }
}

boost::asio::ip::tcp::socket vidsock(iosvc);
void VideoThread::operator()(){
    try{
        boost::asio::ip::tcp::endpoint endp(boost::asio::ip::tcp::v6(), vidport);
        boost::asio::ip::tcp::acceptor acc(iosvc, endp);
        iosvc.run();
        boost::system::error_code ec;
acc:    acc.accept(vidsock, ec);
        boost::asio::streambuf buf;
        auto n=boost::asio::read(vidsock, buf, boost::asio::transfer_exactly(1), ec);
        buf.commit(n);
        if(BufCast(buf)[0]!=2){
            vidsock.close();
            goto acc;
        }
        boost::asio::write(vidsock, boost::asio::buffer((char*)2, 1), boost::asio::transfer_exactly(1), ec); // THIS write does not send
        VideoThread::VidMain();
    }catch(std::exception& ex){
        MessageBoxExA(NULL, (LPCSTR)ex.what(), "Error", MB_ICONEXCLAMATION, 0);
    }
}

I'm using boost 1.54 and Intel compiler v14 the visual studio 2012 project is an MFC executable.

Viewing all 2797 articles
Browse latest View live




Latest Images