Closed jeffhammond closed 9 years ago
One online reference to this issue is http://stackoverflow.com/questions/10327939/erroring-on-no-such-instruction-while-assembling-project-on-mac-os-x-lion.
Adding "-mno-avx" to *FLAGS reduces the errors but does not solve the problem:
Making all in world
mpicxx -DHAVE_CONFIG_H -I../../../../src -I../../../src -I../../../../src/apps -march=native -mno-avx -O3 -Wall -Wno-strict-aliasing -Wno-deprecated -Wno-unused-local-typedefs -ffast-math -std=c++0x -march=native -MT world.o -MD -MP -MF .deps/world.Tpo -c -o world.o ../../../../src/madness/world/world.cc
/var/folders/dz/g7pbjvmx2474mrh7xwrdch9h0000gn/T//cciTzcoU.s:1291:no such instruction: `shlx %rcx, -8(%rax),%rbx'
/var/folders/dz/g7pbjvmx2474mrh7xwrdch9h0000gn/T//cciTzcoU.s:1405:no such instruction: `shlx %rcx, -8(%rax),%rbx'
/var/folders/dz/g7pbjvmx2474mrh7xwrdch9h0000gn/T//cciTzcoU.s:1652:no such instruction: `andn %eax, %ecx,%eax'
/var/folders/dz/g7pbjvmx2474mrh7xwrdch9h0000gn/T//cciTzcoU.s:1792:no such instruction: `shlx %rcx, -8(%rax),%rbx'
/var/folders/dz/g7pbjvmx2474mrh7xwrdch9h0000gn/T//cciTzcoU.s:1905:no such instruction: `shlx %rcx, -8(%rax),%rbx'
/var/folders/dz/g7pbjvmx2474mrh7xwrdch9h0000gn/T//cciTzcoU.s:3106:no such instruction: `shlx %rcx, -8(%rax),%rbx'
/var/folders/dz/g7pbjvmx2474mrh7xwrdch9h0000gn/T//cciTzcoU.s:3164:no such instruction: `shlx %rsi, -8(%rax),%rbx'
/var/folders/dz/g7pbjvmx2474mrh7xwrdch9h0000gn/T//cciTzcoU.s:3439:no such instruction: `shlx %rcx, -8(%rax),%rbx'
/var/folders/dz/g7pbjvmx2474mrh7xwrdch9h0000gn/T//cciTzcoU.s:3497:no such instruction: `shlx %rsi, -8(%rax),%rbx'
make[4]: *** [world.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
Add "-Wl,-no_pie" to your LDFLAGS and "-std=c++11" to your CXXFLAGS and all will be good.
That doesn't solve the problem. Using "-std=c++11" doesn't even preempt "-std=c++0x", as configure still adds it anyways. I have to manually "--disable-cpp0x", not that this solves the problem.
My guess is that those morons at Apple, in collaboration with the Homebrew team, have felt it best to take my user experience out back and poop all over it, which is to say, I think I have a broken toolchain. This, despite recently upgrading to Yosemite, upgrading Xcode and doing a full Homebrew update.
I missed the fact that -std=c++0x in the configure output, but the main point was the -Wl,-no_pie
. Without that MADNESS will not work on OS X.
Not sure about the illegal instructions. I will give your configure script another try.
I am reinstalling GCC 4.9.2 from scratch in Homebrew right now to see if I can fix this crap.
One thing to keep in mind is that you need to build your entire software stack with GCC. Otherwise, when you mix libraries built with GCC and Apple's compiler, your program may fail catastrophically.
presumably Accelerate math libs are built with Clang. but those work with other apps, so i don't think that's the issue in MADNESS. good to know in any case.
On Sun, Dec 14, 2014 at 4:02 PM, Justus Calvin notifications@github.com wrote:
One thing to keep in mind is that you need to build your entire software stack with GCC. Otherwise, when you mix libraries built with GCC and Apple's compiler, your program may fail catastrophically.
— Reply to this email directly or view it on GitHub https://github.com/m-a-d-n-e-s-s/madness/issues/110#issuecomment-66936611 .
Jeff Hammond jeff.science@gmail.com http://jeffhammond.github.io/
What about TBB, are you using the binary version from Intel or did you build it from source? If you are using the binary version from Intel, you need to make sure you are linking with the tbb libraries that are linked to libc++ (the default for Mavericks/Yosemite Clang). These libraries, on my Mac, are installed in /opt/intel/tbb/lib/libc++
I was using the homebrew install of TBB, which I guess is the problem. I switched to an all-Intel toolchain on my work machine and things appear to be working.
For posterity, here is how I got it working with the Intel toolchain:
../configure --prefix=/Users/jrhammon/Work/MADNESS/install-intel \
CC=icc CXX=icpc MPICC=icc MPICXX=icpc \
--with-mkl --with-tbb=/opt/intel/composer_xe_2015/tbb \
CPPFLAGS=-I/opt/mpich/dev/intel/default/include \
LDFLAGS="/opt/mpich/dev/intel/default/lib/libmpicxx.a \
/opt/mpich/dev/intel/default/lib/libmpi.a \
/opt/mpich/dev/intel/default/lib/libpmpi.a"
Note that my use of static libraries and avoidance of the MPI wrapper scripts is due to MPICH+Mac dynamic libraries issues and not MADNESS.
You still need to add -Wl,-no_pie
to LDFLAGS
, otherwise you will be unable to run MADNESS with more than one process.
config.log
make.log