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

vectorize operator decrease performance

$
0
0

Hi 

I use intel compiler 15 and I  have a code that include huge number of maximum operaton

I write a a vectorize code for that max operation and performance of my application dramatically goes down .

my previouse code is :

while (cycles < MAX_CYCLE)
    {

        for (int i = len - 1; i >= 0; i--)  
        {
            illr = i*llr_height;

            BG8 = inz[illr + 1];
            BG17 = inx[illr];
            BG18 = inx[illr + 1];
            BG3 = inx[illr + 2];
            BG17_8 = BG17 + BG8;
            BG18_8 = BG18 + BG8;
            BG3_8 = BG3 + BG8;
           

            float max4 = 0;//gamma[0];

            max4 = max_float(max4,BG17_8 + beta_7);
            max4 = max_float(max4, BG18_8 + beta_4);
            max4 = max_float(max4, BG3 + beta_3);
            tempab[0] = max4;
            
            max4 = beta_4;
            max4 = max_float(max4, BG17_8 + beta_3);
            max4 = max_float(max4, BG18_8);
            max4 = max_float(max4, BG3 + beta_7);
            tempab[1] = max4;
            
            max4 = BG8 + beta_1;
            max4 = max_float(max4, BG17 + beta_6);
            max4 = max_float(max4, BG18 + beta_5);
            max4 = max_float(max4,  BG3_8 + beta_2);
            tempab[2] = max4;
            
            max4 = BG8 + beta_5;
            max4 = max_float(max4, BG17 + beta_2);
            max4 = max_float(max4, BG18 + beta_1);
            max4 = max_float(max4, BG3_8 + beta_6);
            tempab[3] = max4;
            
            max4 = BG8 + beta_6;
            max4 = max_float(max4,  BG17 + beta_1);
            max4 = max_float(max4, BG18 + beta_2);
            max4 = max_float(max4, BG3_8 + beta_5);
            tempab[4] = max4;
            
            max4 = BG8 + beta_2;
            max4 = max_float(max4,  BG17 + beta_5);
            max4 = max_float(max4, BG18 + beta_6);
            max4 = max_float(max4, BG3_8 + beta_1);
            tempab[5] = max4;
            
            max4 = beta_7;
            max4 = max_float(max4, BG17_8);
            max4 = max_float(max4, BG18_8 + beta_3);
            max4 = max_float(max4, BG3 + beta_4);
            tempab[6] = max4;
            
            max4 = beta_3;
            max4 = max_float(max4, BG17_8 + beta_4);
            max4 = max_float(max4, BG18_8 + beta_7);
            max4 = max_float(max4, BG3);
            tempab[7] = max4;
              }

        cycles++;
    }

 

and new vectorize code is :

__m256 Vec1,Vec2,Vec3,Vec4,Vec5,Vec6,Vec7,Vec8;

float V1[8];float V2[8];float V3[8];float V4[8];

while (cycles < MAX_CYCLE)
    {

        for (int i = len - 1; i >= 0; i--)  // calculate beta[][i] based on beta[][i+1]
        {

            illr = i*llr_height;
            BG8 = inz[illr + 1];
            //float BG24 = 0;
            //basegamma[16] = basegamma[8];
            BG17 = inx[illr];
            BG18 = inx[illr + 1];
            BG3 = inx[illr + 2];
            BG17_8 = BG17 + BG8;
            BG18_8 = BG18 + BG8;
            BG3_8 = BG3 + BG8;
            int iplus1 = i + 1;

            V1[0] = 0;

            V2[0] = BG17_8 + beta_7;
            V3[0] = BG18_8 + beta_4;
            V4[0] = BG3 + beta_3;

            V1[1] = beta_4;
            V2[1] = BG17_8 + beta_3;
            V3[1] = BG18_8;
            V4[1] = BG3 + beta_7;

            V1[2] = BG8 + beta_1;
            V2[2] = BG17 + beta_6;
            V3[2] = BG18 + beta_5;
            V4[2] = BG3_8 + beta_2;

            V1[3] = BG8 + beta_5;
            V2[3] = BG17 + beta_2;
            V3[3] = BG18 + beta_1;
            V4[3] = BG3_8 + beta_6;

            V1[4] = BG8 + beta_6;
            V2[4] = BG17 + beta_1;
            V3[4] = BG18 + beta_2;
            V4[4] = BG3_8 + beta_5;

            V1[5] = BG8 + beta_2;
            V2[5] = BG17 + beta_5;
            V3[5] = BG18 + beta_6;
            V4[5] = BG3_8 + beta_1;

            V1[6] = beta_7;
            V2[6] = BG17_8;
            V3[6] = BG18_8 + beta_3;
            V4[6] = BG3 + beta_4;

            V1[7] = beta_3;
            V2[7] = BG17_8 + beta_4;
            V3[7] = BG18_8 + beta_7;
            V4[7] = BG3;

            Vec1 = _mm256_load_ps(V1);
            Vec2 = _mm256_load_ps(V2);
            Vec3 = _mm256_load_ps(V3);
            Vec4 = _mm256_load_ps(V4);

            Vec5=_mm256_max_ps(Vec1, Vec2);
            Vec6 = _mm256_max_ps(Vec5, Vec3);
            Vec7 = _mm256_max_ps(Vec6, Vec4);

            _mm256_storeu_ps(V1, Vec7);

        }//for (int i = len - 1; i >= 0; i--)

    
        cycles++;
    }

