Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVX(2) instructions in manylinux i686 wheels #8

Closed
tomkooij opened this issue Apr 27, 2017 · 3 comments
Closed

AVX(2) instructions in manylinux i686 wheels #8

tomkooij opened this issue Apr 27, 2017 · 3 comments

Comments

@tomkooij
Copy link
Collaborator

tomkooij commented Apr 27, 2017

I'm experiencing Illegal instruction exceptions on manylinux i686 wheels on several (recent) CPUs:

Playing with objdump I'm seeing AVX instructions in libhdf5extension.so in py27 manylinux wheel for v3.4.2. From the travis log it seems pytables is build using -mavx2 which should not happen for an i686 build.

@matthew-brett: Can you help setting the correct compiler arch -m flags?
(This might be due to the fact we are now building internal blosc, instead of the separate blosc lib)

travis log: (note the -mavx2 flag)

building 'tables.hdf5extension' extension
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=gnu99 -fPIC -DNDEBUG=1 -DHAVE_LZO2_LIB=1 -DHAVE_BZ2_LIB=1 -DHAVE_LZ4=1 -DHAVE_SNAPPY=1 -DHAVE_ZLIB=1 -DHAVE_ZSTD=1 -Ihdf5-blosc/src -Ic-blosc/blosc -Ic-blosc/internal-complibs/zlib-1.2.8 -Ic-blosc/internal-complibs/lz4-1.7.5 -Ic-blosc/internal-complibs/snappy-1.1.1 -Ic-blosc/internal-complibs/zstd-1.1.3 -Ic-blosc/internal-complibs/zstd-1.1.3/common -Ic-blosc/internal-complibs/zstd-1.1.3 -I/opt/python/cp27-cp27mu/lib/python2.7/site-packages/numpy/core/include -I/opt/python/cp27-cp27mu/include/python2.7 -c tables/hdf5extension.c -o build/temp.linux-i686-2.7/tables/hdf5extension.o -std=gnu99 -Isrc -DH5_USE_18_API -DH5Acreate_vers=2 -DH5Aiterate_vers=2 -DH5Dcreate_vers=2 -DH5Dopen_vers=2 -DH5Eclear_vers=2 -DH5Eprint_vers=2 -DH5Epush_vers=2 -DH5Eset_auto_vers=2 -DH5Eget_auto_vers=2 -DH5Ewalk_vers=2 -DH5E_auto_t_vers=2 -DH5Gcreate_vers=2 -DH5Gopen_vers=2 -DH5Pget_filter_vers=2 -DH5Pget_filter_by_id_vers=2 -DH5Tarray_create_vers=2 -DH5Tget_array_dims_vers=2 -DH5Z_class_t_vers=2 -DSHUFFLE_SSE2_ENABLED -msse2 -DSHUFFLE_AVX2_ENABLED -mavx2
@tomkooij
Copy link
Collaborator Author

tomkooij commented Apr 27, 2017

Never mind, this is in pytables setup.py, it detects SSE2 and AVX2 and sets CFLAGS when the internal blosc is used.
Which means that everything (including cython extensions) get's compiled with -mavx2 when the internal blosc is used.

Travis log: https://s3.amazonaws.com/archive.travis-ci.org/jobs/223825312/log.txt

SSE2 detected
AVX2 detected

This can probably be fixed by using the external blosc: PyTables/PyTables#627

@tomkooij
Copy link
Collaborator Author

tomkooij commented May 6, 2017

Reverted back to using external blosc. (for now).

@tomkooij
Copy link
Collaborator Author

We can now use the internal C-Blosc by patching pytables/setup.py using the conda-forge patch: 45933ee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant