I am often using Jupyterlab when I work with Julia, and for computation intensive tasks I often start out with
using Distributed
addprocs(25-nprocs())
@everywhere import Dagger
From time to time the kernel needs to be restarted, but what happens then is that the processes I already started lives on, but are not available to the newly started kernel, so another 24 processes are started every time this happens.
Killing the processes individually is not a very feasible approach, as is doing a killall julia
since I often have other Julia processes running.
So, is there a way to kill the processes before restarting the kernel, or is this something that should not happen in the first place? (I am not sure, but I think that this did not use to be a problem before, but I am not sure)
I am currently on Julia 1,11.4 and Jupyterlab 4.3.5 running under Arch Linux with kernel 6.13.5