I will appreciate if some one tell me why my performance fall down and what can I do to correct that?

Zone: 

Thread Topic: 

Question

ICC compiler error

$
0
0

 

I tried compile my application with mpiicpc 2017,

it gives the following error message.

": internal error: ** The compiler has encountered an unexpected problem.
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.

compilation aborted for *** (code 4)

Should I provide my source code to Intel development team?
(Isn't there any privacy problem here?)

 

MPI-version

mpiicpc for the Intel(R) MPI Library 2017 for Linux*
Copyright(C) 2003-2016, Intel Corporation.  All rights reserved.
icpc version 17.0.0 (gcc version 4.9.2 compatibility)

Flags that I used for compilation

-std=c++11 -mt_mpi -qopenmp

 

Memory leak when using offload in Intel HD Graphics 4600

$
0
0

My software using cilk_for occured memory leak.

I want to know why memory leaks and how avoid memory leak.

Thanks.

source code:

#include <cilk/cilk.h>
#include <iostream>
#include <windows.h>

int main()
{
 int retVal = 0;

 unsigned char* input = NULL;
 input = (unsigned char *)_aligned_malloc(sizeof(unsigned char)*100, 32);

 do {

#pragma offload target(gfx) pin(input:length(100))
#pragma simd
#pragma unroll(3)
  cilk_for(int i = 0; i < 100; ++i) {
   cilk_for(int j = 0; j < 100; ++j) {
    cilk_for(int k = 0; k < 100; ++k) {
    }
   }
  }
  
  MEMORYSTATUSEX mem = {sizeof mem};
  GlobalMemoryStatusEx(&mem);
  unsigned int m = static_cast<unsigned int>((512 * 1024) + (mem.ullTotalVirtual - mem.ullAvailVirtual));
  std::cout << m << " Bytes using"<< std::endl;
 } while(true);

 if(input != NULL) {
  _aligned_free(input);
  input = NULL;
 }

 return retVal;
}

CPU: core i7-4770S

Driver:Intel HD Gprahics 4600 10.18.14.4578 (latest)

OS: Windows 7 professional SP1 64bit

IDE: Visual Studio 2012 Professional, Intel Parallel Studio XE 2017

Software platform: x64

Zone: 

Thread Topic: 

Help Me

MPI_Allreduce is toooo slow

$
0
0

I use the benchmark in Intel MPI (IMB) to measure the performance of MPI_Allreudce over a rack with 25 machines equipped with Infiniband 40G switch. (I use the latest version of parallel studio 2017 on CentOS7 with linux kernel 3.1)

mpiexec.hydra -genvall -n 25 -machinefile ./machines ~/bin/IMB-MPI1 Allreduce -npmin 25 -msglog 26:29 -iter 1000,128

#------------------------------------------------------------
#    Intel (R) MPI Benchmarks 4.1 Update 1, MPI-1 part
#------------------------------------------------------------
# Date                  : Mon Feb 20 16:40:26 2017
# Machine               : x86_64
# System                : Linux
# Release               : 3.10.0-327.el7.x86_64
# Version               : #1 SMP Thu Nov 19 22:10:57 UTC 2015
# MPI Version           : 3.0

...

# /home/syko/Turbograph-DIST/linux_ver/bin//IMB-MPI1 Allreduce -npmin 25 -msglog 26:29 -iter 1000
#

# Minimum message length in bytes:   0
# Maximum message length in bytes:   536870912
#
# MPI_Datatype                   :   MPI_BYTE
# MPI_Datatype for reductions    :   MPI_FLOAT
# MPI_Op                         :   MPI_SUM
#
#

# List of Benchmarks to run:

# Allreduce

#----------------------------------------------------------------
# Benchmarking Allreduce
# #processes = 25
#----------------------------------------------------------------
       #bytes #repetitions  t_min[usec]  t_max[usec]  t_avg[usec]
            0         1000         0.12         0.18         0.15
     67108864            2    298859.48    340774.54    329296.10
    134217728            1    619451.05    727700.95    687140.46
    268435456            1   1104426.86   1215415.00   1177512.81
    536870912            1   2217355.97   2396162.03   2331228.14

# All processes entering MPI_Finalize

So I conclude that the performance of MPI_Allreduce is about (# of bytes / sizeof (float) / ElapsedTime) ~= 57 Mega Elementes / sec

This throughput number is far below than I expected. The network bandwidth usage is also much lower than the maximum bandwidth of Infiniband. 
Is this performance number is acceptable in Intel MPI? Otherwise, is there something I can do to improve it?
(I tried varying 'I_MPI_ADJUST_ALLREDUCE', but were not satisfied.)

 

 

Memory leak: Temporary std::set is not deleted.

$
0
0

The following program:

 

#include <set>
#include <iostream>

std::set<std::string> Foo() {

  std::set<std::string> ret;
  ret.insert("test");
  return ret;
}

int main(int argc, char** argv) {

  while (true) {
    for(auto& s : Foo()) {
      // do nothing.
    }
  }

  return 0;
}

Leaks memory and causes my system to swap after a few seconds. This is on Linux x86_64, ICC Version 17.0.1, GCC Version 6.3.0. I compile like this:

icpc -o test test.C

Compiling the same program with g++ does not show this leak. Any ideas? Is there a bug in the compiler?

Thread Topic: 

Bug Report

pragma offload target(gfx) error

$
0
0

Hi,

I installed Intel(R) Parallel Studio XE 2017 for Linux (Ubuntu 14.04) and I'm trying to write a simple C code to test Cilk Plus and specifically the pragma offload. I have a Intel(R) Iris Pro Graphics 6200 BroadWell GPU.

Here's my program :

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <cilk/cilk.h>

void sgemm(const float * A, const float * B, float * C, int N) {
   int i, j, k;
   #pragma offload target(gfx) in(A, B : length(N*N)) out(C : length(N*N))
   _Cilk_for (i = 0; i < N; i++) {
      _Cilk_for (j = 0; j < N; j++) {
         for (k = 0; k < N; k++) {
            C[i*N+j] += A[i*N+k] + y[k*N+j];
         }
      }
   }
}

void main() {
   int N = 1024;
   float * A = malloc(sizeof(float) * N*N);
   float * B = malloc(sizeof(float) * N*N);
   float * C = malloc(sizeof(float) * N*N);

   int i;
   for (i = 0; i < N; i++){
      A[i] = 1.0;
      B[i] = 2.0;
      C[i] = 0.0;
   }

   sgemm(A,B,C,N);

   for (i = 0; i < N; i++){
      assert(C[i] == 2048.0);
   }
}

It compiles using :

$ icc -qoffload=mandatory sgemm.c

but the execution gives the following error :

$ ./a.out
GFX(18:00:39): FATAL ERROR: cannot offload gfx program

So I'm just asking : do you see mistakes in my code or in my compilation line, and if not do you have any clue where should I need to search first ?

Thread Topic: 

Help Me

NaN boxing

$
0
0

Hi,

 

 

 

 

 

I am designing a class called Dynamic that can store many different types: a null, a boolean, a 48-bit signed integer, a 64-bit floating point, or a pointer to one of a few defined types. This object contains only one data member: a double.

In order to do that, I use the fact that there are many way to represent a NaN, and only 2 NaN needs to exist in the standard (this trick is known as NaN boxing and is heavily used in some javascript engines). If we look at the bits used to represent a NaN, we have (on a little endian machine):

[first 48 bits][4 bits][1111][1111][111|0]

The eleven 1 are placed at the exponent, and the 0 is placed at the sign bit. A double is a NaN when the eleven exponent bits are equal to 1 and one of the first 52 bits is not equal to 0.

Some experiments show that quiet NaN are represented by  [000...000][0001][1111][1111][1110] and signaling NaN are represented by [000...000][0010][1111][1111][1110].

Is it possible to have other NaNs with Intel compilers and the Intel libraries (MKL, SVML, etc) ?

 

OpenMP detects only a single core on multi-socket/multi-core system

$
0
0

I program in C++ and uses MPI/OpenMP for parallelization. The machine has 2 CPU sockets and 8 cores per each socket.
The program additionally uses c++11 threads. Their affinity is controlled by 'pthread_setaffinity_np' calls.

I compile with intel compiler (16.0.1), I set the following environment variables

export I_MPI_PERHOST=1
export I_MPI_FABRICS=tcp
export I_MPI_FALLBACK=0
export I_MPI_PIN=1
export I_MPI_PIN_DOMAIN=node
export OMP_NUM_THREADS=16
export KMP_AFFINITY=verbose,scatter

With verbose option, I can see the following messages when running the binary.

    [0] OMP: Info #204: KMP_AFFINITY: decoding x2APIC ids.
    [0] OMP: Info #202: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
    [0] OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: {0}
    [0] OMP: Info #156: KMP_AFFINITY: 1 available OS procs
    [0] OMP: Info #157: KMP_AFFINITY: Uniform topology
    [0] OMP: Info #159: KMP_AFFINITY: 1 packages x 1 cores/pkg x 1 threads/core (1 total cores)
    [0] OMP: Info #206: KMP_AFFINITY: OS proc to physical thread map:
    [0] OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 0 bound to OS proc set {0}
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 14 bound to OS proc set {0}
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 15 bound to OS proc set {0}
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 11 bound to OS proc set {0}
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 6 bound to OS proc set {0}
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 7 bound to OS proc set {0}
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 8 bound to OS proc set {0}
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 9 bound to OS proc set {0}
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 10 bound to OS proc set {0}
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 13 bound to OS proc set {0}
    [0] OMP: Info #242: KMP_AFFINITY: pid 12759 thread 12 bound to OS proc set {0}
    

As you can see, OMP cannot detect the correct number of packages (sockets) and cores per package. As a result, all the threads are pinned to a single core.

How can I resolve this issue? Where should I start?


AVX2/512: Surprising return types and parameter types

$
0
0

​Hi,

​while working with AVX-2 and -512, we noticed the following discrepancies:

1) Why does _mm256_i64gather_epi64 return an __m128i according to the documentation? We would expect an __m256i. Dash agrees.

2) Why is the AVX-512 stream load interface different from AVX2?​

