Skip to content

Commit 5b5567e

Browse files
committed
Update jupyter doc.
1 parent e397577 commit 5b5567e

File tree

3 files changed

+36
-18
lines changed

3 files changed

+36
-18
lines changed

doc/in-situ-python-analysis/jupyter-notebook/frontend.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Use `TAB` key to do auto-completion.
3434

3535
### User Interface
3636

37-
This is the same as traditional Jupyter Notebook UI. Be careful when sending kernel related instructions (ex: shutdown/interrupt/restart a kernel).
37+
This is the same as traditional Jupyter Notebook UI. Be careful when sending kernel related instructions (ex: shutdown/interrupt/restart a kernel). Interrupting and restarting the kernel is not supported in libyt kernel yet.
3838

3939
```{attention}
4040
If the notebook is connected to libyt kernel, restarting only exits the kernel, and libyt API [`yt_run_JupyterKernel`](../../libyt-api/yt_run_jupyterkernel.md#yt_run_jupyterkernel) returns. It won't restart another kernel by itself.
@@ -50,4 +50,4 @@ Go to `Running Terminals and Kernels` -> `Shutdown Kernel`.
5050

5151
After exiting the kernel, the simulation process may continue its job.
5252
While waiting for a new libyt kernel being launched, we don't need to close the entire notebook to reconnect to it.
53-
We can choose the libyt kernel from the kernel list once libyt kernel is activated again.
53+
We can choose the libyt kernel from the kernel list once it is activated again.

doc/in-situ-python-analysis/jupyter-notebook/local-desktop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
It will launch libyt kernel once it detects `LIBYT_STOP`.
1212
To make `libyt` find and bind to unused port automatically, set it to `false`.
1313
2. Wait for connection from Jupyter Notebook / JupyterLab (See below [Connecting to Kernel](#connecting-to-kernel))
14-
3. Shutdown the kernel (See [How to Exit](./jupyter-notebook-access.md#how-to-exit)).
14+
3. Shutdown the kernel (See [How to Exit](./frontend.md#how-to-exit)).
1515
1616
## Connecting to Kernel
1717

doc/in-situ-python-analysis/jupyter-notebook/remote-cluster.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,20 @@
2424
"key": "64e13a6faaf1470eb1f86df565543923"
2525
}
2626
```
27-
- `ip` should be the internal ip of the computing node, where MPI root process is. Normally, we can find it in `/etc/hosts`:
28-
```bash
29-
cat /etc/hosts
30-
```
31-
- Ports should be unused. If the ports are in use, then `libyt` will block and wait for you to provide a new one.
27+
28+
```{eval-rst}
29+
.. tip::
30+
- ``ip`` should be the internal ip of the computing node, where MPI root process is. Normally, we can find it in ``/etc/hosts``:
31+
32+
.. code-block:: bash
33+
34+
cat /etc/hosts
35+
36+
- Ports should be unused. If the ports are in use, then ``libyt`` will block and wait for you to provide a new one.
37+
```
38+
3239
4. Wait for incoming connection from Jupyter Notebook / JupyterLab (See below [Connecting to Kernel](#connecting-to-kernel))
33-
5. Shutdown the kernel. ([How to Exit](./jupyter-notebook-access.md#how-to-exit))
40+
5. Shutdown the kernel. ([How to Exit](./frontend.md#how-to-exit))
3441

3542
## Connecting to Kernel
3643

@@ -39,7 +46,9 @@ Finally, we can open the web browser on our local laptop and connect to libyt ke
3946

4047
Please go through [Login Node](#login-node) before going through [Local Laptop](#local-laptop) Section.
4148

42-
> {octicon}`info;1em;sd-text-info;` We don't need a running simulation before going through these steps. These steps can also check if SSH tunneling is working and can launch other kernels (like ipykernel) on login node, not just connecting to libyt kernel.
49+
```{note}
50+
We don't need a running simulation before going through these steps. These steps can also check if SSH tunneling is working and can launch other kernels (like ipykernel) on login node, not just connecting to libyt kernel.
51+
```
4352

4453
### Login Node
4554

@@ -63,15 +72,24 @@ Please go through [Login Node](#login-node) before going through [Local Laptop](
6372
```
6473
Here, we assume login node's internal ip is `192.168.0.150`.
6574
2. After [Login Node](#login-node) has started a no-browser jupyter notebook, use SSH port forwarding and connect to the Jupyter Notebook / JupyterLab server on the login node.
66-
```bash
67-
ssh -p <host_port> -N <user>@<host> -L localhost:YYYY:192.168.0.150:XXXX
75+
```{eval-rst}
76+
.. tip::
77+
An SSH connection would be like:
78+
79+
.. code-block:: bash
80+
81+
ssh -p <host_port> <user>@<host>
82+
83+
SSH port forwarding would be like:
84+
85+
.. code-block:: bash
86+
87+
ssh -p <host_port> -N <user>@<host> -L localhost:YYYY:192.168.0.150:XXXX
88+
89+
``YYYY`` is the port you want to bind to on local laptop,
90+
and ``XXXX`` is the port where JupyterLab binds to on login node.
91+
If there is no ``<host_port>``, simply remove ``-p <host_port>``.
6892
```
69-
- Replace `<host_port>`, `<user>`, and `<host>` to SSH connection settings. For example, an SSH connection would be like:
70-
```bash
71-
ssh -p <host_port> <user>@<host>
72-
```
73-
If there is no `<host_port>`, simply remove `-p <host_port>`.
74-
- `YYYY` is the port you want to bind to on local laptop.
7593
3. Leave the terminal open. (It's normal if it doesn't print anything after connection.)
7694
4. Copy and paste the link from [Login Node -- Step 3](#login-node) and change `XXXX` to `YYYY` in browser.
7795
5. Click "Libyt" kernel and connect to libyt kernel launched by libyt API [`yt_run_JupyterKernel`](../../libyt-api/yt_run_jupyterkernel.md#yt_run_jupyterkernel).

0 commit comments

Comments
 (0)