For calculating decompositions equal to whole nodes
import numpy as np
cores_per_node = 32
xios_cores = 1
i = np.arange(1, 42)
j = np.arange(1, 42)
n = (np.prod(np.meshgrid(i, j), axis=0) + xios_cores) / cores_per_node
ii, jj = np.nonzero(np.mod(n, 1) == 0)
print('i:', end='')
for I in i[ii]:
print(f'{I:4d}', end='')
print('\nj:', end='')
for J in j[jj]:
print(f'{J:4d}', end='')
print('\nn:', end='')
for N in n[ii, jj]:
print(f'{N:4.0f}', end='')
i: 1 3 5 7 7 9 9 11 13 15 17 19 19 21 21 23 25 27 29 31 31 33 35 37 39 39 41 41 j: 31 21 19 9 41 7 39 29 27 17 15 5 37 3 35 25 23 13 11 1 33 31 21 19 9 41 7 39 n: 1 2 3 2 9 2 11 10 11 8 8 3 22 2 23 18 18 11 10 1 32 32 23 22 11 50 9 50