For instance, let's say we have n_ranks=112 (i.e. 2^4*7). Instead of having to specify
x_ranks = 14
y_ranks = 8
z_ranks = 1
we should have z_ranks=1 by default and, if not defined, x_ranks and y_ranks determined by a best guess.
One methodology is to use the closest pair to the square root of 112, i.e. about 10. So 814 seems to be the best layout (or equivalently 148).