Closed althonos closed 4 months ago
Hello @althonos!
Thank you for reporting the issue - I'll take a look on that.
Best, Adam
@althonos
The inconsistency you reported seems to be very compiler and platform specific. The macOS-latest GitHub runner provides clang 13.0.0 compiler. The issue was not present when compiling with clang 12.x and 13.1.6 on x64 machine and with clang 13.0.0 on M1 CPU. It also did not appear on Linux (we checked all g++ versions from 5 to 11). We looked for potential sources of non-determinism (random number generators, non-stable sorts, etc.) and checked with valgrind for erronous memory accesses with no success. Thus, if there is some kind of non-determinism, it must be very well hidden - we will keep on searching ;) In the latest sources we included macOS execution tests on GitHub macOS-12
runner where the issue is not present.
By the way, we were thinking of making Python wrapper for FAMSA, but somehow never found time. We really appreciate your work and would be happy to help if you encounter some problems.
Thanks for checking! I guess it's a compiler bug then. I will be using the macos-12
runner to build the extension then, and I added a small check when building to crash for clang 13.0.0.
To be fair, writing a wrapper was very easy to do because the C++ code is well written, so the work you put there paid off 😉 I may have some patches coming in later (for instance, I had to implement my own CSequence
copy function, because of CFAMSA
expects a vector<CSequence>
, but with reference counting I cannot have proper move semantics in Python. But I think at the moment I have everything needed for a first release!
Thank you! Happy to hear that you found the sources not too knotty. I allowed myself to link PyFAMSA in our Readme (in the text and as an additional badge) - I hope you don't mind. By the way, in the latest release we removed Boost dependency so something like two thousand header files are out from the repository ;)
I allowed myself to link PyFAMSA in our Readme (in the text and as an additional badge) - I hope you don't mind.
No problem at all :wink:
I'll update FAMSA to v2.1.2 when I have a bit more time, I need to do some more patching in the code for it to work :upside_down_face:
Hi!
I recently started writing Python bindings to FAMSA (althonos/pyfamsa), and after adding CI to test the code on MacOS and Linux I noticed the results were inconsistent. I thought it was an issue with my code at first, but after checking with just the FAMSA binary it looks like different alignments are being created from the same input.
I cloned the repo and added the same checks for MacOS that are currently done for Linux, and as I've seen earlier the results are different on the two platforms (see: https://github.com/althonos/FAMSA/actions/runs/2765789682). Do you think you could investigate? I don't own a Mac so I cannot really help with this issue.