On 19:12 Mon 10 Feb , Jeff Squyres (jsquyres) wrote:
> 1. Should we cache generated prime numbers? (if so, it'll have to be done in a thread-safe way)
The code I've submitted in the other thread is much faster than the
original code (e.g. 100x faster for 10000 nodes, the ratio increases
with the number of nodes). Given that MPI_Dims_create is a function
typically called once at application startup, I don't think caching
was of great benefit.
> 2. Should we just generate prime numbers and hard-code them into a table that is compiled into the code? We would only need primes up to the sqrt of 2billion (i.e., signed int), right? I don't know how many that is -- if it's small enough, perhaps this is the easiest solution.
Could be done, but it's not much faster than the current code. Plus
it's just calling for bugs (MPICH does this and their (initial) code
HPC and Grid Computing
Chair of Computer Science 3
Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany
+49 9131 85-27910
PGP/GPG key via keyserver
This is Bunny. Copy and paste Bunny into your
signature to help him gain world domination!