xmmintrin.h # error "SSE instruction set not enabled"

Install support for openEMS

Moderators: thorsten, sebastian

Post Reply
Jack
Posts: 4
Joined: Wed 18 May 2016, 18:08

xmmintrin.h # error "SSE instruction set not enabled"

Post by Jack » Wed 18 May 2016, 18:19

I have tried to compile openEMS-v0.0.33-rc1 source code on ubuntu 14.04 and I got the # error "SSE instruction set not enabled".
Some information obtained from the log file are shown below. Please help me figure out how to solve this error.

Code: Select all

-- The CXX compiler identification is GNU 4.8.4
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using CMAKE_INSTALL_PREFIX: /home/jack/opt/openEMS
-- Build AppCSXCAD: YES
-- Configuring done
-- Generating done
.
.
.
[ 33%] Built target tools
Scanning dependencies of target FDTD
[ 35%] Building CXX object FDTD/CMakeFiles/FDTD.dir/engine.cpp.o
[ 37%] Building CXX object FDTD/CMakeFiles/FDTD.dir/operator.cpp.o
[ 38%] Building CXX object FDTD/CMakeFiles/FDTD.dir/engine_multithread.cpp.o
In file included from /home/jack/Downloads/openEMS/openEMS/FDTD/engine_multithread.cpp:35:0:
/usr/lib/gcc/i686-linux-gnu/4.8/include/xmmintrin.h:31:3: error: #error "SSE instruction set not enabled"
 # error "SSE instruction set not enabled"
   ^
/home/jack/Downloads/openEMS/openEMS/FDTD/engine_multithread.cpp: In member function ‘void NS_Engine_Multithread::thread::operator()()’:
/home/jack/Downloads/openEMS/openEMS/FDTD/engine_multithread.cpp:257:37: error: ‘_mm_getcsr’ was not declared in this scope
  unsigned int oldMXCSR = _mm_getcsr(); //read the old MXCSR setting
                                     ^
/home/jack/Downloads/openEMS/openEMS/FDTD/engine_multithread.cpp:259:23: error: ‘_mm_setcsr’ was not declared in this scope
  _mm_setcsr( newMXCSR ); //write the new MXCSR setting to the MXCSR
                       ^
make[5]: *** [FDTD/CMakeFiles/FDTD.dir/engine_multithread.cpp.o] Error 1
make[4]: *** [FDTD/CMakeFiles/FDTD.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [openEMS-prefix/src/openEMS-stamp/openEMS-build] Error 2
make[1]: *** [CMakeFiles/openEMS.dir/all] Error 2
make: *** [all] Error 2

thorsten
Posts: 1430
Joined: Mon 27 Jun 2011, 12:26

Re: xmmintrin.h # error "SSE instruction set not enabled"

Post by thorsten » Wed 18 May 2016, 18:33

I have tried to compile openEMS-v0.0.33-rc1 source code
That is a very old version. Please try the latest v0.0.34
SSE instruction set not enabled
Do you compile on a 64bit or 32bit Ubuntu?
I do not support 32bit any more... if you still have a 32bit OS, you may need to set some additional compiler flags.
Your CPU has to have SSE support of course...

best regards
Thorsten

Jack
Posts: 4
Joined: Wed 18 May 2016, 18:08

Re: xmmintrin.h # error "SSE instruction set not enabled"

Post by Jack » Wed 18 May 2016, 18:47

Thank you Thorsten for your reply. This problem has been solved by adding

Code: Select all

 set(CMAKE_CXX_FLAGS "-msse -march=native") 
at line 144 in CMakeLists.txt.

I think that my problem is same as the one described in http://openems.de/forum/viewtopic.php?f=2&t=332.

Best Regards
Jack

Post Reply