-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
"illegal hardware instruction" error when running MUSCLE v5.2 and above on Apple M series with subdir osx_64 #52034
Comments
@apcamargo Thank you for the 5.3 build. Now both
Maybe you can add that to the tests as well? Something like
|
Does |
Nope, same error
|
Ok, so the problem might be on your end. Is your Mac a M series? Because the output of your How are you installing |
The mac indeed has an M series chipset (M1 Pro) but I'm setting the conda env to osx64 using I'm installing using an |
I guess the other binaries are being executed through Rosetta? If so, I don't know why Do you have the same issue if you try to install other packages with ARM builds (e.g. I don't think I know enough about this to help you. If you're using Pixi, you can try to ask for help in their Discord (people there are very helpful). Otherwise, maybe @bioconda/osx can help? |
You're correct, the other binaries are being executed through Rosetta. It doesn't happen with other packages nor with any muscle version prior to 5.2 |
In this case, I don't know what is going on. It could be something with the macOS ARM CI (as the build runs correctly there), but the core team would know better than me. |
Ok, thank you anyway Antônio! |
If you create an environment only for muscle and install the ARM version, does it work? |
Yep, that works as expected. |
This explains why the tests didn't catch this. From my understanding, the only major difference between the Bioconda build and Robert's build is that he is using GCC and Bioconda uses clang. As far as I know, there's no way for us to use GCC to build for macOS, but I don't really know our building system that well. As you said, version 5.1 worked in Rosetta and it seems he used Clang back then (I'm inferring this from his CI). But the code changed a lot since then... |
Can you update the issue title to something that reflects better the info we gathered? |
@apcamargo updated the title as requested |
Seems muscle is using AVX(2/512/...) in version 5.2. Rosetta does not emulate AVX. Its probably not a good idea to use march native for conda packages. For MMseqs2 I was explicitly setting to use up to SSE4_1 in comda, with the latest release 16 I made MMseqs2 use AVX2 in conda, so the same issue would likely happen now if someone were to use it in a Rosetta emulated environment. |
Thanks, @milot-mirdita! I had no idea Rosetta doesn't emulate AVX. I guess this is. Matter of how much MUSCLE benefits from AVX. If the performance increase is substantial, it might be worth it to leave as is. Perhaps @rcedgar has a thought about this |
No matter what, conda recipes shouldn't be compiled with march native, since this will result in binaries that use the instruction set of whatever GitHub runner happens to compile the binary. Most likely recent intel machines with avx512. Conda's default is I think nocona, which is ancient. A good compromise might be using the new x86-64-v3 psABI specifier. |
I don't think muscle has any explicit SIMD code, if I'm not forgetting something then any AVX instructions are compiler optimizations. |
After installing the latest MUSCLE version (5.2), I'm getting the following error when trying to run MUSCLE.
illegal hardware instruction
I assume it's related to the Apple M series chipset, I'm using Apple M1 Pro.
To reproduce:
conda install bioconda::muscle==5.2.0 -y
Then run
muscle --help
and get:Then, downgrade using:
conda install bioconda::muscle==5.1.0 -y
and
muscle --help
works again with the following output:The text was updated successfully, but these errors were encountered: