import ipyparallel as ipp
ipp.__version__
'7.0.0.dev'
import os
!sh -c 'cd {os.path.dirname(ipp.__file__)} && git describe'
7.0.0a5-7-gd4ed8c93
with ipp.Cluster(n=4) as rc:
view = rc.load_balanced_view()
tic = time.perf_counter()
ar = view.map_async(time.sleep, [0.1] * 100)
toc = time.perf_counter()
print(f"Submitted {len(ar)} tasks in {toc-tic:.3f}s")
ar.wait_interactive()
print(f"Completed in {ar.wall_time:.1f}s")
Sending output for ipcontroller-touchy-1627895308-1ph8-66674 to /Users/minrk/.ipython/profile_default/log/ipcontroller-touchy-1627895308-1ph8-66674.log Starting 4 engines with <class 'ipyparallel.cluster.launcher.LocalEngineSetLauncher'> Sending output for 0 to /Users/minrk/.ipython/profile_default/log/ipengine-touchy-1627895308-1ph8-1627895308-l2vh-0.log Sending output for 1 to /Users/minrk/.ipython/profile_default/log/ipengine-touchy-1627895308-1ph8-1627895308-l2vh-1.log Sending output for 2 to /Users/minrk/.ipython/profile_default/log/ipengine-touchy-1627895308-1ph8-1627895308-l2vh-2.log Sending output for 3 to /Users/minrk/.ipython/profile_default/log/ipengine-touchy-1627895308-1ph8-1627895308-l2vh-3.log
0%| | 0/4 [00:00<?, ?engine/s]
Submitted 100 tasks in 0.178s
sleep: 0%| | 0/100 [00:00<?, ?tasks/s]
Completed in 2.9s Stopping engine(s): 1627895308-l2vh engine set stopped 1627895308-l2vh: {0: {'exit_code': 0, 'pid': 66684, 'identifier': 0}, 1: {'exit_code': None, 'pid': 66685, 'identifier': 1}, 2: {'exit_code': 0, 'pid': 66686, 'identifier': 2}, 3: {'exit_code': None, 'pid': 66687, 'identifier': 3}} Stopping controller Controller stopped: {'exit_code': 0, 'pid': 66683, 'identifier': 'ipcontroller-touchy-1627895308-1ph8-66674'}