sriramlab/SCOPE

Unable to compile on CPU that does not have SSE2 enabled

Closed this issue · 3 comments

Even though the makefiles indicate not to use SSE2, there is a header requirement for emmintrin.h from mailman.h and emmintrin.h appears to require SSE2 instruction set.

The following is an error message from building a docker file on an M1 Mac CPU, which does not have SSE2 enabled.

Step 14/14 : RUN make
 ---> Running in 49c7c5f080c0
[ 16%] Building CXX object CMakeFiles/scope.dir/src/run_alstructure.cpp.o
[ 33%] Building CXX object CMakeFiles/scope.dir/src/alstructure.cpp.o
[ 50%] Building CXX object CMakeFiles/scope.dir/src/matmult.cpp.o
In file included from /app/SCOPE/src/matmult.cpp:2:
/app/SCOPE/include/mailman.h:6:10: fatal error: emmintrin.h: No such file or directory
    6 | #include <emmintrin.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/scope.dir/build.make:104: CMakeFiles/scope.dir/src/matmult.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/scope.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

However, the cmake file does specify not to use sse2 support:

root@2d5c7eb6e5ae:/app/SCOPE/build# grep -R SSE_SUPPORT
CMakeFiles/scope.dir/flags.make:CXX_DEFINES = -DDEBUG=0 -DSSE_SUPPORT=0

Hello,

Try removing/commenting the #include <emmintrin.h> and lines 123-360 (the two SSE functions) from mailman.h

Yes, SCOPE compiles once you remove the SSE references from mailman.h

Hi! I noticed this issue is closed. Will there be any changes to the documentation or the source code to indicate that you need an SSE2 enabled CPU? Or to remove SSE2 dependencies?