3 ms·
If you have mpi4py then I would try this one: https://github.com/joshjerred/mpi4py-with-multiprocessing-Check-for-primes/blob/main/primeMP.py https://github.co
by neatze 6y ago
If you have mpi4py then I would try this one:
https://github.com/joshjerred/mpi4py-with-multiprocessing-Check-for-primes/blob/main/primeMP.py https://github.com/joshjerred/mpi4py-with-multiprocessing-Ch...
To me this would be more fair comparison between single cpu and pi cluster.
- m463 6y agoapt-get mpi4py3 and using python3 primeMP.py is lots faster Find all primes up to: 10000 Nodes: 1 Time elasped: 0.12 seconds [1229] Primes discovered: 1229 Find all primes up to: 100000 Nodes: 1 Time elasped: 4.52 seconds [9592] Primes discovered: 9592 Find all primes up to: 200000 Nodes: 1 Time elasped: 17.43 seconds [17984] Primes discovered: 17984 I even tried: Find all primes up to: 1000000 Nodes: 1 Time elasped: 383.2 seconds [78498] Primes discovered: 78498
- neatze 6y agothat's makes much more sense :) I found this: https://setiathome.berkeley.edu/cpu_list.php https://setiathome.berkeley.edu/cpu_list.php ARMv7 looks like is raspberry pi, looking at this I can't see any computational value for such cluster setup.