update to KMC fork to eliminate patching and allow compilation on AMD w/SIMD
refresh-bio KMC (https://github.com/refresh-bio/KMC) is a dependency, but has some compilation issues that prevent available instruction set detection on AMD.
I have changed the CMake dependency to a fork of KMC replaces that with detection via GCC with __builtin function calls, as well as a few other QOL changes to
- replace random_shuffle w/ shuffle, as the .diff file had done previously
- remove requirement for SIMDe, while still compiling for SIMD where detected by GCC (ARM64 w/ NEON compat)
- use CXX, CXXFLAGS, and LDFLAGS where appropriate to allow implicit compilation and not require re-defining CC as g++
- remove requirement for external zlib (up to the user now!)
- add makefile target just for the library used in cuttlefish (libkmc_core.a)
I have a pull request out for these changes in refresh-bio's repo as well but until that is merged this change will allow compilation and accurate SIMD instruction set detection on AMD as well.
Hi @ggraham,
Thanks for this effort! One other thing covered in the patch that I haven't checked in the fork yet is the ability to compile under clang. This is necessary as, unlike KMC, cuttlefish doesn't require GCC for compilation on OSX, and we have an OSX userbase we need to support. Any idea if this fork will compile cleanly on Apple Clang?
Thanks! Rob
Hi Rob,
This fork will likely not compile cleanly w/ Apple Clang, or at all. Is the intent to compile for both OSX with ARM and Intel SIMD? That can certainly be done and if you want to keep support for Apple arch please hold until I've made those changes and tested!
Garrett
Hi Garrett,
Yup; the intent is to compile cleanly with GCC on Linux x86 and with Clang OSX x86 and ARM. I suppose there's no reason not to work with GCC/Linux/ARM as well, but I'm not currently testing that. Given the prevalence of the M chips now (and OSX among bioinformatician laptops), that support is pretty important to us.
That said, I'd be happy to pull from a fork that incorporates these rather than have to apply the patches, especially if you're able upstream your changes to KMC.
Best, Rob