Example – Connecting to Kernel on Local Machine¶
Running Simulation¶
Use libyt API
yt_run_JupyterKernel
in simulation and compile:if (yt_run_JupyterKernel("LIBYT_STOP", false) != YT_SUCCESS) { // some error message }
It will launch libyt kernel once it detects
LIBYT_STOP
. To makelibyt
find and bind to unused port automatically, set it tofalse
.Wait for connection from Jupyter Notebook / JupyterLab (See below Connecting to Kernel)
Shutdown the kernel (See How to Exit).
Connecting to Kernel¶
Go through Starting Jupyter Notebook/JupyterLab.