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

Another new version of primesieve... #6

Open
BryanQuigley opened this issue Apr 27, 2018 · 7 comments
Open

Another new version of primesieve... #6

BryanQuigley opened this issue Apr 27, 2018 · 7 comments

Comments

@BryanQuigley
Copy link

Not sure this one will be any better that the last update, but thought I'd mention it...

https://github.com/kimwalisch/primesieve/releases
https://github.com/kimwalisch/primesieve/blob/master/ChangeLog

@BryanQuigley
Copy link
Author

Another new version, highlight:
primesieve-7.3 improves the cache efficiency of the sieving algorithm
for large sieving primes. By using aligned memory it is possible
to reduce the number of pointer indirections which reduces cache
pollution. I have measured a speed up of 15% near 1e18 and a speed up
of 25% near 1e19.

@SChernykh
Copy link
Owner

Thanks for the information! I'll see if I can back-port some of these optimizations. The differences are too large to integrate the full version now.

@BryanQuigley
Copy link
Author

It's supposed to be API compatible.. (although I did just note that the opencl version might be still on an old version of it?) - I also am unsure if you made your own modifications to it..

Relatedly, I'm trying to build Amicable boinc version (boinc-128-bit).. had to change #include <boinc_api.h> to boinc/boinc_api.h. Even with that I get: /usr/local/include/boinc/parse.h:26:10: fatal error: config.h: No such file or directory
#include "config.h"
Any hints welcome.

If you're planning on ending the project at the end of the 10^20 run, these optimizations might not be that important..

@BryanQuigley
Copy link
Author

Figured it out:

  1. Have boinc checkout and Amicable checkout next to each other - say in ~/git/Amicable and ~/git/boinc
  2. In boinc, git checkout 7c8386b1009735a7bb4d1945bce890553b62a515 which is before the config.h change (6e5b7da699c)
  3. Build boinc with ./configure -C--enable-pkg-devel
  4. Make amicable

Also there is another new version of primesieve. I plan to focus first on if we can fix it to work with newer boinc checkouts.. (or maybe that needs a boinc change...?)

@BryanQuigley
Copy link
Author

Looks like all it needs is adding -I ../boinc/ to Includes:
diff --git a/makefile b/makefile
index 6d7e735..8c7558f 100644
--- a/makefile
+++ b/makefile
@@ -1,5 +1,5 @@
WARNINGS=-Wall -Wextra -Wpedantic -Wstrict-overflow=5 -Wshadow -Warray-bounds=2
-INCLUDES=-I primesieve/include -I Amicable -I ../boinc/api -I ../boinc/lib
+INCLUDES=-I primesieve/include -I Amicable -I ../boinc/api -I ../boinc/lib -I ../boinc/
LIBS=-L ../boinc/api -L ../boinc/lib -Wl,--whole-archive -lboinc_api -lboinc -lpthread -Wl,--no-whole-archive

Happy to make a PR if you'd prefer

@jensdenbraber
Copy link

When upgrading, maybe consider the newest version. At the moment there is a new version released: version 12.3, https://github.com/kimwalisch/primesieve/releases/tag/v12.3

@SChernykh
Copy link
Owner

Primesieve is currently < 0.1% of the runtime, so it's not urgent and probably won't be.

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

No branches or pull requests

3 participants