From 745473a00a1d525fb4f2580b3e6924505e122f64 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Wed, 17 Sep 2025 15:04:26 -0400 Subject: [PATCH 1/3] update instructions for remote vis --- sphinx_docs/source/workstations.rst | 67 +++++++++++++++-------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/sphinx_docs/source/workstations.rst b/sphinx_docs/source/workstations.rst index 1cb5dfe..9190d0a 100644 --- a/sphinx_docs/source/workstations.rst +++ b/sphinx_docs/source/workstations.rst @@ -6,56 +6,59 @@ Linux Workstations In general GCC 10.x works well on Linux workstations. -GPU offloading -============== -We use the GNU compilers to build with nvcc and CUDA. - -bender ------- - -Compile as:: +Remote vis with Jupyter +======================= - module load gcc/7.3 +You can connect to Jupyter on ahsoka via ssh to do remote visualization. - make CUDA_VERSION=cc60 COMPILE_CUDA_PATH=/usr/local/cuda-11.3 \ - USE_CUDA=TRUE COMP=gnu -j 4 +On ahsoka: -To run the CUDA code path without GPU launching, add:: +* Install jupyter and yt (if you don't already have them):: - NO_DEVICE_LAUNCH=TRUE + pip install jupyterlab + pip install yt +* Start up jupyter on the remote (ahsoka) machine:: -groot ------ + jupyter lab --no-browser --ip=127.0.0.1 -We need to work around a bug in the headers in the default GCC 10.2 on groot, -so we load an older version for the GPU build. + when you do this, it will output a lot to the screen, but + look for a line that starts like:: -Compile as:: + http://127.0.0.1:8888/lab?token=8469f3fb822e2a32c94... - module load gcc/7.3 + The ``8888`` there is the port. If that is being used, Jupyter + will pick a higher one. Make note of the number it picked. - make CUDA_VERSION=cc70 COMPILE_CUDA_PATH=/usr/local/cuda-11.3 \ - USE_CUDA=TRUE COMP=gnu USE_MPI=FALSE -j 4 +* On your local workstation do:: + ssh -N -L 8888:127.0.0.1:8888 ahsoka.astro.sunysb.edu + replacing the ``8888`` with the port it selected. Then enter your + password. There will be no output---that command will just continue + to run in the terminal window. -Remote vis with Jupyter -======================= + .. tip:: -You can connect to Jupyter on groot to do remote visualization. + This says that port ``8888`` on your local machine will connect (via + SSH tunnel) to ``127.0.0.1:8888`` on the remote machine. Here + ``127.0.0.1`` is the *loopback address* (the IP address on the + remote machine that resolves to itself) -On groot, do:: + If you get an error like:: - jupyter lab --no-browser --ip="groot" + bind [127.0.0.1]:8888: Address already in use + channel_setup_fwd_listener_tcpip: cannot listen to port: 8888 + Could not request local forwarding. -on your workstation do:: + then that means that you are running Jupyter already on your local + machine, and it is already using port ``8888``, so kill the local + instance of Jupyter and try again. - ssh -N -L localhost:8888:groot:8888 groot.astro.sunysb.edu +* Finally, on your local machine, point your web browser to the URL + output on ahsoka (we referenced this above as ``http://127.0.0.1:8888/lab?token=8469f3fb822e2a32c94...`` -and enter your password. There will be no output---that command will just continue -to run in the terminal window. + This should open the Jupyter server on the remote machine in your + local browser. -Point your web browser to http://localhost:8888 . -You will be prompted to add the token that appears in the groot window. From 76b107e01bc737eb33dbf0afa9b547b9ad2c9605 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Wed, 17 Sep 2025 15:10:08 -0400 Subject: [PATCH 2/3] update --- sphinx_docs/source/workstations.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sphinx_docs/source/workstations.rst b/sphinx_docs/source/workstations.rst index 9190d0a..9622642 100644 --- a/sphinx_docs/source/workstations.rst +++ b/sphinx_docs/source/workstations.rst @@ -35,6 +35,17 @@ On ahsoka: ssh -N -L 8888:127.0.0.1:8888 ahsoka.astro.sunysb.edu + .. tip:: + + If your username on ``ahsoka`` is not the same as on your + local machine, then you need to prefix your username to + the remote, e.g., as:: + + ssh -N -L 8888:127.0.0.1:8888 username@ahsoka.astro.sunysb.edu + + where you replace ``username`` with your ``ahsoka`` username. + + replacing the ``8888`` with the port it selected. Then enter your password. There will be no output---that command will just continue to run in the terminal window. From eb2f0bc9a4996ddbe304d6de951cd38b51e8e003 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Wed, 17 Sep 2025 15:12:26 -0400 Subject: [PATCH 3/3] update again --- sphinx_docs/source/workstations.rst | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/sphinx_docs/source/workstations.rst b/sphinx_docs/source/workstations.rst index 9622642..25b4bb3 100644 --- a/sphinx_docs/source/workstations.rst +++ b/sphinx_docs/source/workstations.rst @@ -35,6 +35,8 @@ On ahsoka: ssh -N -L 8888:127.0.0.1:8888 ahsoka.astro.sunysb.edu + replacing the ``8888`` with the port it selected. + .. tip:: If your username on ``ahsoka`` is not the same as on your @@ -45,10 +47,8 @@ On ahsoka: where you replace ``username`` with your ``ahsoka`` username. - - replacing the ``8888`` with the port it selected. Then enter your - password. There will be no output---that command will just continue - to run in the terminal window. + Then enter your password. There will be no output---that command + will just continue to run in the terminal window. .. tip:: @@ -57,18 +57,20 @@ On ahsoka: ``127.0.0.1`` is the *loopback address* (the IP address on the remote machine that resolves to itself) - If you get an error like:: + .. warning:: + + If you get an error like:: - bind [127.0.0.1]:8888: Address already in use - channel_setup_fwd_listener_tcpip: cannot listen to port: 8888 - Could not request local forwarding. + bind [127.0.0.1]:8888: Address already in use + channel_setup_fwd_listener_tcpip: cannot listen to port: 8888 + Could not request local forwarding. - then that means that you are running Jupyter already on your local - machine, and it is already using port ``8888``, so kill the local - instance of Jupyter and try again. + then that means that you are running Jupyter already on your local + machine, and it is already using port ``8888``, so kill the local + instance of Jupyter and try again. * Finally, on your local machine, point your web browser to the URL - output on ahsoka (we referenced this above as ``http://127.0.0.1:8888/lab?token=8469f3fb822e2a32c94...`` + output on ahsoka (we referenced this above as ``http://127.0.0.1:8888/lab?token=8469f3fb822e2a32c94...``) This should open the Jupyter server on the remote machine in your local browser.