Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling Errors #2

Closed
ghost opened this issue May 29, 2019 · 5 comments
Closed

Compiling Errors #2

ghost opened this issue May 29, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented May 29, 2019

Hello,

I am currently working on a Presentation for my University about PEIGEN. So i took a look in the README file and try to compile a simple code, but I got a few errors while compiling. Any Advice what this is all about?

Code

#include "func.hpp"
#include <iostream>

using namespace Peigen;
using namespace std;

int main(){
    function_t<4> S("0c05060b09000a0d030e0f0804070102");
    cout << S.show_LUT() << endl;
    return 0;
}

Console Output

C:\Users\Pennypacker19\Desktop\Peigen Clone\PEIGEN>g++ ztest1.cpp
In file included from func.hpp:41:0,
                 from ztest1.cpp:1:
constants.hpp: In member function 'int OPs_t<N>::cnt_1(bit_slice_l_t<N>&) const':
constants.hpp:609:44: error: there are no arguments to '_mm_popcnt_u64' that depend on a template parameter, so a declaration of '_mm_popcnt_u64' must be available [-fpermissive]
       sum = _mm_popcnt_u64((uint64_t)lhs[0]);
                                            ^
constants.hpp:609:44: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
constants.hpp:614:45: error: there are no arguments to '_mm_popcnt_u64' that depend on a template parameter, so a declaration of '_mm_popcnt_u64' must be available [-fpermissive]
       sum += _mm_popcnt_u64((uint64_t)lhs[i]);
                                             ^
In file included from ztest1.cpp:1:0:
func.hpp: In member function 'void Peigen::function_t<N>::bit_slice_to_LUT() [with int N = 4]':
func.hpp:381:61: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
         const __m128i mask = _mm_set_epi64x(0x0, 0xffffffULL);
                                                             ^
In file included from func.hpp:41:0,
                 from ztest1.cpp:1:
constants.hpp: In function 'void __static_initialization_and_destruction_0(int, int)':
constants.hpp:273:46: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
 const __m256i zero_256 = _mm256_setzero_si256();
                          ~~~~~~~~~~~~~~~~~~~~^~

PS: I hope I use the Git Syntax right, if not sorry, first time I post here.

@FreeDisciplina
Copy link
Member

FreeDisciplina commented May 29, 2019

Could you try this:
g++ -fopenmp -mavx2 -std=c++14 -O3 -Wall -Wextra -pedantic ztest1.cpp

There is a 'Makefile' can be referred to.

Besides, have to ensure that the computer supports SSE/AVX2/POPCNT.
Please refer to #1 to check whether the CPU supports SSE/AVX2/POPCNT if encounter runtime error.

@ghost
Copy link
Author

ghost commented May 29, 2019

I tried it, the result was:

C:\Users\Pennypacker19\Desktop\Peigen Clone\PEIGEN>g++ -fopenmp -mavx2 -std=c++14 -O3 -Wall -Wextra -pedantic ztest1.cpp
In file included from func.hpp:41:0,
                 from ztest1.cpp:1:
constants.hpp: In member function 'int OPs_t<N>::cnt_1(bit_slice_l_t<N>&) const':
constants.hpp:609:44: error: there are no arguments to '_mm_popcnt_u64' that depend on a template parameter, so a declaration of '_mm_popcnt_u64' must be available [-fpermissive]
       sum = _mm_popcnt_u64((uint64_t)lhs[0]);
                                            ^
constants.hpp:609:44: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
constants.hpp:614:45: error: there are no arguments to '_mm_popcnt_u64' that depend on a template parameter, so a declaration of '_mm_popcnt_u64' must be available [-fpermissive]
       sum += _mm_popcnt_u64((uint64_t)lhs[i]);
                                             ^
constants.hpp: In member function 'void OPs_t<N>::gen_subspaces(std::vector<std::vector<std::vector<unsigned char> > >&)':
constants.hpp:666:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    for (int i=0; i<=(N0-M0); i++) A0[i] = 0; for (int i=N0-M0+1; i<=N0; i++) A0[i] = 1;
    ^~~
constants.hpp:666:46: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
    for (int i=0; i<=(N0-M0); i++) A0[i] = 0; for (int i=N0-M0+1; i<=N0; i++) A0[i] = 1;
                                              ^~~
In file included from constants.hpp:1196:0,
                 from func.hpp:41,
                 from ztest1.cpp:1:
subspaces.hpp: In lambda function:
subspaces.hpp:77:10: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
          for (int i=0; i<=(N0-M0); i++) A0[i] = 0; for (int i=N0-M0+1; i<=N0; i++) A0[i] = 1;
          ^~~
