Bug #2843

Building with GMX_BUILD_OWN_FFTW

Added by David van der Spoel 12 months ago. Updated 12 months ago.

build system
Target version:
Affected version - extra info:
2020 master
Affected version:


I have problems with this in master:

-- The GROMACS-managed build of FFTW 3 will configure with the following optimizations: --enable-sse2;--enable-avx;--enable-avx2;--enable-avx512

However, my compiler gcc8.2 does not know about avx2 or the flags are incorrect:
Making all in avx-128-fma
Making all in avx2
libtool: compile:  /home/apps/gcc/8.2.0/bin/gcc -DHAVE_CONFIG_H -I. -I/home/spoel/GG/testmaster/gromacs/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2 -I../../.. -I /home/spoel/GG/testmaster/gromacs/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild -march=core-avx2 -mfma -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns -MT n2fv_2.lo -MD -MP -MF .deps/n2fv_2.Tpo -c /home/spoel/GG/testmaster/gromacs/build/src/external/build-fftw/fftwBuild-prefix/src/fftwBuild/dft/simd/avx2/n2fv_2.c  -fPIC -DPIC -o n2fv_2.o
/tmp/ccMAAski.s: Assembler messages:
/tmp/ccMAAski.s:26: Error: no such instruction: `shlx %rbx,24(%rbp),%r10'


#1 Updated by Mark Abraham 12 months ago

  • Description updated (diff)

#2 Updated by Mark Abraham 12 months ago

  • Affected version - extra info set to 2020 master
  • Affected version changed from git master to 2018.2

What distro was this? A user reported the same symptoms on a CentOS derivative last year: Clearly there are installations of gcc that emit assembly for which a compatible assembler must exist - we disable AVX compilation of FFTW on Mac for exactly this reason. The symptoms are consistent with the assembler on the machine not understanding (enough of) newer instructions. (The shlx assembly instruction was only introduced in the Haswell era, for example.)

Suggest either upgrade binutils package (containing the assembler), use the fftw3 dev package provided by the distro, or install fftw3 yourself. On CentOS derivatives, using one of the dev-toolsetn packages is a good idea.

In theory, our build-own-fftw feature should check that AVX compilation works before enabling flags. But it's not easy to know what the fftw build system will want. We have had a hack that turns it off on Mac, but I don't know a good way to turn it off in other cases.

#3 Updated by David van der Spoel 12 months ago

Centos 6.2. As you noted the problem went away after upgrading binutils. Thanks for expert advice.

#4 Updated by David van der Spoel 12 months ago

  • Status changed from New to Rejected

#5 Updated by David van der Spoel 12 months ago

  • Status changed from Rejected to Closed

Also available in: Atom PDF