I am trying to create an equivalent of multiprocessing.Pool with the map functionality - only with a ProgressBar.
It seems to work with Python2, but I get an error with Python3:
_Pool_Server (24185): I'm the JobManager_Server main process
_Pool_Client (24186): FAILED to connect to (('localhost', 42524), 'map_0.601623858851451')
Process Process-6:
Traceback (most recent call last):
File "/usr/lib/python3.4/multiprocessing/process.py", line 254, in _bootstrap
self.run()
File "/usr/lib/python3.4/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/paul/repos/jobmanager/jobmanager/decorators.py", line 113, in _run_jm_client
client.start()
File "/home/paul/repos/jobmanager/jobmanager/jobmanager.py", line 525, in start
raise JMConnectionError("Can not start Client with no connection to server (shared objetcs are not available)")
ConnectionError: Can not start Client with no connection to server (shared objetcs are not available)
SyncManager (24188): started on X1Carbon:42524 with authkey 'bytearray(b'map_0.601623858851451')'
_Pool_Server (24185): started (host:X1Carbon authkey:map_0.601623858851451 port:42524 jobs:10)
_Pool_Server (24185): start processing incoming results
progress_bar (not started): terminal <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'> was reserved for us <jobmanager.progress.ProgressBarFancy object at 0x7f70ef2dc780>
progress_bar (24190): started as new loop process
progress_bar (24190): setup signal handler for loop (SIGINT:ign, SIGTERM:ign)
I am trying to create an equivalent of
multiprocessing.Pool
with themap
functionality - only with a ProgressBar.It seems to work with Python2, but I get an error with Python3:
The example script is there: https://github.com/cimatosa/jobmanager/blob/develop_pool/examples/pool_map.py
I implemented the Pool class in the decorators module: https://github.com/cimatosa/jobmanager/blob/develop_pool/jobmanager/decorators.py