subspaces.hpp:77:52: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
          for (int i=0; i<=(N0-M0); i++) A0[i] = 0; for (int i=N0-M0+1; i<=N0; i++) A0[i] = 1;
                                                    ^~~
In file included from ztest1.cpp:1:0:
func.hpp: In instantiation of 'void Peigen::function_t<N>::bit_slice_to_LUT() [with int N = 4]':
func.hpp:131:23:   required from 'void Peigen::function_t<N>::parse_function(std::__cxx11::string) [with int N = 4; std::__cxx11::string = std::__cxx11::basic_string<char>]'
func.hpp:109:19:   required from 'Peigen::function_t<N>::function_t(std::__cxx11::string) [with int N = 4; std::__cxx11::string = std::__cxx11::basic_string<char>]'
ztest1.cpp:8:55:   required from here
func.hpp:394:41: warning: overflow in implicit constant conversion [-Woverflow]
         const __m128i smm = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x7, 0x5, 0x3, 0x1, 0x80, 0x80, 0x80, 0x80, 0x6, 0x4, 0x2, 0x0);
                             ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
func.hpp:394:41: warning: overflow in implicit constant conversion [-Woverflow]
func.hpp:394:41: warning: overflow in implicit constant conversion [-Woverflow]
func.hpp:394:41: warning: overflow in implicit constant conversion [-Woverflow]
func.hpp:394:41: warning: overflow in implicit constant conversion [-Woverflow]
func.hpp:394:41: warning: overflow in implicit constant conversion [-Woverflow]
func.hpp:394:41: warning: overflow in implicit constant conversion [-Woverflow]
func.hpp:394:41: warning: overflow in implicit constant conversion [-Woverflow]

I have the Intel CPU i7-3820, it Supports SSE4.2 & AVX. Is this the problem?
I also tried it with a newer CPU (i5-6300U CPU) which supports SSE4.1, SSE4.2 and AVX2. I will also post the Result.

Regards

@ghost
Copy link
Author

ghost commented May 29, 2019

The result with the i5-6300U CPU looks even worse:

C:\Users\Pennypacker19NR2\Desktop\PEIGEN-master>g++ -fopenmp -std=c++14 -O3 -Wall -Wextra -pedantic ztest.cpp
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:137: warning: "UINT_MAX" redefined
 #define UINT_MAX (numeric_limits<UINT_<N> >::max())

In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/x86_64-w64-mingw32/include/stdlib.h:10,
                 from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cstdlib:75,
                 from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/stl_algo.h:59,
                 from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/algorithm:62,
                 from constants.hpp:42,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed/limits.h:124: note: this is the location of the previous definition
 #define UINT_MAX (INT_MAX * 2U + 1U)

In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp: In member function 'void OPs_t<N>::gen_subspaces(std::vector<std::vector<std::vector<unsigned char> > >&)':
constants.hpp:666:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    for (int i=0; i<=(N0-M0); i++) A0[i] = 0; for (int i=N0-M0+1; i<=N0; i++) A0[i] = 1;
    ^~~
constants.hpp:666:46: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
    for (int i=0; i<=(N0-M0); i++) A0[i] = 0; for (int i=N0-M0+1; i<=N0; i++) A0[i] = 1;
                                              ^~~
In file included from constants.hpp:1196,
                 from func.hpp:41,
                 from ztest.cpp:1:
subspaces.hpp: In lambda function:
subspaces.hpp:77:10: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
          for (int i=0; i<=(N0-M0); i++) A0[i] = 0; for (int i=N0-M0+1; i<=N0; i++) A0[i] = 1;
          ^~~
subspaces.hpp:77:52: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
          for (int i=0; i<=(N0-M0); i++) A0[i] = 0; for (int i=N0-M0+1; i<=N0; i++) A0[i] = 1;
                                                    ^~~
In file included from ztest.cpp:1:
func.hpp: In instantiation of 'void Peigen::function_t<N>::bit_slice_to_LUT() [with int N = 4]':
func.hpp:131:7:   required from 'void Peigen::function_t<N>::parse_function(std::__cxx11::string) [with int N = 4; std::__cxx11::string = std::__cxx11::basic_string<char>]'
func.hpp:109:5:   required from 'Peigen::function_t<N>::function_t(std::__cxx11::string) [with int N = 4; std::__cxx11::string = std::__cxx11::basic_string<char>]'
ztest.cpp:8:55:   required from here
func.hpp:394:42: warning: overflow in conversion from 'int' to 'char' changes value from '128' to ''\37777777600'' [-Woverflow]
         const __m128i smm = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x7, 0x5, 0x3, 0x1, 0x80, 0x80, 0x80, 0x80, 0x6, 0x4, 0x2, 0x0);
                                          ^~~~
func.hpp:394:48: warning: overflow in conversion from 'int' to 'char' changes value from '128' to ''\37777777600'' [-Woverflow]
         const __m128i smm = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x7, 0x5, 0x3, 0x1, 0x80, 0x80, 0x80, 0x80, 0x6, 0x4, 0x2, 0x0);
                                                ^~~~
func.hpp:394:54: warning: overflow in conversion from 'int' to 'char' changes value from '128' to ''\37777777600'' [-Woverflow]
         const __m128i smm = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x7, 0x5, 0x3, 0x1, 0x80, 0x80, 0x80, 0x80, 0x6, 0x4, 0x2, 0x0);
                                                      ^~~~
func.hpp:394:60: warning: overflow in conversion from 'int' to 'char' changes value from '128' to ''\37777777600'' [-Woverflow]
         const __m128i smm = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x7, 0x5, 0x3, 0x1, 0x80, 0x80, 0x80, 0x80, 0x6, 0x4, 0x2, 0x0);
                                                            ^~~~
func.hpp:394:86: warning: overflow in conversion from 'int' to 'char' changes value from '128' to ''\37777777600'' [-Woverflow]
         const __m128i smm = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x7, 0x5, 0x3, 0x1, 0x80, 0x80, 0x80, 0x80, 0x6, 0x4, 0x2, 0x0);
                                                                                      ^~~~
func.hpp:394:92: warning: overflow in conversion from 'int' to 'char' changes value from '128' to ''\37777777600'' [-Woverflow]
         const __m128i smm = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x7, 0x5, 0x3, 0x1, 0x80, 0x80, 0x80, 0x80, 0x6, 0x4, 0x2, 0x0);
                                                                                            ^~~~
func.hpp:394:98: warning: overflow in conversion from 'int' to 'char' changes value from '128' to ''\37777777600'' [-Woverflow]
         const __m128i smm = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x7, 0x5, 0x3, 0x1, 0x80, 0x80, 0x80, 0x80, 0x6, 0x4, 0x2, 0x0);
                                                                                                  ^~~~
func.hpp:394:104: warning: overflow in conversion from 'int' to 'char' changes value from '128' to ''\37777777600'' [-Woverflow]
         const __m128i smm = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x7, 0x5, 0x3, 0x1, 0x80, 0x80, 0x80, 0x80, 0x6, 0x4, 0x2, 0x0);
                                                                                                        ^~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp: In function 'void __static_initialization_and_destruction_0(int, int)':
