GithubHelp home page GithubHelp logo

Comments (7)

tlikhomanenko avatar tlikhomanenko commented on August 20, 2024

Problem with numpy arrays:

x.map_sync(test_client, [range(10000)]) 

works fine.

from ipyparallel.

tlikhomanenko avatar tlikhomanenko commented on August 20, 2024
numpy.__config__.show()

>> lapack_info:
  NOT AVAILABLE
lapack_opt_info:
  NOT AVAILABLE
openblas_lapack_info:
  NOT AVAILABLE
blas_info:
    libraries = ['blas']
    library_dirs = ['/usr/lib']
    language = f77
atlas_3_10_blas_threads_info:
  NOT AVAILABLE
atlas_threads_info:
  NOT AVAILABLE
atlas_3_10_threads_info:
  NOT AVAILABLE
atlas_blas_info:
  NOT AVAILABLE
atlas_3_10_blas_info:
  NOT AVAILABLE
lapack_src_info:
  NOT AVAILABLE
atlas_blas_threads_info:
  NOT AVAILABLE
openblas_info:
  NOT AVAILABLE
blas_mkl_info:
  NOT AVAILABLE
blas_opt_info:
    libraries = ['blas']
    library_dirs = ['/usr/lib']
    language = f77
    define_macros = [('NO_ATLAS_INFO', 1)]
atlas_info:
  NOT AVAILABLE
atlas_3_10_info:
  NOT AVAILABLE
lapack_mkl_info:
  NOT AVAILABLE
mkl_info:
  NOT AVAILABLE

from ipyparallel.

dhirschfeld avatar dhirschfeld commented on August 20, 2024

The array is writeable? Maybe try explicitly setting the flag, or if it is writeable setting it inside the test_client function or both (just guessing here)

In [1]: x = np.ones(1000)

In [2]: x.flags
Out[2]: 
  C_CONTIGUOUS : True
  F_CONTIGUOUS : True
  OWNDATA : True
  WRITEABLE : True
  ALIGNED : True
  UPDATEIFCOPY : False

In [3]: x.flags['WRITEABLE'] = True

In [4]: def test_client(x):
   ...:     x.flags['WRITEABLE'] = True
   ...:     return x

from ipyparallel.

minrk avatar minrk commented on August 20, 2024

When pyzmq provides a buffer owned by zeromq, which happens for the zero-copy recv on the engine, it is flagged as read-only.

from ipyparallel.

tlikhomanenko avatar tlikhomanenko commented on August 20, 2024

The problem in memoryview which is used during sending data to client. This is an error of python 2.7.3

import numpy
x  = numpy.arange(10000)
memoryview(buffer(a.data)
>>
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-23-1db7db8f2911> in <module>()
----> 1 memoryview(buffer(a.data))

TypeError: cannot make memory view because object does not have the buffer interface

from ipyparallel.

minrk avatar minrk commented on August 20, 2024

Hm, I'm having some trouble reproducing this. Does it work if you get more recent pyzmq and/or ipyparallel, both of which have had releases since the version you list?

from ipyparallel.

tlikhomanenko avatar tlikhomanenko commented on August 20, 2024

I reinstalled ipyparallel == 4.0.0 (pyzmq 15.0.0), the same error. After installation pyzmq 14.7.0 the error is the same. With pyzmq==14.4.0/14.5.0/14.6.0 it works!

from ipyparallel.

Related Issues (20)

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.