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

Support old architectures when compiling #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brettolsen
Copy link

The "-march=native" option produces compiled code that is optimized for the chip architecture of the build machine. This can produce compiled code that will not run on older chips, instead crashing with "illegal instruction".

In particular, the bioconda compiled package available here (https://github.com/bioconda/bioconda-recipes/tree/master/recipes/moods) apparently is compiled on a Haswell (AVX2) machine, preventing a wide number of users running on older machines from successfully installing MOODS using conda.

@jhkorhonen
Copy link
Owner

I chose -march=native with the assumption that the code is compiled on the target machine, and any distributors will tweak the compile options to suit their targets. However, based on quick testing, it looks like -march=native is only ~2% faster than -mtune=generic, so it might not be a bad idea to make that a default.

I'll do a bit more testing and merge this if it doesn't look too bad.

@jenzopr
Copy link

jenzopr commented Jul 31, 2018

I can inject a patch and rebuild the bioconda package, if you'd like to use conda @brettolsen?

@jenzopr
Copy link

jenzopr commented Jul 31, 2018

Ah its done already! Great 🎉

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

Successfully merging this pull request may close these issues.

3 participants