constants.hpp:273:46: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
 const __m256i zero_256 = _mm256_setzero_si256();
                          ~~~~~~~~~~~~~~~~~~~~^~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '__m256i _mm256_set_epi64x(long long int, long long int, long long int, long long int)': target specific option mismatch
 _mm256_set_epi64x (long long __A, long long __B, long long __C,
 ^~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:321:53: note: called from here
 const __m256i S4_comps_deg_mask1 = _mm256_set_epi64x(0x0116011601160116ULL, 0x0116011601160116ULL, 0x0116011601160116ULL, 0x0116011601160116ULL); // 0000 0001 0001 0110
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '__m256i _mm256_set_epi64x(long long int, long long int, long long int, long long int)': target specific option mismatch
 _mm256_set_epi64x (long long __A, long long __B, long long __C,
 ^~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:320:53: note: called from here
 const __m256i S4_comps_deg_mask2 = _mm256_set_epi64x(0x1668166816681668ULL, 0x1668166816681668ULL, 0x1668166816681668ULL, 0x1668166816681668ULL); // 0001 0110 0110 1000
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '__m256i _mm256_set_epi64x(long long int, long long int, long long int, long long int)': target specific option mismatch
 _mm256_set_epi64x (long long __A, long long __B, long long __C,
 ^~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:319:53: note: called from here
 const __m256i S4_comps_deg_mask3 = _mm256_set_epi64x(0x6880688068806880ULL, 0x6880688068806880ULL, 0x6880688068806880ULL, 0x6880688068806880ULL); // 0110 1000 1000 0000
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '__m256i _mm256_set_epi64x(long long int, long long int, long long int, long long int)': target specific option mismatch
 _mm256_set_epi64x (long long __A, long long __B, long long __C,
 ^~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:318:53: note: called from here
 const __m256i S4_comps_deg_mask4 = _mm256_set_epi64x(0x8000800080008000ULL, 0x8000800080008000ULL, 0x8000800080008000ULL, 0x8000800080008000ULL); // 1000 0000 0000 0000
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '__m256i _mm256_set_epi64x(long long int, long long int, long long int, long long int)': target specific option mismatch
 _mm256_set_epi64x (long long __A, long long __B, long long __C,
 ^~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:317:53: note: called from here
 const __m256i S4_comps_ind_mask  = _mm256_set_epi64x(0x8000800080008000ULL, 0x8000800080008000ULL, 0x8000800080008000ULL, 0x8000800080008000ULL);                                                                                                                                           // fedc ba98 7654 3210
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1234:1: error: inlining failed in call to always_inline '__m256i _mm256_setzero_si256()': target specific option mismatch
 _mm256_setzero_si256 (void)
 ^~~~~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:273:46: note: called from here
 const __m256i zero_256 = _mm256_setzero_si256();
                          ~~~~~~~~~~~~~~~~~~~~^~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1234:1: error: inlining failed in call to always_inline '__m256i _mm256_setzero_si256()': target specific option mismatch
 _mm256_setzero_si256 (void)
 ^~~~~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:273:46: note: called from here
 const __m256i zero_256 = _mm256_setzero_si256();
                          ~~~~~~~~~~~~~~~~~~~~^~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '__m256i _mm256_set_epi64x(long long int, long long int, long long int, long long int)': target specific option mismatch
 _mm256_set_epi64x (long long __A, long long __B, long long __C,
 ^~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:321:53: note: called from here
 const __m256i S4_comps_deg_mask1 = _mm256_set_epi64x(0x0116011601160116ULL, 0x0116011601160116ULL, 0x0116011601160116ULL, 0x0116011601160116ULL); // 0000 0001 0001 0110
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '__m256i _mm256_set_epi64x(long long int, long long int, long long int, long long int)': target specific option mismatch
 _mm256_set_epi64x (long long __A, long long __B, long long __C,
 ^~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:320:53: note: called from here
 const __m256i S4_comps_deg_mask2 = _mm256_set_epi64x(0x1668166816681668ULL, 0x1668166816681668ULL, 0x1668166816681668ULL, 0x1668166816681668ULL); // 0001 0110 0110 1000
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '__m256i _mm256_set_epi64x(long long int, long long int, long long int, long long int)': target specific option mismatch
 _mm256_set_epi64x (long long __A, long long __B, long long __C,
 ^~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:319:53: note: called from here
 const __m256i S4_comps_deg_mask3 = _mm256_set_epi64x(0x6880688068806880ULL, 0x6880688068806880ULL, 0x6880688068806880ULL, 0x6880688068806880ULL); // 0110 1000 1000 0000
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '__m256i _mm256_set_epi64x(long long int, long long int, long long int, long long int)': target specific option mismatch
 _mm256_set_epi64x (long long __A, long long __B, long long __C,
 ^~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:318:53: note: called from here
 const __m256i S4_comps_deg_mask4 = _mm256_set_epi64x(0x8000800080008000ULL, 0x8000800080008000ULL, 0x8000800080008000ULL, 0x8000800080008000ULL); // 1000 0000 0000 0000
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/immintrin.h:41,
                 from constants.hpp:65,
                 from func.hpp:41,
                 from ztest.cpp:1:
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avxintrin.h:1295:1: error: inlining failed in call to always_inline '__m256i _mm256_set_epi64x(long long int, long long int, long long int, long long int)': target specific option mismatch
 _mm256_set_epi64x (long long __A, long long __B, long long __C,
 ^~~~~~~~~~~~~~~~~
In file included from func.hpp:41,
                 from ztest.cpp:1:
constants.hpp:317:53: note: called from here
 const __m256i S4_comps_ind_mask  = _mm256_set_epi64x(0x8000800080008000ULL, 0x8000800080008000ULL, 0x8000800080008000ULL, 0x8000800080008000ULL);                                                                                                                                           // fedc ba98 7654 3210
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So are both CPU's not fullfilling the requirements?

Regards

@FreeDisciplina
Copy link
Member

FreeDisciplina commented May 30, 2019

In i5-6300U CPU, you forgot -mavx2 option for compiling.

I have tried your ztest1.cpp, using g++ version 5.4.1, it just complained some warnings, but can generate the a.out executable file.

image

May I know your g++ version?

@ghost
Copy link
Author

ghost commented May 30, 2019

I just found it out exactly when you wrote you Comment. Thanks alot, works fine now for me.

Regards

Edit: g++ Version is 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)

@ghost ghost closed this as completed May 30, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant