When trying to create an array to use for shared memory in multiple processes, I am getting an assertion error:
shared_array = RawArray('d', xsize)
File "C:\Python27\lib\multiprocessing\sharedctypes.py", line 88, in RawArray
obj = _new_value(type_)
File "C:\Python27\lib\multiprocessing\sharedctypes.py", line 68, in _new_value
wrapper = heap.BufferWrapper(size)
File "C:\Python27\lib\multiprocessing\heap.py", line 242, in __init__
assert 0 <= size < sys.maxint
AssertionError
It seems that it is above some maxint number, however, even when I run a basic example like below:
from multiprocessing.sharedctypes import RawArray
import sys
xsize = 999999999
#create an empty array
print('MaxInt:',sys.maxint)
print('My Size:',xsize)
shared_array = RawArray('d', xsize)
The print statements show:
('MaxInt:', 2147483647)
('My Size:', 999999999)
Why is this happening, and how can I make a shared array for multiprocessing when having very large arrays? My computer has 128GB of RAM, so that shouldn't be the issue.