extern __m256i _mm256_stream_load_si256(__m256i const *);
extern __m512i _mm512_stream_load_si512(void * mem_addr);

​Especially the missing constness is a problem (albeit minor) because it requires a const_cast that should be unnecessary.

​Thanks
Markus

"xilink.exe" exited with code -1073741515

$
0
0

I cannot link any Intel Compiler 17.0 Update 2 library Targets in Visual Studio 2015

Both static and dynamic libs fail with the following error

"xilink.exe" exited with code -1073741515

 

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\Intel C++ Compiler 17.0\Toolset.targets(1108,5): error MSB6006: "xilink.exe" exited with code -1073741515.

 

lambda capture [this]

$
0
0

V 17.0.132 Build 20161005

I am doing some template meta functions, and have made great progress.... up until now.

I have an object (struct), with a member function. I wish to construct a lambda capture of either:

auto x = [=]() { this->memvar = 0; };
auto x = [this]() { memvar = 0; };

In both cases, the this pointer is corrupted.

I've also tried, with no success:

myType* This = this;
auto x = [&]() { This->memvar = 0; };
auto x = [=]() { This->memvar = 0; };

I haven't done this, but I suspect I can create a static member function:

struct myType
{
  static void foo(myType* This) { This->memvar = 0; }

  //Then in some other non-static member function:
  void other()
  {
    myType* This = this;
    auto x = [=](){ foo(This); };
   }
};

*** Note, I am not using "auto x =", rather I am passing the lambda object on to a different template.
I do reach the code inside the capture, when the other template eventually gets there. The Disassembly looks OK. but the value of this ([this]) and This ([=]) is corrupt.

Any suggestions for cleaner code would be appreciated.

Jim Dempsey

Error compiling with Visual Studio 2015 Update 3 and Intel C++ Compiler 17.0

$
0
0

When trying to compile any project with the Intel C++ compiler 17.0, I get 100 compilation errors before the compilation aborts. I have not found any other topic describing the same problems, has anyone experienced the same and fixed it somehow? I have gotten these errors since the release of  VS2015 Update 3, on compiler versions 17.0, 17.0.1 and 17.0.2. I hoped the newer version would have fixed it, but sadly, it hasn't.

To be precise, I have:

Microsoft Visual Studio Enterprise 2015 - Update 3
Intel Parallel Studio XE 2017 Cluster Edition - Update 2

The compiler output looks like this:

4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(124): error : identifier "typename" is undefined
4>            template <typename _Ty>
4>                      ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(127): error : expected either a definition or a tag name
4>                enum : bool { __the_value = false };
4>                     ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(127): error : identifier "bool" is undefined
4>                enum : bool { __the_value = false };
4>                       ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(127): error : expected a ";"
4>                enum : bool { __the_value = false };
4>                            ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(130): error : identifier "typename" is undefined
4>            template <typename _Ty>
4>                      ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(131): error : expected an expression
4>            struct __vcrt_va_list_is_reference<_Ty&>
4>                                                   ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(130): error : constant "_Ty" is not used in or cannot be deduced from the template argument list of class template "__vcrt_va_list_is_reference<<error-constant>>"
4>            template <typename _Ty>
4>                               ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(136): error : identifier "typename" is undefined
4>            template <typename _Ty>
4>                      ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(137): error : expected an expression
4>            struct __vcrt_va_list_is_reference<_Ty&&>
4>                                                    ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(137): error : class template "__vcrt_va_list_is_reference" has already been defined
4>            struct __vcrt_va_list_is_reference<_Ty&&>
4>                   ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vadefs.h(142): error : identifier "typename" is undefined
4>            template <typename _Ty>
4>                      ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h(100): error : expected an identifier
4>    #define _CRT_UNPARENTHESIZE_(...) __VA_ARGS__
4>                                 ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h(101): error : expected an identifier
4>    #define _CRT_UNPARENTHESIZE(...)  _CRT_UNPARENTHESIZE_ __VA_ARGS__
4>                                ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h(204): error : identifier "bool" is undefined
4>        typedef bool  __vcrt_bool;
4>                ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h(249): error : identifier "typename" is undefined
4>            template <typename _CountofType, size_t _SizeOfArray>
4>                      ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h(250): error : expected a type specifier
4>            char (*__countof_helper(_UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
4>                                                             ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h(250): error : function returning array is not allowed
4>            char (*__countof_helper(_UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
4>                                                                     ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt.h(121): error : identifier "bool" is undefined
4>        template<bool _Enable, typename _Ty>
4>                 ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt.h(121): error : identifier "typename" is undefined
4>        template<bool _Enable, typename _Ty>
4>                               ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt.h(124): error : identifier "typename" is undefined
4>        template<typename _Ty>
4>                 ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt.h(125): error : identifier "true" is undefined
4>        struct _CrtEnableIf<true, _Ty>
4>                            ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt.h(124): error : constant "_Ty" is not used in or cannot be deduced from the template argument list of class template "_CrtEnableIf<<error-constant>, <error-constant>>"
4>        template<typename _Ty>
4>                          ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt.h(133): error : identifier "bool" is undefined
4>        typedef bool  __crt_bool;
4>                ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h(645): error : identifier "explicit" is undefined
4>    	explicit __thiscall _Lockit(int);	// set the lock
4>    	^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h(645): error : member function with the same name as its class must be a constructor
4>    	explicit __thiscall _Lockit(int);	// set the lock
4>    	                    ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h(646): error : expected a ";"
4>    	__thiscall ~_Lockit() _NOEXCEPT;	// clear the lock
4>    	                      ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h(658): error : expected a ";"
4>    	__CLR_OR_THIS_CALL _Lockit(const _Lockit&) = delete;
4>    	                                           ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h(659): error : expected a ";"
4>    	_Lockit& __CLR_OR_THIS_CALL operator=(const _Lockit&) = delete;
4>    	                                                      ^
4>
4>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\yvals.h(781): error : expected a ";"
4>    	__thiscall ~_Init_locks() _NOEXCEPT;
4>    	                          ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stddef.h(20): error : identifier "__nullptr" is undefined
4>            typedef decltype(__nullptr) nullptr_t;
4>                             ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stddef.h(20): error : expected a ";"
4>            typedef decltype(__nullptr) nullptr_t;
4>                                        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stddef.h(23): error : namespace "std" has no member "nullptr_t"
4>        using ::std::nullptr_t;
4>                     ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_search.h(184): error : invalid argument to attribute "deprecated"
4>        _Check_return_ _CRT_NONSTDC_DEPRECATE(_lfind)
4>                       ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_search.h(193): error : invalid argument to attribute "deprecated"
4>        _Check_return_ _CRT_NONSTDC_DEPRECATE(_lsearch)
4>                       ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(62): error : expected a ")"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(62): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(85): error : expected a ")"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(85): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(107): error : expected a ")"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(107): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(265): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE(_i64tow_s)
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(280): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE(_ui64tow_s)
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(360): error : expected a ")"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(360): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(373): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE(_wsplitpath_s)
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(415): error : invalid argument to attribute "deprecated"
4>        _Check_return_ _CRT_INSECURE_DEPRECATE(_wdupenv_s)
4>                       ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(462): error : expected a ")"
4>        __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_2_0(
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_wstdlib.h(462): error : invalid argument to attribute "deprecated"
4>        __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_2_0(
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(224): error : invalid argument to attribute "deprecated"
4>    _ACRTIMP _CRT_INSECURE_DEPRECATE(strerror) char** __cdecl __sys_errlist(void);
4>             ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(227): error : invalid argument to attribute "deprecated"
4>    _ACRTIMP _CRT_INSECURE_DEPRECATE(strerror) int * __cdecl __sys_nerr(void);
4>             ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(235): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE_GLOBALS(_get_pgmptr ) _ACRTIMP char**    __cdecl __p__pgmptr (void);
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(236): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE_GLOBALS(_get_wpgmptr) _ACRTIMP wchar_t** __cdecl __p__wpgmptr(void);
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(237): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE_GLOBALS(_get_fmode  ) _ACRTIMP int*      __cdecl __p__fmode  (void);
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(632): error : expected a ")"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(632): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(655): error : expected a ")"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(655): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(678): error : expected a ")"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(678): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(695): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE(_i64toa_s)
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(711): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE(_ui64toa_s)
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(750): error : invalid argument to attribute "deprecated"
4>    _Check_return_ _CRT_INSECURE_DEPRECATE(_ecvt_s)
4>                   ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(780): error : invalid argument to attribute "deprecated"
4>    _Check_return_ _CRT_INSECURE_DEPRECATE(_fcvt_s)
4>                   ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(804): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE(_gcvt_s)
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(915): error : expected a ")"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(915): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(941): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_SIZE_EX(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(953): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE(wctomb_s)
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(959): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE(_wctomb_s_l)
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1003): error : expected a ")"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1003): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1029): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_3_SIZE_EX(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1086): error : expected a ")"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1086): error : invalid argument to attribute "deprecated"
4>    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4(
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1095): error : invalid argument to attribute "deprecated"
4>    _CRT_INSECURE_DEPRECATE(_splitpath_s)
4>    ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1182): error : invalid argument to attribute "deprecated"
4>        _Check_return_ _CRT_INSECURE_DEPRECATE(_dupenv_s)
4>                       ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1246): error : expected a ")"
4>        __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_2_0(
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1246): error : invalid argument to attribute "deprecated"
4>        __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_2_0(
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1254): error : invalid argument to attribute "deprecated"
4>        _CRT_OBSOLETE(SetErrorMode)
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1259): error : invalid argument to attribute "deprecated"
4>        _CRT_OBSOLETE(Beep)
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1265): error : invalid argument to attribute "deprecated"
4>        _CRT_OBSOLETE(Sleep)
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1292): error : invalid argument to attribute "deprecated"
4>        _Check_return_ _CRT_NONSTDC_DEPRECATE(_ecvt) _CRT_INSECURE_DEPRECATE(_ecvt_s)
4>                       ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1292): error : invalid argument to attribute "deprecated"
4>        _Check_return_ _CRT_NONSTDC_DEPRECATE(_ecvt) _CRT_INSECURE_DEPRECATE(_ecvt_s)
4>                                                     ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1300): error : invalid argument to attribute "deprecated"
4>        _Check_return_ _CRT_NONSTDC_DEPRECATE(_fcvt) _CRT_INSECURE_DEPRECATE(_fcvt_s)
4>                       ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1300): error : invalid argument to attribute "deprecated"
4>        _Check_return_ _CRT_NONSTDC_DEPRECATE(_fcvt) _CRT_INSECURE_DEPRECATE(_fcvt_s)
4>                                                     ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1308): error : invalid argument to attribute "deprecated"
4>        _CRT_NONSTDC_DEPRECATE(_gcvt) _CRT_INSECURE_DEPRECATE(_fcvt_s)
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1308): error : invalid argument to attribute "deprecated"
4>        _CRT_NONSTDC_DEPRECATE(_gcvt) _CRT_INSECURE_DEPRECATE(_fcvt_s)
4>                                      ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1315): error : invalid argument to attribute "deprecated"
4>        _CRT_NONSTDC_DEPRECATE(_itoa) _CRT_INSECURE_DEPRECATE(_itoa_s)
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1315): error : invalid argument to attribute "deprecated"
4>        _CRT_NONSTDC_DEPRECATE(_itoa) _CRT_INSECURE_DEPRECATE(_itoa_s)
4>                                      ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1322): error : invalid argument to attribute "deprecated"
4>        _CRT_NONSTDC_DEPRECATE(_ltoa) _CRT_INSECURE_DEPRECATE(_ltoa_s)
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1322): error : invalid argument to attribute "deprecated"
4>        _CRT_NONSTDC_DEPRECATE(_ltoa) _CRT_INSECURE_DEPRECATE(_ltoa_s)
4>                                      ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1330): error : invalid argument to attribute "deprecated"
4>        _CRT_NONSTDC_DEPRECATE(_swab)
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1337): error : invalid argument to attribute "deprecated"
4>        _CRT_NONSTDC_DEPRECATE(_ultoa) _CRT_INSECURE_DEPRECATE(_ultoa_s)
4>        ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1337): error : invalid argument to attribute "deprecated"
4>        _CRT_NONSTDC_DEPRECATE(_ultoa) _CRT_INSECURE_DEPRECATE(_ultoa_s)
4>                                       ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdlib.h(1348): error : invalid argument to attribute "deprecated"
4>            _Check_return_ _CRT_NONSTDC_DEPRECATE(_putenv)
4>                           ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\float.h(231): error : invalid argument to attribute "deprecated"
4>    _CRT_MANAGED_FP_DEPRECATE _CRT_INSECURE_DEPRECATE(_controlfp_s)
4>                              ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(293): error : identifier "bool" is undefined
4>        _Check_return_ inline bool signbit(_In_ float _X) throw()
4>                              ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(298): error : identifier "bool" is undefined
4>        _Check_return_ inline bool signbit(_In_ double _X) throw()
4>                              ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(303): error : identifier "bool" is undefined
4>        _Check_return_ inline bool signbit(_In_ long double _X) throw()
4>                              ^
4>
4>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(389): error : identifier "bool" is undefined
4>        _Check_return_ inline bool isfinite(_In_ _Ty _X) throw()
4>                              ^
4>

 

Zone: 

Removing Parallel Studio 2017

$
0
0

Hello,

I have Parallel Studio 2016 Cluster version installed. As the new 2017 version came out I downloaded to try it out. Of course, it installed itself inside my Visual Studio 2013. After trying it out I went ahead an uninstalled it. I also reinstalled Parallel Studio 2016. But now I have problems.

As I open my project I get a message "An exception has been encountered. This may be caused by an extension. You can get more information by examining the file ...\VisualStudio\12.0\ActivityLog.xml". I looked into that file and there are several errors I don't know how to resolve:

1) Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
          C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\INTEL\DEBUGGEREXTENSION\MIC\LAUNCHER\MIDebugLauncher.dll

2) System.IO.FileNotFoundException: Could not load file or assembly 'Intel.Misc.Utilities, Version=17.0.12.0, Culture=neutral, PublicKeyToken=5caa3becd8c4c9ee' or one of its dependencies. The system cannot find the file specified. File name: 'Intel.Misc.Utilities, Version=17.0.12.0, Culture=neutral, PublicKeyToken=5caa3becd8c4c9ee' at Intel.Compiler.IDE.OptReports.DB.DBUtilities..ctor() at Intel.Compiler.IDE.OptReports.DB.DBUtilities.GetInstance() at Intel.CommonTools.CompilerReportProvider.UpdateCompilerToolWindows(EventKind event, Boolean showPane) at Intel.CommonTools.Annotations.AnnotationFactory.UpdateAnnotationTags() at Intel.CommonTools.Annotations.AnnotationFactory..ctor(IWpfTextView view, ITagAggregator`1 annotationTagAggregator) at Intel.CommonTools.Annotations.AnnotationFactory.<>c__DisplayClass1.<GetInstance>b__0() at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator) at Intel.CommonTools.Annotations.AnnotationFactory.GetInstance(IWpfTextView textView, ITagAggregator`1 annotationTagAggregator) at Intel.CommonTools.Annotations.AnnotationFactoriesProvider.Create(IWpfTextView textView) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.<BindContentTypeSpecificAssets>b__8(ILineTransformSourceProvider p) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Note that item (2) above refers to version 17 of Intel.Misc.Utilities. I wonder whether this is related to Parallel Studio 2017 which has been removed but somehow left a trace of it inside Visual Studio 2013 that was not removed when I uninstalled it. Also, the suggestions regarding the registry value wasn't of much help as I was unable to find it.

