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

BOOST_SCOPE_EXIT error overloaded function is not a type name

$
0
0

Dear Intel C++ compiler users and support, I recently tried to compile a code which uses the Boost.ScopeExit facility.

Unfortunately, a simple code using BOOST v1.66 (reported in the details section) does not compile with Intel 2017, nor with Intel 2018. Using the compiler flag -std=g++98 all works correctly, but not with -std=gnu++11 (details follow). The problem seems to be related with the C++ standard, and not from the GNU extensions.

Is there any rationale for this behavior? What do you think is going on? Is it correct to assume icpc uses C++03 as default standard?

Thank you in advance for any help or clarification.

DETAILS:

Here follows the simple code used to test the BOOST_SCOPE_EXIT facility from BOOST 1.66. I assume boost header are installed in the BOOST_INC directory.

#include <boost/scope_exit.hpp>
#include <iostream>

int *foo()
{
  int *i = new int{10};
  BOOST_SCOPE_EXIT(&i)
  {
    delete i;
    i = 0;
  } BOOST_SCOPE_EXIT_END
  std::cout << *i << '\n';
  return i;
}

int main()
{
  int *j = foo();
  std::cout << j << '\n';
}

Compiling this code with Intel 2017 results in the following compiling errors:

$> icpc --version
icpc (ICC) 17.0.6 20171215
Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.

$> icpc test_boost_scope_exit.cpp -I$BOOST_INC -o test_boost_scope_exit
test_boost_scope_exit.cpp(7): error: overloaded function "boost::scope_exit::detail::deref" is not a type name
    BOOST_SCOPE_EXIT(&i)
    ^

test_boost_scope_exit.cpp(7): error: expected a ")"
    BOOST_SCOPE_EXIT(&i)
    ^

test_boost_scope_exit.cpp(7): error: expected a type specifier
    BOOST_SCOPE_EXIT(&i)
    ^

test_boost_scope_exit.cpp(7): error #303: explicit type is missing ("int" assumed)
    BOOST_SCOPE_EXIT(&i)
    ^

test_boost_scope_exit.cpp(7): error: expected a ";"
    BOOST_SCOPE_EXIT(&i)
    ^

test_boost_scope_exit.cpp(7): error: identifier "boost_se_capture_t_0_7" is undefined
    BOOST_SCOPE_EXIT(&i)
    ^

compilation aborted for test_boost_scope_exit.cpp (code 2)

Similar behavior is obtained for Intel 2018 (18.0.1) . I'm using GNU 6.3. The code compile only if using the -std=g++98 compiler flag, but not with -std=g++11.

Inspecting the preprocessed source using default behaviour (-std=c++11) and altering the standard with -std=gnu++98, I found that the BOOST_TYPEOF_KEYWORD is not resolved using the c++11 standard:

$> icpc -E -std=c++11 test_boost_scope_exit.cpp -I $BOOST_INC |grep -A4 "foo()"
int *foo()
{
  int *i = new int{10};
  typedef void (*boost_se_tag_0_7)(int &i);   typedef BOOST_TYPEOF_KEYWORD(::boost::scope_exit::detail::deref(&i, static_cast<boost_se_tag_0_7>(0))) boost_se_capture_t_0_7 ;    struct boost_se_params_t_7 { typedef boost_se_capture_t_0_7 boost_se_param_t_0_7 ;    ::boost::scope_exit::detail::member< boost_se_param_t_0_7, boost_se_tag_0_7 > boost_se_param_0_7;    boost_se_params_t_7(  boost_se_param_t_0_7 & a0    ) :  boost_se_param_0_7 ( a0 )    {} } boost_se_params_7 (  ::boost::scope_exit::detail::deref(&i, static_cast<boost_se_tag_0_7>(0))     ) ; ::boost::scope_exit::detail::declared< ::boost::scope_exit::detail::resolve< sizeof(boost_scope_exit_aux_args) > ::cmp1<0> ::cmp2 > boost_scope_exit_aux_args; boost_scope_exit_aux_args . value = &boost_se_params_7; struct boost_se_guard_t_7 { boost_se_params_t_7* boost_se_params_; boost_se_guard_t_7 (void* boost_se_params) : boost_se_params_( (boost_se_params_t_7*)boost_se_params) {} ~boost_se_guard_t_7() { boost_se_body(  boost_se_params_->boost_se_param_0_7 . value     ); } static void boost_se_body(   boost_se_params_t_7:: boost_se_param_t_0_7 &i     )
  {
--
  int *j = foo();
  std::cout << j << '\n';
}

$> icpc -E -std=gnu++98 test_boost_scope_exit.cpp -I $BOOST_INC |grep -A4 "foo()"
int *foo()
{
  int *i = new int{10};
  typedef void (*boost_se_tag_0_7)(int &i);   typedef __typeof__(::boost::scope_exit::detail::deref(&i, static_cast<boost_se_tag_0_7>(0))) boost_se_capture_t_0_7 ;    struct boost_se_params_t_7 { typedef boost_se_capture_t_0_7 boost_se_param_t_0_7 ;    ::boost::scope_exit::detail::member< boost_se_param_t_0_7, boost_se_tag_0_7 > boost_se_param_0_7;    boost_se_params_t_7(  boost_se_param_t_0_7 & a0    ) :  boost_se_param_0_7 ( a0 )    {} } boost_se_params_7 (  ::boost::scope_exit::detail::deref(&i, static_cast<boost_se_tag_0_7>(0))     ) ; ::boost::scope_exit::detail::declared< ::boost::scope_exit::detail::resolve< sizeof(boost_scope_exit_aux_args) > ::cmp1<0> ::cmp2 > boost_scope_exit_aux_args; boost_scope_exit_aux_args . value = &boost_se_params_7; struct boost_se_guard_t_7 { boost_se_params_t_7* boost_se_params_; boost_se_guard_t_7 (void* boost_se_params) : boost_se_params_( (boost_se_params_t_7*)boost_se_params) {} ~boost_se_guard_t_7() { boost_se_body(  boost_se_params_->boost_se_param_0_7 . value     ); } static void boost_se_body(   boost_se_params_t_7:: boost_se_param_t_0_7 &i     )
  {
--
  int *j = foo();
  std::cout << j << '\n';
}

C++17 support

$
0
0

Hello everyone, I would like to ask some news about C++17 support, about fold expressions in particular. Is there a roadmap for that?
Thank you in advance.

deterministic build problem

$
0
0

deterministic means when you compile for multiple times, the output produced should be identical.

gcc supports option -frandom-seed, which is useful in making deterministic build.

icc doesn't have such things? is there a way to make icc generate deterministic binary?

Unexpected behaviour of compiled code

$
0
0

I am having problems with Intex C++ compiler 18.0.1 and TBB.
The sample code looks like this:

#include <iostream>
#include "tbb/tbb.h"
#include "tbb/parallel_for.h"
#include "tbb/blocked_range.h"

__declspec(cpu_dispatch(generic, core_4th_gen_avx))
void do_stuff(){}

__declspec(cpu_specific(core_4th_gen_avx))
void do_stuff()
{
std::cout << "in AVX2 version: ";
tbb::parallel_for(0,10,[&](const unsigned int m) {
if (m == 5) std::cout << "utilizing AVX2 version parallel_for\n";
});
}

__declspec(cpu_specific(generic))
void do_stuff()
{
std::cout << "in generic version: ";
tbb::parallel_for(0,10,[&](const unsigned int m) {
if (m == 5) std::cout << "utilizing generic version parallel_for\n";
});
}

int main()
{
do_stuff();
return 0;
}

When I run the compiled binary in Intel processor that does not support AVX2-extensions I get:
'in generic version: utilizing AVX2 version parallel_for'

Is this to be expected?

Flag -qopenmp makes serial code slower when using -O3

$
0
0

Hello,

we are doing some experiments, comparing the execution time of C code compiled with and without the option -parallel (icc 18.0.0) and we noticed that when we compile code that has no OpenMP pragmas with the flag -O3, if we also use the flag -qopenmp, the execution time is slower that when we do not use it. If we use -O2 instead of -O3, there is no performance difference, in the code we tested.

Could you give some insight on what might be happening? Is -qopenmp preventing optimizations that would otherwise be applied when using -O3?

Thanks,

João Bispo

-qopt-report not reporting all OpenMP pragmas inserted by -parallel

$
0
0

Hello,

we are doing some experiments with the option "-parallel", on icc 18.0.0, and using the flags -qopt-report=5 and -qopt-report-phase=all to obtain the maximum information from the reports. However, it seems that the reports are not providing complete information about what OpenMP pragmas are automatically inserted by the "-parallel" option.

In the experiment, we first compiled a small application with a well defined kernel (e.g., benchmark 'adi' in PolyBench/C) with icc and the option "-parallel", as well as the report options. When running the resulting binary, we had around ~50% performance improvement.

Then, we manually insert in the original source code the OpenMP pragmas that the reports indicate that "-parallel" added, and compiled again without "-parallel" (but with "-qopenmp"). When running the version with the manually inserted OpenMP pragmas, we got no performance benefit (i.e., the execution time is the same as the serial version). Initially we assumed that "-parallel" was enabling other optimizations besides the OpenMP pragmas. However, changing the environment variable OMP_NUM_THREADS had an effect in the performance of the binary compiled with the flag "-parallel" (e.g., increasing the number of threads, decreased the execution time), which seems that the code was parallelized with OpenMP pragmas that did not appear in the report.

Could you confirm that the option '-qopt-report' might not show all the OpenMP pragmas inserted by the option "-parallel"? Is there any way to obtain this information?

Thank you,

João Bispo

Problem compiling code having "const intXX_t *const restrict" datatype

$
0
0

Hi all,
I am trying to compile a code on suse machine (cray platform), using intel compilers. The gnu & cray compilers are able to compile the code , where as intel compilers fail to do so  - here is my terminal log -

When i use gnu compilers - 

user@machine:~/test> gcc --version
gcc (GCC) 7.2.0 20170814 (Cray Inc.)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

user@machine:~/test> cc -oo/pio_byteswap.o -c -I./include -I../src/include/other/ -g -O3 pio_byteswap.c
user@machine:~/test> echo $?
0

When i use Cray Compilers - 

user@machine:~/test> cc -oo/pio_byteswap.o -c -I./include -I../src/include/other/ -g -O3 pio_byteswap.c

/**********************************COPYRIGHT***********************************/
^
CC-3140 craycc: WARNING File = pio_byteswap.c, Line = 1, Column = 1
  The IPA optimization level was changed to "1" due to the presence of OMP
          directives, ACC directives, or ASM intrinsics.
^
CC-3140 craycc: WARNING File = pio_byteswap.c, Line = 1, Column = 1
  The IPA optimization level was changed to "1" due to the presence of OMP
          directives, ACC directives, or ASM intrinsics.
^
CC-3140 craycc: WARNING File = pio_byteswap.c, Line = 1, Column = 1
  The IPA optimization level was changed to "1" due to the presence of OMP
          directives, ACC directives, or ASM intrinsics.
^
CC-3140 craycc: WARNING File = pio_byteswap.c, Line = 1, Column = 1
  The IPA optimization level was changed to "1" due to the presence of OMP
          directives, ACC directives, or ASM intrinsics.
^
CC-3140 craycc: WARNING File = pio_byteswap.c, Line = 1, Column = 1
  The IPA optimization level was changed to "1" due to the presence of OMP
          directives, ACC directives, or ASM intrinsics.

Cray C : Version 8.6.3 (20170915205125_246c91a894f32f99a576014806deeb88a0cb66eb)
Total warnings detected in pio_byteswap.c: 5
user@machine:~/test> echo $?
0

And when i use intel compilers - 

user@machine:~/test> module switch PrgEnv-gnu/6.0.4 PrgEnv-intel
user@machine:~/test> icc --version
icc (ICC) 17.0.5 20170817
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.

user@machine:~/test> cc -oo/pio_byteswap.o -c -I./include -I../src/include/other/ -g -O3 pio_byteswap.c
pio_byteswap.c(52): error #100: duplicate parameter name
                             const int64_t *const restrict,
                                                  ^

pio_byteswap.c(53): error #100: duplicate parameter name
                             const int64_t *const restrict);
                                                  ^

pio_byteswap.c(57): error #100: duplicate parameter name
                             const int64_t *const restrict,
                                                  ^

pio_byteswap.c(58): error #100: duplicate parameter name
                             const int64_t *const restrict);
                                                  ^

pio_byteswap.c(62): error #100: duplicate parameter name
                             const int64_t *const restrict,
                                                  ^

pio_byteswap.c(63): error #100: duplicate parameter name
                             const int64_t *const restrict);
                                                  ^

pio_byteswap.c(81): error: expected a ";"
    const int64_t *const restrict incr_ptr=&incr;
                                  ^

pio_byteswap.c(82): error: "restrict" has already been declared in the current scope
    const int64_t *const restrict imin_ptr=&imin;
                         ^

pio_byteswap.c(82): error: expected a ";"
    const int64_t *const restrict imin_ptr=&imin;
                                  ^

pio_byteswap.c(83): error: "restrict" has already been declared in the current scope
    const int64_t *const restrict imax_ptr=&imax;
                         ^

pio_byteswap.c(83): error: expected a ";"
    const int64_t *const restrict imax_ptr=&imax;
                                  ^

pio_byteswap.c(97): error: identifier "imin_ptr" is undefined
      par_swap64(&array,imin_ptr,imax_ptr,incr_ptr);
                        ^

pio_byteswap.c(97): error: identifier "imax_ptr" is undefined
      par_swap64(&array,imin_ptr,imax_ptr,incr_ptr);
                                 ^

pio_byteswap.c(97): error: identifier "incr_ptr" is undefined
      par_swap64(&array,imin_ptr,imax_ptr,incr_ptr);
                                          ^

pio_byteswap.c(105): error: identifier "imin_ptr" is undefined
      par_swap32(&array,imin_ptr,imax_ptr,incr_ptr);
                        ^

pio_byteswap.c(105): error: identifier "imax_ptr" is undefined
      par_swap32(&array,imin_ptr,imax_ptr,incr_ptr);
                                 ^

pio_byteswap.c(105): error: identifier "incr_ptr" is undefined
      par_swap32(&array,imin_ptr,imax_ptr,incr_ptr);
                                          ^

pio_byteswap.c(113): error: identifier "imin_ptr" is undefined
      par_swap16(&array,imin_ptr,imax_ptr,incr_ptr);
                        ^

pio_byteswap.c(113): error: identifier "imax_ptr" is undefined
      par_swap16(&array,imin_ptr,imax_ptr,incr_ptr);
                                 ^

pio_byteswap.c(113): error: identifier "incr_ptr" is undefined
      par_swap16(&array,imin_ptr,imax_ptr,incr_ptr);
                                          ^

pio_byteswap.c(126): error: expected a ")"
                             const int64_t * const restrict imin,
                                                            ^

pio_byteswap.c(125): warning #147: declaration is incompatible with "void par_swap64(void **const, const int64_t={long} *const, const int64_t={long} *const, const int64_t={long} *const)" (declared at line 50)
  INLINEQUAL void par_swap64(void **const array,
                  ^

pio_byteswap.c(131): error: expected a ";"
      uint64_t *const restrict ptr_64 = (uint64_t *)*array;
                               ^

pio_byteswap.c(133): error: identifier "imax" is undefined
      const int64_t span=(*imax-*imin)/(*incr);
                           ^

pio_byteswap.c(133): error: identifier "imin" is undefined
      const int64_t span=(*imax-*imin)/(*incr);
                                 ^

pio_byteswap.c(133): error: identifier "incr" is undefined
      const int64_t span=(*imax-*imin)/(*incr);
                                         ^

pio_byteswap.c(142): error: identifier "ptr_64" is undefined
        ptr_64[min+i*cincr] = (uint64_t)bswap_64(ptr_64[min+i*cincr]);
        ^

pio_byteswap.c(151): error: expected a ")"
                             const int64_t *const restrict imin,
                                                           ^

pio_byteswap.c(150): warning #147: declaration is incompatible with "void par_swap32(void **const, const int64_t={long} *const, const int64_t={long} *const, const int64_t={long} *const)" (declared at line 55)
  INLINEQUAL void par_swap32(void **const array,
                  ^

pio_byteswap.c(156): error: expected a ";"
      uint32_t *const restrict ptr_32 = (uint32_t *)*array;
                               ^

pio_byteswap.c(158): error: identifier "imax" is undefined
      const int64_t span=(*imax-*imin)/(*incr);
                           ^

pio_byteswap.c(158): error: identifier "imin" is undefined
      const int64_t span=(*imax-*imin)/(*incr);
                                 ^

pio_byteswap.c(158): error: identifier "incr" is undefined
      const int64_t span=(*imax-*imin)/(*incr);
                                         ^

pio_byteswap.c(167): error: identifier "ptr_32" is undefined
        ptr_32[min+i*cincr] = (uint32_t)bswap_32(ptr_32[min+i*cincr]);
        ^

pio_byteswap.c(175): error: expected a ")"
                             const int64_t *const restrict imin,
                                                           ^

pio_byteswap.c(174): warning #147: declaration is incompatible with "void par_swap16(void **const, const int64_t={long} *const, const int64_t={long} *const, const int64_t={long} *const)" (declared at line 60)
  INLINEQUAL void par_swap16(void **const array,
                  ^

pio_byteswap.c(180): error: expected a ";"
      uint16_t *const restrict ptr_16 = (uint16_t *)*array;
                               ^

pio_byteswap.c(182): error: identifier "imax" is undefined
      const int64_t span=(*imax-*imin)/(*incr);
                           ^

pio_byteswap.c(182): error: identifier "imin" is undefined
      const int64_t span=(*imax-*imin)/(*incr);
                                 ^

pio_byteswap.c(182): error: identifier "incr" is undefined
      const int64_t span=(*imax-*imin)/(*incr);
                                         ^

pio_byteswap.c(191): error: identifier "ptr_16" is undefined
        ptr_16[min+i*cincr] = (uint16_t)bswap_16(ptr_16[min+i*cincr]);
        ^

compilation aborted for pio_byteswap.c (code 2)
user@machine:~/test>

 

I am attaching the code in question.
Please let me know if i can provide you with any further information from my end.

 

 

 

AttachmentSize
Downloadtext/x-csrcpio_byteswap.c7.34 KB

Division by zero inside if(0) clause

$
0
0

Hello!

I encounter the strange behavior of the Intel C++ Compiler. 

The following program generates "Floating point exception" if optimization (at least -O1) is enabled:

#include <fenv.h>
#include <stdio.h>
int j = 0;
int main(int argc, char *argv[]){
    feenableexcept( FE_DIVBYZERO );
    double r = 0.0;
    for(int k=0; k<2; k++) {
        double A[3] = {0.,0.,0.};
        if(j) A[0] -= 1.0/r;
        printf("A = %e %e %e\n", A[0], A[1], A[2]);
    }
}

Linux, 64bit. Compiler version: icc (ICC) 16.0.1 20151021.

If the optimization is disabled, no exception is generated. gcc also generates no exception.

Is everything correct?


problem to get compiler

$
0
0

hello, I just received your negative answer regarding my request to get your compiler. you tell me that I am not part of a school delivering higher education diplomas. I am enrolled at the school of digital in Le Havre in France and I am preparing a diploma of Analyst Developer in information system. I need a compiler powerful and accurate and I turned to you because my laptop is equipped with a processor i5 last generation. can you reconsider your answer? cordiales

Additional Optimized Code Path

$
0
0

Hello,

Intel Compiler 18.1 allows creating code optimized according to features (SSE / AVX / AVX2 / AVX512 / etc..).
I was wondering, are those code path for Intel CPU's only or based on CPU Features?

Moreover, do they take OS in consideration (For example, AVX2 is supported only on Windows 7 SP1 and above)?

Thank You.

Loop Peeling for Vectorization

$
0
0

Hello,

I'm optimizing the simplest code of looping over 2 arrays and summing them into third array.
I used:

__assume_aligned(arrayA, 32);

__assume_aligned(arrayB, 32);

__assume_aligned(arrayC, 32);

 

Yet still I can see the compiler is using peeling on those.

How come it doesn't understand the arrays are aligned?

 

Thank You.

WIN64: 'expected a "{" ... namespace NS [[deprecated]] { }' error for QtBase 'compiler' autotest build

$
0
0

Hello, everyone,

For QtBase 'compiler' autotest build using Windows ICC got error:

        icl -c -nologo -Zm200 /Qprec /Qwd1744,1738,809,3373 /Zc:forScope -O2 -MD -Qstd=c++14 -EHsc -W3 /Qwd673 -DUNICODE -D_UNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_FORCE_ASSERTS -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR="\"C:/libQT-5.11-dev/build/qtbase/tests/auto/other/compiler\"" -DNDEBUG -I. -I..\..\..\..\include -I..\..\..\..\include\QtTest -I..\..\..\..\include\QtCore -Itmp\moc\release -I..\..\..\..\mkspecs\win32-icc -Fo.obj\release\ @C:\Users\test\AppData\Local\Temp\nmC271.tmp
tst_compiler.cpp
.\tst_compiler.cpp(696): error: expected a "{"
  namespace NS [[deprecated]] { }
               ^

.\tst_compiler.cpp(729): warning #2633: attributes are not allowed here
      [[ ]] void [[ ]] * [[ ]] * [[ ]] ptr = 0;
                            ^

.\tst_compiler.cpp(729): warning #2633: attributes are not allowed here
      [[ ]] void [[ ]] * [[ ]] * [[ ]] ptr = 0;
                                    ^

.\tst_compiler.cpp(730): warning #2633: attributes are not allowed here
      int B::* [[ ]] pmm = 0;
                  ^

.\tst_compiler.cpp(765): warning #2633: attributes are not allowed here
      int & [[ ]] lref = i;
               ^

.\tst_compiler.cpp(766): warning #2633: attributes are not allowed here
      int && [[ ]] rref = 1;
                ^

compilation aborted for .\tst_compiler.cpp (code 2)
NMAKE : fatal error U1077: '"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\intel64\icl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.

(ICC-preprocessed version added in attachment). Qt Developers believe it's a compiler bug.

 

Reproduced for:
  - Qt5-dev builds using Windows ICC,

not reproduced for:
  - Qt5-dev builds using mingw-w64 and MSVC.

 

Environment:

 

Best,

Alexander

 

Eclipse not resolving some types with Intel C++ compiler

$
0
0

When i integrated intel C++ compiler 2018 with eclipse and imported examples_c (cblas) of Intel Parallel studio, some types are not getting resolved in eclipse.

Ex: Eventhough stdio.h has been included and is resolved FILE does not get resolved.
Also MKL_INT is resolved but MKL_Complex8/16 is not getting resolved.

Some info would be helpful

Compiling boost for Intel compiler on Windows

$
0
0

Hi,

I followed the steps (with adjustments for version 18) to build boost using Intel compiler.

I have Intel i7 processor, with windows 7 64-bit version, therefore I run compilervars.bat batch with intel64 flag.

I run b2 with address-model=32, yet  in boost libboost_log-iw-mt-gd-x32-1_66.lib is created as an x64 binary (I see it using 'dumpbin /HEADERS libboost_log-iw-mt-gd-x32-1_66.lib')

I guess the library is built by default as x64 for some reason.... 

any idea?

Thanks,

Boaz.

"warning #711: ellipsis with no explicit parameters is nonstandard" with "-strict-ansi"

$
0
0

Hello,

 

With upgrade to icc18.0.1 the following warning appears when "-strict-ansi" argument is supplied:

icc18_toupper_test.c(6): warning #711: ellipsis with no explicit parameters is nonstandard
  	v = toupper(v);
  	    ^

With icc15 this message did not appear.

Compiler  is installed x86_64 Linux.

 

The code is attached, compilation cmd:
icc -strict-ansi cc18_toupper_test.c

 

How do I get rid of this warning?

Thanks

AttachmentSize
Downloadtext/x-csrcicc18_toupper_test.c99 bytes

Compiling with icc18 on Linux x86_64 with "-fast" on AMD CPU produces code containing unsupported instruction

$
0
0

Hello,

 

Any program compiled with icc8 on AMD CPU with "-fast" option results in executable that produces the following error when launched:

Please verify that both the operating system and the processor support Intel(R) X87, CMOV, MMX, FXSAVE, SSE, SSE2 and SSE3 instructions.
CPU information from the OS (no SSE3 there):

> head /proc/cpuinfo -n 26
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 16
model		: 9
model name	: AMD Opteron(tm) Processor 6174
stepping	: 1
cpu MHz		: 2200.000
cache size	: 512 KB
physical id	: 0
siblings	: 12
core id		: 0
cpu cores	: 12
apicid		: 16
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid amd_dcm pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr
bogomips	: 4399.72
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

Looks like this is against the specification of "-fast" in the manual:
 

> icc -help | egrep "\-fast|\-x" -A1
-fast     enable -xHOST -O3 -ipo -no-prec-div -static -fp-model fast=2

--
-x<code>  generate specialized code to run exclusively on processors
          indicated by <code> as described below
--
-xHost    generate instructions for the highest instruction set and processor
          available on the compilation host machine

Thanks.

Parallel Studio 2018 Update 1 Installation with --nonrpm-db-dir on Linux

$
0
0

Dear all,

I am trying to install Parallel Studio 2018 Update 1 into a separate directory and without destroying the existing 2017 install. Therefore I try to used the --nonrpm-db-dir option of the command line installer. This option, as well as the corresponding setting in the silent.cfg file, gets ignored as long as an rpm command is found on the system. If I rename /usr/bin/rpm to /usr/bin/rpm.bak and then start the setup I can install the current parallel Studio version independent of the previously installed ones. Why to I need the hack with renaming the rpm tool? If I do not do this. The installer says that old products are installed in a different path and uses this path to update the old installation. But it cannot be the solution to rename the rpm command before? Is there a proper way to get two (or more) separated installations of Parallel Studio?

I recognized this behaviour on an CentOS 7.4 x86-64.

icc18.0.1 -static-intel links libiomp5 dynamically on Linux x86_64

$
0
0

Hi,

"icc18.0.1 -static-intel" links libiomp5 dynamically on Linux x86_64. Work around is to link with explicit path libiomp5.a instead of "-qstatic" linker flag, Unfortunately it breaks the implicitness of our deployment scripts.

Yakov Mindelis

__builtin_shuffle, GCC compatibility, and __has_builtin

$
0
0

I recently tried to build one of my projects (SIMDe) with ICC, and it failed due to __builtin_shuffle not being supported. There are ifdefs around the code in question which use __GNUC__ and __GNUC_MINOR__ to check for GCC ≥ 4.7 before using __builtin_shuffle, but ICC 18.0 masquerades as GCC 7 so the code was enabled.

I don't have any objection to ICC not supporting every feature GCC does, but masquerading as a version of GCC which supports something then not supporting it is quite frustrating. Clang has resolved this by simply only claiming to support the extensions provided by GCC 4.2, and added __has_builtin (among others) to check for support for specific builtins. Is there any hope of ICC adopting this method? Is there some other way to identify which features are actually present?

system studio 2018 (icpc): disable "note"

$
0
0

Hello,

Upon compiling with icpc I'm getting many "note" messages and can not see the error.

Is it possible to disable "note" messages ?

Thank you,

Zvika 

Viewing all 1175 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>