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

Remove -march=native from MOODS/python /setup.py? #47

Open
zia1138 opened this issue Jul 4, 2023 · 4 comments
Open

Remove -march=native from MOODS/python /setup.py? #47

zia1138 opened this issue Jul 4, 2023 · 4 comments

Comments

@zia1138
Copy link

zia1138 commented Jul 4, 2023

Dear @jhkorhonen,

Thanks for maintaining MOODS-python for so long! I was curious if you could remove the -march=native flag from setup.py:

common_compile_args = ['-march=native', '-O3', '-fPIC', '--std=c++11']

It impacts both pypy installs for M1 mac and for AMD CPUs. On AMD CPUs, it can lead to illegal instruction errors. Happy to submit a PR as well.

Thanks again!

@gokceneraslan
Copy link

Thanks for reporting Zia, we're having the same issue. Here is the exception from our CI/CD instance:

collecting ... Fatal Python error: Illegal instruction
Current thread 0x00007f7d5fea7740 (most recent call first):
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1166 in create_module
  File "<frozen importlib._bootstrap>", line 556 in module_from_spec
  File "<frozen importlib._bootstrap>", line 657 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 1014 in _gcd_import
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127 in import_module
  File "/builds/code/.tox/default/lib/python3.8/site-packages/MOODS/parsers.py", line 14 in swig_import_helper
  File "/builds/code/.tox/default/lib/python3.8/site-packages/MOODS/parsers.py", line 17 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 843 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/builds/code/.tox/default/lib/python3.8/site-packages/package/model/interpret.py", line 4 in <module>

@gokceneraslan
Copy link

Interestingly this only happens in the Python 3.8 CI/CD tests where the python:3.8-bullseye docker image is used.

@gokceneraslan
Copy link

gokceneraslan commented Jul 6, 2023

Since the PyPI moods-python is a source package, I think the issue we are having is a bioconda problem where this issue actually seems to be fixed (bioconda/bioconda-recipes@76c748b also see bioconda/bioconda-recipes#9970). I think I will switch to the PyPI moods-python source package (and recompile it) in our pipeline (i.e. pip install moods-python instead of conda install moods-python) to make sure it's compiled for the right architecture.

@gokceneraslan
Copy link

Any news?

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

2 participants