Kobzol/hardware-effects

Intel Compiler problem

fpnick opened this issue · 2 comments

Hi,

I tried to compile everything with the Intel compilers and the first thing that happened was the same as in #3. This can be easily fixed by #if defined(__clang__) || defined(__INTEL_COMPILER) in software-prefetching.cpp.

Next, the following error comes up:

[ 96%] Building CXX object prefetching/CMakeFiles/software-prefetching.dir/software-prefetching.cpp.o
/home/fnick/hardware-effects/prefetching/software-prefetching.cpp(37): error: argument of type "Type *" is incompatible with parameter of type "const char *"
              if (Prefetch) _mm_prefetch(memory[j + distance], Hint);
                                         ^
          detected during instantiation of "size_t={unsigned long} test_memory<Prefetch,Hint>(const std::vector<Type *, std::allocator<Type *>> &, int) [with Prefetch=true, Hint=(unsigned char)'\001']" at line 79

/home/fnick/hardware-effects/prefetching/software-prefetching.cpp(37): error: argument of type "Type *" is incompatible with parameter of type "const char *"
              if (Prefetch) _mm_prefetch(memory[j + distance], Hint);
                                         ^
          detected during instantiation of "size_t={unsigned long} test_memory<Prefetch,Hint>(const std::vector<Type *, std::allocator<Type *>> &, int) [with Prefetch=true, Hint=(unsigned char)'\002']" at line 80

/home/fnick/hardware-effects/prefetching/software-prefetching.cpp(37): error: argument of type "Type *" is incompatible with parameter of type "const char *"
              if (Prefetch) _mm_prefetch(memory[j + distance], Hint);
                                         ^
          detected during instantiation of "size_t={unsigned long} test_memory<Prefetch,Hint>(const std::vector<Type *, std::allocator<Type *>> &, int) [with Prefetch=true, Hint=(unsigned char)'\003']" at line 81

/home/fnick/hardware-effects/prefetching/software-prefetching.cpp(37): error: argument of type "Type *" is incompatible with parameter of type "const char *"
              if (Prefetch) _mm_prefetch(memory[j + distance], Hint);
                                         ^
          detected during instantiation of "size_t={unsigned long} test_memory<Prefetch,Hint>(const std::vector<Type *, std::allocator<Type *>> &, int) [with Prefetch=true, Hint=(unsigned char)'\000']" at line 82

/home/fnick/hardware-effects/prefetching/software-prefetching.cpp(37): error: argument of type "Type *" is incompatible with parameter of type "const char *"
              if (Prefetch) _mm_prefetch(memory[j + distance], Hint);
                                         ^
          detected during instantiation of "size_t={unsigned long} test_memory<Prefetch,Hint>(const std::vector<Type *, std::allocator<Type *>> &, int) [with Prefetch=false, Hint=(unsigned char)'\001']" at line 86

Might be my mistake though, any hints? If any testing is required with the Intel Compilers, I'm happy to help...

Hi! Thanks for reporting this, it's kinda difficult to setup the Intel compiler on Travis :) I modified the code and it seems to work now on ICC 2019, can you check please?

The first issue is gone, but the error regarding memory still appears for me with ICC 18.0.1.
Switching to 18.0.2, the error is gone though. We don't have 2019 available just yet.