In my program I need to use all elements of a symmetric group $S_n$. In the case of $n=15$, it is said that there is memory problem. I sent the codes to a computer cluster and obtained the following error:
Traceback (most recent call last):
File "/home/fs71797/lij21/chTGr49.sage.py", line 3426, in <module>
c2=ChTUsingKLPolynomialInSage(T1,k)
File "/home/fs71797/lij21/chTGr49.sage.py", line 74, in ChTUsingKLPolynomialInSage
l=list(W)
MemoryError
My code is as follows:
l=list(W)
with Pool() as p: #...map below action to as many cores as available
bb = p.starmap(ChTUsingKLPolynomialInSageHalf,[(k,l[i],w0,w,W,T1) for i in range(len(l))])
W is $S_n$. I do not need to store list(W) but only need to take every element of list(W). Is there some way to solve this memory problem? Thank you very much.