multiprocessing on freebsd

Tim Arnold tim.arnold at sas.com
Thu Mar 18 12:38:34 EDT 2010


"Martin P. Hellwig" <martin.hellwig at dcuktec.org> wrote in message 
news:hnrabj$c4v$1 at news.eternal-september.org...
> On 03/17/10 13:30, Tim Arnold wrote:
>> Hi,
>> I'm checking to see if multiprocessing works on freebsd for any
>> version of python. My server is about to get upgraded from 6.3 to 8.0
>> and I'd sure like to be able to use multiprocessing.
>>
>> I think the minimal test would be:
>> ---------------------
>> import multiprocessing
>> q = multiprocessing.Queue()
>> ---------------------
>>
>> with 6.3, I get
>>
>>   File "/usr/local/lib/python2.6/multiprocessing/__init__.py", line
>> 212, in Queue
>>      from multiprocessing.queues import Queue
>>    File "/usr/local/lib/python2.6/multiprocessing/queues.py", line 22,
>> in<module>
>>      from multiprocessing.synchronize import Lock, BoundedSemaphore,
>> Semaphore, Condition
>>    File "/usr/local/lib/python2.6/multiprocessing/synchronize.py", line
>> 33, in<module>
>>      " function, see issue 3770.")
>> ImportError: This platform lacks a functioning sem_open
>> implementation, therefore, the required synchronization primitives
>> needed will not function, see issue 3770.
>>
>
> Build mine from ports, with the following options (notice SEM & PTH):
> [martin at aspire8930 /usr/home/martin]$ cat /var/db/ports/python26/options
> # This file is auto-generated by 'make config'.
> # No user-servicable parts inside!
> # Options for python26-2.6.4
> _OPTIONS_READ=python26-2.6.4
> WITH_THREADS=true
> WITHOUT_HUGE_STACK_SIZE=true
> WITH_SEM=true
> WITH_PTH=true
> WITH_UCS4=true
> WITH_PYMALLOC=true
> WITH_IPV6=true
> WITHOUT_FPECTL=true
>
> [martin at aspire8930 /usr/home/martin]$ uname -a
> FreeBSD aspire8930 8.0-STABLE FreeBSD 8.0-STABLE #3: Wed Feb  3 17:01:18 
> GMT 2010     martin at aspire8930:/usr/obj/usr/src/sys/ASPIRE8930  amd64
> [martin at aspire8930 /usr/home/martin]$ python
> Python 2.6.4 (r264:75706, Mar 17 2010, 18:44:24)
> [GCC 4.2.1 20070719  [FreeBSD]] on freebsd8
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import multiprocessing as mp
> >>> queue = mp.Queue()
> >>>
>
> hth
> -- 
> mph

Hi Martin, thanks very much for posting that. All I can say is YAY! I'm 
really looking forward to my machine's upgrade now!

thanks,
--Tim





More information about the Python-list mailing list