Can somebody help me clean up my Visual Studio 2013 installation? I've tried uninstalling and reinstalling VS. It only made things worse: item (1) did not appear before and now it does.

Thanks.

Zone: 

Bug Report: icc 17

$
0
0

Hi,

https://godbolt.org/g/lrH8Dy
struct A {
  template <class T> auto func(T t) -> decltype(T::other);
};

struct B: A {
  template <class T> auto func(T t) -> decltype(T::other);
  using A::func;
};

struct P { int other; };

void call(B b, P p) {
  b.func(p);
}
icc considers the call ambiguous when it should hide the base class declarations.
See also [namespace.udecl](15):"When a using-declaration brings declarations
from a base class into a derived class, member functions and member function
templates in the derived class override and/or hide member functions and member
function templates with the same name, parameter-type-list (8.3.5), cv-qualification,
and ref-qualifier (if any) in a base class (rather than conflicting). Such hidden or
overridden declarations are excluded from the set of declarations introduced by the
using-declaration."

Cheers,

Xavi

Thread Topic: 

Bug Report

False positive: warning #1125: function ${A} is hidden by function ${B}

$
0
0
struct A {
 private:
  virtual void foo() {}  // Side-info: template-method pattern in the real code.
};

struct B : public A {
 private:
  void foo(int) {}
};

