standard-RAxML icon indicating copy to clipboard operation
standard-RAxML copied to clipboard

Use "SIMD Everywhere" to enable wider portability

Open mr-c opened this issue 4 years ago • 1 comments

Hello. This is another patch from Debian that enables building of RAxML on non-x86 systems. I'll soon send a patch for RAxML-NG as well.

Please let me know if you have any questions

mr-c avatar Jun 20 '20 13:06 mr-c

Thank you for sending this – it's helped me to build this project on arm64 platforms successfully (tested on macOS M1 and Docker linux/arm64).

I had to make some additional changes: afa5120ea95b9a45e8818affe08f5ee9811478d8 + 3062524c76ac23005266622330b08294c1ba7b69

I think afa5120ea95b9a45e8818affe08f5ee9811478d8 is worth including in this PR, but 3062524c76ac23005266622330b08294c1ba7b69 seems a bit tailored to non-x86 systems (I don't know anything about what the flags -mavx and -msse3 do). Ideally, there would be a condition on architecture in this Makefile as you included in the Ubuntu patch:

-CFLAGS := -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -msse3 -fomit-frame-pointer -funroll-loops  -D__AVX #-Wall -pedantic -Wunused-parameter -Wredundant-decls  -Wreturn-type  -Wswitch-default -Wunused-value -Wimplicit  -Wimplicit-function-declaration  -Wimplicit-int -Wimport  -Wunused  -Wunused-function  -Wunused-label -Wno-int-to-pointer-cast -Wbad-function-cast  -Wmissing-declarations -Wmissing-prototypes  -Wnested-externs  -Wold-style-definition -Wstrict-prototypes  -Wdeclaration-after-statement -Wpointer-sign -Wextra -Wredundant-decls -Wunused -Wunused-function -Wunused-parameter -Wunused-value  -Wunused-variable -Wformat  -Wformat-nonliteral -Wparentheses -Wsequence-point -Wuninitialized -Wundef -Wbad-function-cast
+CFLAGS += -D_USE_PTHREADS  -D__SIM_SSE3 -O2 -D_GNU_SOURCE -fomit-frame-pointer -funroll-loops  -D__AVX #-Wall -pedantic -Wunused-parameter -Wredundant-decls  -Wreturn-type  -Wswitch-default -Wunused-value -Wimplicit  -Wimplicit-function-declaration  -Wimplicit-int -Wimport  -Wunused  -Wunused-function  -Wunused-label -Wno-int-to-pointer-cast -Wbad-function-cast  -Wmissing-declarations -Wmissing-prototypes  -Wnested-externs  -Wold-style-definition -Wstrict-prototypes  -Wdeclaration-after-statement -Wpointer-sign -Wextra -Wredundant-decls -Wunused -Wunused-function -Wunused-parameter -Wunused-value  -Wunused-variable -Wformat  -Wformat-nonliteral -Wparentheses -Wsequence-point -Wuninitialized -Wundef -Wbad-function-cast
 
+ifeq (amd64,$(shell dpkg-architecture -q DEB_TARGET_ARCH_CPU))
+	CFLAGS += -mavx -msse3
+endif

However, shell dpkg-architecture -q DEB_TARGET_ARCH_CPU is Ubuntu-specific and I don't know of a universal way to do that. A less-ideal option would be to have 2 separate Makefiles here, but this project probably isn't maintained enough to warrant that.

victorlin avatar Sep 02 '22 17:09 victorlin

@stamatak could you kindly have a look at this PR? Thanks!

corneliusroemer avatar May 04 '23 09:05 corneliusroemer

Dear Cornelius, I am appreciate your efforts, but standard RAxML is not being maintained any more it has been replaced by a total re-write called RAxML-NG: https://github.com/amkozlov/raxml-ng My obligations unfortunately do not allow me any more to write/inspect code myself. I am terribly sorry about this.

stamatak avatar May 04 '23 09:05 stamatak

Thanks for the quick and helpful response @stamatak!

I totally understand! In that case, it might be helpful to archive the repo and/or add a notice pointing out it is no longer maintained.

corneliusroemer avatar May 04 '23 10:05 corneliusroemer

I have added a note that it's no longer being maintained.

stamatak avatar Sep 29 '23 10:09 stamatak