You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/dev/miniconda3/envs/dev/lib/python3.10/site-packages/distributed/node.py:182: UserWarning: Port 8787 is already in use.
Perhaps you already have a cluster running?
Hosting the HTTP server on port 45637 instead
warnings.warn(
2023-05-23 18:37:16,205 - distributed.nanny - ERROR - Failed to start process
Traceback (most recent call last):
File "/home/dev/miniconda3/envs/dev/lib/python3.10/site-packages/distributed/nanny.py", line 443, in instantiate
result = await self.process.start()
File "/home/dev/miniconda3/envs/dev/lib/python3.10/site-packages/distributed/nanny.py", line 713, in start
await self.process.start()
File "/home/dev/miniconda3/envs/dev/lib/python3.10/site-packages/distributed/process.py", line 55, in _call_and_set_future
res = func(*args, **kwargs)
File "/home/dev/miniconda3/envs/dev/lib/python3.10/site-packages/distributed/process.py", line 215, in _start
process.start()
File "/home/dev/miniconda3/envs/dev/lib/python3.10/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/home/dev/miniconda3/envs/dev/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
return Popen(process_obj)
File "/home/dev/miniconda3/envs/dev/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/home/dev/miniconda3/envs/dev/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/home/dev/miniconda3/envs/dev/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/home/dev/miniconda3/envs/dev/lib/python3.10/multiprocessing/spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
File "/home/dev/miniconda3/envs/dev/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
Do I need to wrap the solver into __main__ function?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello there,
I setup a local cluster and try to run the solver parallel to solve some optimization problem using pymoo framework. The code is quite simple:
And it throws below error:
Do I need to wrap the solver into
__main__
function?Beta Was this translation helpful? Give feedback.
All reactions