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

Port Swarm to other platforms #107

Closed
torognes opened this issue Jun 27, 2017 · 11 comments
Closed

Port Swarm to other platforms #107

torognes opened this issue Jun 27, 2017 · 11 comments
Assignees
Milestone

Comments

@torognes
Copy link
Owner

Perhaps we should port Swarm to Linux on POWER8 and Windows on x86_64 as we have done for vsearch?

@torognes torognes changed the title Porting to other platforms Port Swarm to other platforms Jun 27, 2017
@frederic-mahe
Copy link
Collaborator

or ARM64, as it seems to be the future for consumer electronics.

@torognes
Copy link
Owner Author

torognes commented Mar 5, 2019

I have rewritten the assembly code in search8.cc and search16.cc to x86_64 intrinsics and simplified it. (Not pushed to Github yet.) It should now be easy to port it to ARM64 and POWER8. It will also make it easier to rewrite the code to use AVX2 with 256-bit wide registers as discussed for issue #12.

@torognes
Copy link
Owner Author

torognes commented Mar 8, 2019

The changes with intrinsics have been pushed already. The zobrist branch is renamed to swarm3.

@torognes
Copy link
Owner Author

torognes commented May 7, 2019

Swarm 3 now seems to work as it should on ARMv8. The sixteen channel 8-bit search is slower than the 16-bit search though, so it is not used.

@torognes
Copy link
Owner Author

Added support for POWER8 CPUs. Not very fast though, compared to x86_64 and ARMv8.

@torognes
Copy link
Owner Author

Ported to Windows as well.

It now runs on Linux (x86_64, arm & power8), Mac (x86_64) and Windows (x86_64).

Considered done.

@frederic-mahe
Copy link
Collaborator

Hi Torbjørn,

I finally set out to test compilation on my ARM system (Raspberry pi 3+), but it fails:

git clone https://github.com/torognes/swarm.git
cd ./swarm/
git checkout origin/swarm3 
make
make -C src swarm
make[1]: Entering directory '/home/pi/swarm/src'
g++  -g -flto -O3 -march=armv8-a+simd -mtune=generic -flax-vector-conversions -std=c++11 -Wall -Wsign-compare -Wextra -Wno-long-long -pedantic -Icityhash   -c -o swarm.o swarm.cc
In file included from swarm.cc:24:0:
swarm.h:34:18: fatal error: city.h: No such file or directory
 #include <city.h>
                  ^
compilation terminated.
<builtin>: recipe for target 'swarm.o' failed
make[1]: *** [swarm.o] Error 1
make[1]: Leaving directory '/home/pi/swarm/src'
Makefile:30: recipe for target 'bin/swarm' failed
make: *** [bin/swarm] Error 2

which is weird since city.h is present in the ./src/ directory (along with citycrc.h).

@torognes
Copy link
Owner Author

It should probably be #include "city.h" instead of #include <city.h> in swarm.h. Will fix tomorrow.

@torognes
Copy link
Owner Author

A few more files needed a modification to properly include the city.h file. Should be fixed now in commit e316462.

@frederic-mahe
Copy link
Collaborator

Perfect, compilation is now possible on my Raspberry. There are about 15 unit-tests failing, I will investigate to try to understand why.

@frederic-mahe
Copy link
Collaborator

swarm 3 passes all tests on a Raspberry running Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants