[Numpy-discussion] Annoyance of memap rray withmultiprocessing.Pool.applay_async

Nadav Horesh nadavh@visionsense....
Sat Apr 3 23:35:29 CDT 2010


Got it, thank you.
But why, nevertheless, the results are correct although the pickling is impossible?

   Nadav.


-----Original Message-----
From: numpy-discussion-bounces@scipy.org on behalf of Robert Kern
Sent: Sat 03-Apr-10 23:47
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Annoyance of memap rray withmultiprocessing.Pool.applay_async
 
On Sat, Apr 3, 2010 at 14:29, Nadav Horesh <nadavh@visionsense.com> wrote:
>
> The following script generate the following error on every loop iteration in the function average:
>
> Exception AttributeError: AttributeError("'NoneType' object has no attribute 'tell'",) in <bound method memmap.__del__ of memmap(xxxxxx)> ignored
>
> where xxxxxx is a scalar (the array sum).
>
> I get this error with numpy1.4 on a linux64 (dual core) machine. A winXP/Pentium4 with 2GB Ram could not run it since it explode the memory.
>
>  Any idea what is the origin on the error (my interset is the linux box)?
>

memmap instances don't pickle. Don't pass them as arguments to
apply_async() or related functions. Instead, pass the filename and
other arguments to memmap() and reconstruct the arrays in each
process.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3757 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100404/82647e09/attachment.bin 


More information about the NumPy-Discussion mailing list