mp_island starts its own ipyparallel_bfe even when constructed with an UDBFE [BUG]
- Dominant language
- C++
- Stars
- 536
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I'm passing a UDBFE with an initialized ipyparallel view to the island constructor. When initializing the population, it correctly uses the UDBFE. However, when evolving the island, it tries to create a new BFE with the default ipyparallel cluster!
**To Reproduce**
Define UDI and UDBFE
```
udi = pg.mp_island()
udbfe = pg.ipyparallel_bfe()
udbfe.init_view(client_kwargs={'profile':'my-profile'})
mybfe = pg.bfe(udbfe)
a = pg.pso_gen(gen=10)
a.set_bfe(mybfe)
algo = pg.algorithm(a)
```
Start islands. Evaluation does happen with the correct UDBFE
```
islands = [pg.island(udi = udi, algo = algo, prob = myprob, size=75, b = mybfe, r_pol = pg.fair_replace(0.0), s_pol = pg.select_best(0.0)) for _ in range(8)]
```
Error when evolving the islands:
```
RuntimeError: The asynchronous evolution of a pythonic island of type 'Multiprocessing island' raised an error:
multiprocessing.pool.RemoteTraceback:
```
```
Traceback (most recent call last):
File "/opt/conda/envs/myenv/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/opt/conda/envs/myenv/lib/python3.9/site-packages/pygmo/_py_islands.py", line 26, in _evolve_func_mp_pool
new_pop = algo.evolve(pop)
File "/opt/conda/envs/myenv/lib/python3.9/site-packages/pygmo/_py_bfes.py", line 470, in __call__
ipyparallel_bfe._view = _make_ipyparallel_view(
File "/opt/conda/envs/myenv/lib/python3.9/site-packages/pygmo/_ipyparallel_utils.py", line 14, in _make_ipyparallel_view
rc = Client(*client_args, **client_kwargs)
File "/opt/conda/envs/myenv/lib/python3.9/site-packages/ipyparallel/client/client.py", line 454, in __init__
raise OSError(msg)
OSError: Connection file '~/.ipython/profile_default/security/ipcontroller-client.json' not found.
You have attempted to connect to an IPython Cluster but no Controller could be found.
Please double-check your configuration and ensure that a cluster is running.
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.