spaln icon indicating copy to clipboard operation
spaln copied to clipboard

building with g++ and -march=native fails because of missing header files like fwd2s1_simd.h

Open boegel opened this issue 2 years ago • 2 comments

I'm trying to build spaln v2.4.12 with GCC 10.2 and using "-O2 -march=native" as compiler options.

This fails with:

g++ -O2 -ftree-vectorize -march=native -fno-math-errno -Wall -DM_THREAD=1 -DUSE_ZLIB=1 -c fwd2b1.cc
fwd2b1.cc:32:10: fatal error: fwd2s1_simd.h: No such file or directory
   32 | #include "fwd2s1_simd.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:30: fwd2b1.o] Error 1

Is the fwd2s1_simd.h supposed to be available in the codebase?

boegel avatar Aug 29 '22 14:08 boegel

Dear boegel,

Sorry, the simd version is now under a final stage of test. At present, please compile without the -march option.

Osamu,

ogotoh avatar Aug 30 '22 06:08 ogotoh

Dear boegel,

I have just uploaded new version of spaln ver3.0.0. At long last, this version supports vectorized computation. -march=native command line option at the compilation will automatically choose simd instructions for SSE4.2/AVX, AVX2, or AVX512 according to your system. For spaln to use the vectorized functions, -A[1-3] option is needed as a command line option. Without this option or with -A0 option, the conventional scalar-based functions will be called. In general, the computational speed is A3 > A2 > A1 > A0, but alignment accuracy is in the reverse order. This is because A0 considers most precisely the non-linear intron-length-dependent penalty score, whereas A3 treats it as a constant, and A1 and A2 adopt intermediate approximations.

Osamu,

ogotoh avatar Sep 13 '23 07:09 ogotoh