The warning is stating that A::foo is hidden by B::foo.

A::foo() is private and cannot be called from B, anyway.

The warning does not happen if A::foo is not virtual.

The compiler version is icpc (ICC) 17.0.1 20161005.

Thread Topic: 

Bug Report

Integration between Intel® System Studio Professional Edition and Microsoft Visual Studio

$
0
0

I have installed on both of my computers Microsoft Visual Studio Ultimate 2013 Version 12.0.40629.00 Update 5 and Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3. I have also installed Intel® System Studio Professional Edition Version 2017 Update 1 twice, first time using system_studio_2017.1.045_online.exe and after using system_studio_2017.1.045.exe. In both times and on both of my computers, I could not use Intel C++ Compiler inside both version of Microsoft Visual Studio (MVS). By the way, the only thing that integrates with MVS is the Intel Inspector after installing the Update 2. Is there something wrong with system_studio_2017.1.045_online.exe or system_studio_2017.1.045.exe? Or must I do something else in order to integrate Intel C++ Compilers with Microsoft Visual Studio?

Thread Topic: 

How-To

C++ and Fortran linking

$
0
0

Hello,

I'm trying to link C++ and fortran prorgam together, but I get the following error

/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':

(.text+0x20): undefined reference to `main'

The main program is fortran, calling a C routine. The linking must be done using C compiler (Because in my work I'm in fact compiling with nvcc (nvidia compiler for cuda) and the linking then can not be done using fortran compiler). I didn't find on the web anything that worked.

Moreover, GNU compiler is working fine (I pasted the test code at the end),

g++  -lstdc++ -g -c add.c
g++ -g -o main main.o add.o -lstdc++ -lgfortran

and then,

 Hola
 a+b =            3           6           9          12          15

But compilation with Intel compiler fails,

ifort -cxxlib -lstdc++ -g -c main.f90
icpc -cxxlib -lstdc++ -g -c add.c
icpc -g -o main main.o add.o -lstdc++ -lifcore
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
Makefile:12: recipe for target 'main' failed
make: *** [main] Error 1

Does someone know what is wrong with my compilation?

Thank you,

Marc Barbry

The C code (add.c),

#include <stdlib.h>
#include <stdio.h>
#include "add.h"

extern "C" void addition_(int *a, int *b, int *c, int *Np)
{
  int N = *Np;
  int i;

  for (i=0; i<N; i++)
  {
    c[i] = a[i] + b[i];
  }

}

C header (add.h),

extern "C" void addition_(int *a, int *b, int *c, int *Np);

and Fortran code (main.f90),

program main

  implicit none
  integer, allocatable :: a(:), b(:), c(:)
  integer :: i, N

  N = 5
  print*, 'Hola'

  allocate(a(N))
  allocate(b(N))
  allocate(c(N))
  c = 0

  do i=1, N
    a(i) = i
    b(i) = 2*i
  enddo

  call addition(a, b, c, N)

  print*, "a+b = ", c

  deallocate(a)
  deallocate(b)
  deallocate(c)

end program

 

Thread Topic: 

Help Me

internal error: 010101_14277

$
0
0

Hello,

Attached is a (preprocessed) source file that triggers the error.

> /opt/intel/compilers_and_libraries/linux/bin/intel64/icpc --version                                                    
icpc (ICC) 17.0.2 20170213
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.

> /opt/intel/compilers_and_libraries/linux/bin/intel64/icpc code.cpp
": internal error: 010101_14277

Thanks,
Matthias

AttachmentSize
Downloadtext/x-c++srccode.cpp57.45 KB

Issue with O2/O3 optimisation using Intel compiler 2017 update 2

$
0
0

Hello,

While trying to compare parallelism between OMP, MPI, Cuda and OpenACC, I've encountered some dangerous behavior using the "Intel ICPC 17.0.2 20170213". The code below is solving the classical temperature distribution in 2D (just for test):

// /opt/intel/bin/icpc -O2 main.cpp && time ./a.out
#include <iostream>
#include <cmath>

int main()
{

  const int nx = 2800;
  const int ny = 2800;
  const float lx = 1.f;
  const float ly = 1.f;
  float dx = lx / (float)nx;
  float dy = ly / (float)ny;
  const float lambda = 0.001f;
  float dt = 0.01f/lambda/(1.0f/(dx*dx)/12.f+1.0f/(dy*dy)/12.f);
  float dtdx = dt*lambda/dx/dx/12.f;
  float dtdy = dt*lambda/dy/dy/12.f;

  int nxt = nx + 4;
  int nyt = ny + 4;

  float* T = new float[nxt*nyt];
  float* Told = new float[nxt*nyt];

  for (int i = 0; i < nxt; i++) {
    for (int j = 0; j < nyt; j++) {
      int ind = i*nyt + j;
      T[ind] = 1.0f + exp(-32.f*(pow((float)(j-nyt/2)/(float)nyt,2)+pow((float)(i-nxt/2)/(float)nxt,2)));
      Told[ind] = T[ind];
    }
  }

  for (int step=0; step<1000; step++) {

    for (int i = 2; i < nxt-2; i++) {
      for (int j = 2; j < nyt-2; j++) {
        int ind = i*nyt + j;
        T[ind] = Told[ind] + dtdx * (-Told[(i-2)*nyt + (j)]+16.f*Told[(i-1)*nyt + (j)]-30.f*Told[(i)*nyt + (j)]+16.f*Told[(i+1)*nyt + (j)]-Told[(i+2)*nyt + (j)])
        + dtdy * (-Told[(i)*nyt + (j-2)]+16.f*Told[(i)*nyt + (j-1)]-30.f*Told[(i)*nyt + (j)]+16.f*Told[(i)*nyt + (j+1)]-Told[(i)*nyt + (j+2)]);
      }
    }

    for (int i = 0; i < nxt*nyt; i++) {
        Told[i] = T[i];
    }

  }

  float sum = 0.0f;
  for (int i = 0; i < nxt*nyt; i++) {
      sum += T[i];
  }

  std::cout << sum/(float)(nxt*nyt) << std::endl;

  return 0;
}

After 1000 "time" iterations, the code is supposed to give the results: 1.08712 (using O0 or O1 compile flag)

Without any parallelism (no openmp), the code is compiled with O2 optimisation and gives the following (wrong) results: 1.09783

/opt/intel/bin/icpc -O2 main.cpp && time ./a.out

Using LLVM C++ (Apple) or GNU G++, with O2 or even O3 optimization flag, gives good results (1.08712).

It seems that Intel compiler with O2 or O3 compile flag does aggressive optimizations on floating-point data. In order to get the good result, -fp-model precise flag needs to be added to the command line.

Why does the O2 flag create such aggressive optimizations? (while GNU or LLVM does not) I mean, I know that O3 can be a dangerous flag to use but I thought O2 was, a least, usable. If you are not aware of the -fp-model flag, your results may be completely wrong...

Thank you.

Thread Topic: 

Question

compatibility with GCC 5.x and later built-in functions

$
0
0

GCC 5.x and later support built-in functions for overflow checking [1]  that are unsupported by Intel C/C++ in versions including the recently released 2017.0.2.174 / 20170213. This creates issues when the system gcc compilers are newer than 4.9.x and users would like to use GCC 5 or later to allow for AVX 512 support in their code.

An example of this issue might include the following error building m4 from source with GCC 5.4.0:

m4-1.4.18/lib/xalloc.h:107: undefined reference to `__builtin_mul_overflow'

Is there a better general workaround than setting -no-gcc or forcing __GNUC__, __GNUC_MINOR__, and __GNUC_PATCHLEVEL__ to an older version of GCC?

[1] https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html

Viewing all 1175 articles
Browse latest View live


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