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

build with --disable-native fails #173

Open
rekado opened this issue Aug 8, 2022 · 3 comments
Open

build with --disable-native fails #173

rekado opened this issue Aug 8, 2022 · 3 comments

Comments

@rekado
Copy link

rekado commented Aug 8, 2022

After configuring with --disable-native the build fails:

gcc  -I. -I..     -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline  -MT sse.o -MD -MP -MF .deps/sse.Tpo -c -o sse.o sse.c
In file included from utilities.h:43,
                 from sse.h:18,
                 from sse.c:14:
sse.c: In function ‘SSE_Lk_Core_One_Class_Eigen_Lr’:
/gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/include/pmmintrin.h:86:1: error: inlining failed in call to ‘always_inline’ ‘_mm_hadd_pd’: target specific option mismatch
   86 | _mm_hadd_pd (__m128d __X, __m128d __Y)
      | ^~~~~~~~~~~
sse.c:122:8: note: called from here
  122 |   _x = _mm_hadd_pd(_x,_x);
      |        ^~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:1215: sse.o] Error 1
make[2]: *** Waiting for unfinished jobs....
@stephaneguindon
Copy link
Owner

Sorry for the (very) late response... I'm aware of this issue. Is there any specific reason why you would use this compilation option?

@rekado
Copy link
Author

rekado commented Aug 31, 2022

We're building generic binaries for users of GNU Guix. For a distribution we cannot assume that the CPU features of the build servers are also available on the users' CPUs.

Perhaps in the long run function multi-versioning would be an option?
https://hpc.guix.info/blog/2022/01/tuning-packages-for-a-cpu-micro-architecture/

@stephaneguindon
Copy link
Owner

I see... Versioning with SIMD extensions is giving me nightmares.

The "problem" with the --disable-native option is that one cannot completely discard SSE as some core functions of glibc rely on it. I just posted a commit whereby compilation of the SSE and AVX parts of the code of PhyML is discarded when using this option. I hope this will do the trick on your side.

ps : The core of PhyML calculation rests on a couple of functions that already have AVX and SSE versions. It is thus already
relying on "function multi-versioning" in a sense.

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

2 participants