Giter Club home page Giter Club logo

sharedmem-numpy's People

Contributors

larsmans avatar sturlamolden avatar vmlaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sharedmem-numpy's Issues

OSError: Failed to open shared memory

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

Does not build on linux2?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.