Compiling without AVX instructions

1,860 views
Skip to first unread message

Fabian Zimmer

unread,
Apr 8, 2014, 10:21:52 AM4/8/14
to exab...@googlegroups.com
Dear all,

I am currently trying to compile exabayes on the UCL legion super computer and would like to use the SS3 version instead of the AVX version, 
because the available gcc version does not support AVX instructions.
For this reason I downloaded this version:


and tried to compile according to the manual with

$ ./configure --enable-mpi CC=mpicc CXX=mpicxx

The configure script checks for avx instructions and informs me that they are available, but my compiler does not support it:
....
checking whether C compiler accepts -mavx... no
configure: WARNING: Your processor supports avx instructions but not your compiler, can you try another compiler?
....

The make command dies with the following output:

$ make
  CC       src/libbayes_a-avxConditional.o
  CXX      src/libbayes_a-Density.o
/tmp/cc8h9toJ.s: Assembler messages:
/tmp/cc8h9toJ.s:50: Error: no such instruction: `vmovsd (%r15),%xmm1'
/tmp/cc8h9toJ.s:52: Error: no such instruction: `vxorpd %xmm3,%xmm3,%xmm3'
....

I searched a little bit and found that those are actually avx instructions(?), so appearantly the SS3 version tries to build with AVX instructions.

I had a quick look at the Makefile and apparently the  VECTOR_FLAGS variable that specifies -mno-avx is commented out
 
542 VECTOR_FLAGS = -D_OPTIMIZED_FUNCTIONS $(SIMD_FLAGS) -march=native -mtune=native
543 #VECTOR_FLAGS = -DMANUAL_AVX_OVERRIDE -D_OPTIMIZED_FUNCTIONS -march=nocona -mtune=generic #  $(SIMD_FLAGS) -mno-avx
544 #VECTOR_FLAGS = -DMANUAL_SSE_OVERRIDE -DMANUAL_AVX_OVERRIDE -mno-avx -mno-sse3 #  $(SIMD_FLAGS) -march=native -mtune=generic

I then diffed the makefiles produced by the avx download and the sse download and they are identical. 
I suspect that the exabayes-1.2.1-linux-openmpi-sse.tar.gz version may actually try to compile with AVX instructions? 
Maybe the uploaded versions are the same?

However, I can build successfully with 

$ ./configure --enable-mpi CC=mpicc CXX=mpicxx --disable-avx

Used versions:
GCC 4.6.3
openmpi 1.6.5

I have not much experience with the whole Makefile magic, so I may be completely wrong :). If any additional information is required,
please let me know and I am happy to provide it.

All the best,
Fabian





Andre J. Aberer

unread,
Apr 8, 2014, 10:48:03 AM4/8/14
to exab...@googlegroups.com
Dear Fabian,

thanks for the excellent problem description.

tl;dr: everything should be fine.

More explicit answer:

The various package versions, that we distribute, refer to how binaries
that are included in the package have been compiled (in your case
without avx and using OpenMPI). The binaries work out of the box --
except for the MPI version where we cannot assure that you want to
employ the same version of MPI that we used for compiling it (i.e., in
your case compiling is a good idea).

So after downloading the package, you either could try to directly
employ the binaries, or compile from scratch. If you compile from
scratch (using the build.sh that calls ./configure && make), the
configure script will identify your hardware, but you can explicitly
prohibit usage of AVX/SSE (that's what you did using the respective
configure flags).

For compiling the mpi-version of exabayes, without avx
$ ./configure --enable-mpi CC=mpicc CXX=mpicxx --disable-avx
is correct.

an addition configure and make with
$ ./configure --disable-avx
yields all further post- and pre-processing tools that do not require
MPI (and the sequential version of exabayes).

Let us know, if you encounter further problems.

--
Best regards,
Andre Aberer

PreDoc (Bioinformatics) in the Exelixis Lab, Heidelberg Institute for Theoretical Studies

Fabian Zimmer

unread,
Apr 8, 2014, 4:05:27 PM4/8/14
to exab...@googlegroups.com
Dear Andre,

Thanks for the very fast reply!

> The various package versions, that we distribute, refer to how binaries
> that are included in the package have been compiled (in your case
> without avx and using OpenMPI). The binaries work out of the box --
> except for the MPI version where we cannot assure that you want to
> employ the same version of MPI that we used for compiling it (i.e., in
> your case compiling is a good idea).
>
Ah OK, that makes sense. I guess I was a little bit confused because
in RaxML different makefiles are distributed depending on architecture
and supported instructions.
But I guess the configure step here takes care of all this.
> So after downloading the package, you either could try to directly
> employ the binaries, or compile from scratch. If you compile from
> scratch (using the build.sh that calls ./configure && make), the
> configure script will identify your hardware, but you can explicitly
> prohibit usage of AVX/SSE (that's what you did using the respective
> configure flags).
>
> For compiling the mpi-version of exabayes, without avx
> $ ./configure --enable-mpi CC=mpicc CXX=mpicxx --disable-avx
> is correct.
>
> an addition configure and make with
> $ ./configure --disable-avx
> yields all further post- and pre-processing tools that do not require
> MPI (and the sequential version of exabayes).
>
Great, that worked!

Keep up the great work!

Cheers,
Fabian

--
Fabian Zimmer
Key ID: 0x609253ED
Reply all
Reply to author
Forward
0 new messages