sturlamolden / sharedmem-numpy Goto Github PK
View Code? Open in Web Editor NEWShared memory arrays for NumPy
Shared memory arrays for NumPy
Hi,
thanks for sharing this package! On a fresh installation (tested both Mac OS X and Linux) I'm getting this error.
In [17]: np.__version__
Out[17]: '1.9.0'
In [18]: import sharedmem as shm
In [19]: array = shm.zeros((300,300,1), dtype=float) # works fine
However, this results in the error posted below. Do you have any idea what might be causing this?
In [20]: array = shm.zeros((300,300,10), dtype=float)
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-20-cbadca5ba769> in <module>()
----> 1 array = shm.zeros((300,300,10), dtype=float)
/Users/mekman/anaconda/lib/python2.7/site-packages/sharedmem/array.pyc in shared_zeros(shape, dtype, order)
132 """ Create a shared-memory ndarray filled with 0s.
133 """
--> 134 arr = shared_empty(shape, dtype, order)
135 x = np.zeros((), arr.dtype)
136 arr[...] = x
/Users/mekman/anaconda/lib/python2.7/site-packages/sharedmem/array.pyc in shared_empty(shape, dtype, order)
123 size = int(np.prod(shape))
124 nbytes = size * dtype.itemsize
--> 125 wrapper = heap.BufferWrapper(nbytes)
126 strides = None
127 offset = 0
/Users/mekman/anaconda/lib/python2.7/site-packages/sharedmem/heap.pyc in __init__(self, size)
63 def __init__(self, size):
64 self.size = size
---> 65 self.offset, self.buf = _heap.allocate(size)
66
67 def __setstate__(self, _state):
/Users/mekman/anaconda/lib/python2.7/site-packages/sharedmem/heap.pyc in allocate(self, size)
50 with self.lock:
51 if size > mmap.PAGESIZE:
---> 52 offset, buf = self._allocate_big(size)
53 else:
54 offset, buf = self._allocate_tiny(size)
/Users/mekman/anaconda/lib/python2.7/site-packages/sharedmem/heap.pyc in _allocate_big(self, size)
42
43 def _allocate_big(self, size):
---> 44 buf = SharedMemoryBuffer(size)
45 addr, _ = buf.getbuffer()
46 return 0, buf
/Users/mekman/anaconda/lib/python2.7/site-packages/sharedmem/sharedmemory_sysv.so in sharedmem.sharedmemory_sysv.SharedMemoryBuffer.__init__ (sharedmem/sharedmemory_sysv.c:2759)()
/Users/mekman/anaconda/lib/python2.7/site-packages/sharedmem/sharedmemory_sysv.so in sharedmem.sharedmemory_sysv.SharedMemoryBuffer.__init__ (sharedmem/sharedmemory_sysv.c:2491)()
OSError: Failed to open shared memory
Hi, I tried to install sharedmem on my university server (no root access) where i have my own python installed. I get the following error:
$/sharedmem-numpy>python setup.py build_ext
sys.platform: linux2
Traceback (most recent call last):
File "setup.py", line 29, in <module>
raise RuntimeError("SysV IPC version has serious defects (Oct 2014)")
RuntimeError: SysV IPC version has serious defects (Oct 2014)
What could be the reason? Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.