@@ -6,56 +6,72 @@ Linux Workstations
66In general GCC 10.x works well on Linux workstations.
77
88
9- GPU offloading
10- ==============
119
12- We use the GNU compilers to build with nvcc and CUDA.
10+ Remote vis with Jupyter
11+ =======================
1312
14- bender
15- ------
13+ You can connect to Jupyter on ahsoka via ssh to do remote visualization.
1614
17- Compile as: :
15+ On ahsoka :
1816
19- module load gcc/7.3
17+ * Install jupyter and yt (if you don't already have them)::
2018
21- make CUDA_VERSION=cc60 COMPILE_CUDA_PATH=/usr/local/cuda-11.3 \
22- USE_CUDA=TRUE COMP=gnu -j 4
19+ pip install jupyterlab
20+ pip install yt
2321
24- To run the CUDA code path without GPU launching, add ::
22+ * Start up jupyter on the remote (ahsoka) machine ::
2523
26- NO_DEVICE_LAUNCH=TRUE
24+ jupyter lab --no-browser --ip=127.0.0.1
2725
26+ when you do this, it will output a lot to the screen, but
27+ look for a line that starts like::
2828
29- groot
30- -----
29+ http://127.0.0.1:8888/lab?token=8469f3fb822e2a32c94...
3130
32- We need to work around a bug in the headers in the default GCC 10.2 on groot,
33- so we load an older version for the GPU build .
31+ The ``8888`` there is the port. If that is being used, Jupyter
32+ will pick a higher one. Make note of the number it picked .
3433
35- Compile as ::
34+ * On your local workstation do ::
3635
37- module load gcc/7.3
36+ ssh -N -L 8888:127.0.0.1:8888 ahsoka.astro.sunysb.edu
3837
39- make CUDA_VERSION=cc70 COMPILE_CUDA_PATH=/usr/local/cuda-11.3 \
40- USE_CUDA=TRUE COMP=gnu USE_MPI=FALSE -j 4
38+ replacing the ``8888`` with the port it selected.
4139
40+ .. tip::
4241
42+ If your username on ``ahsoka`` is not the same as on your
43+ local machine, then you need to prefix your username to
44+ the remote, e.g., as::
4345
44- Remote vis with Jupyter
45- =======================
46+ ssh -N -L 8888:127.0.0.1:8888 username@ahsoka.astro.sunysb.edu
47+
48+ where you replace ``username`` with your ``ahsoka`` username.
49+
50+ Then enter your password. There will be no output---that command
51+ will just continue to run in the terminal window.
52+
53+ .. tip::
54+
55+ This says that port ``8888`` on your local machine will connect (via
56+ SSH tunnel) to ``127.0.0.1:8888`` on the remote machine. Here
57+ ``127.0.0.1`` is the *loopback address* (the IP address on the
58+ remote machine that resolves to itself)
4659
47- You can connect to Jupyter on groot to do remote visualization.
60+ .. warning::
4861
49- On groot, do ::
62+ If you get an error like ::
5063
51- jupyter lab --no-browser --ip="groot"
64+ bind [127.0.0.1]:8888: Address already in use
65+ channel_setup_fwd_listener_tcpip: cannot listen to port: 8888
66+ Could not request local forwarding.
5267
53- on your workstation do::
68+ then that means that you are running Jupyter already on your local
69+ machine, and it is already using port ``8888``, so kill the local
70+ instance of Jupyter and try again.
5471
55- ssh -N -L localhost:8888:groot:8888 groot.astro.sunysb.edu
72+ * Finally, on your local machine, point your web browser to the URL
73+ output on ahsoka (we referenced this above as ``http://127.0.0.1:8888/lab?token=8469f3fb822e2a32c94... ``)
5674
57- and enter your password. There will be no output---that command will just continue
58- to run in the terminal window .
75+ This should open the Jupyter server on the remote machine in your
76+ local browser .
5977
60- Point your web browser to http://localhost:8888 .
61- You will be prompted to add the token that appears in the groot window.
0 commit comments