From 95eca0244fade1769f7511a122119fc5e526a5cd Mon Sep 17 00:00:00 2001 From: suzannepaterno <129112900+suzannepaterno@users.noreply.github.com> Date: Mon, 31 Jul 2023 12:24:56 -0400 Subject: [PATCH 1/4] Update documentation for using TotalView with Flux Add a few updates for the different UIs as well as some info on canceling flux job --- jobs/debugging.rst | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/jobs/debugging.rst b/jobs/debugging.rst index f589a02..8edd1a2 100644 --- a/jobs/debugging.rst +++ b/jobs/debugging.rst @@ -26,10 +26,11 @@ Attaching to an already running job: $ PID=$! $ totalview -pid ${PID} /proc/${PID}/exe -You can also just type ``totalview`` without ``-pid`` option and -then use its ``Start a Debugging Session`` +You can also just type ``totalview`` without ``-pid`` option +For Classic UI: use its ``Start a Debugging Session`` GUI option to select the process of this ``flux-job`` command: ``A running program (attach)``. +For new UI: use ''Attach To Process'' .. note:: You use TotalView with the newly invoked ``flux job attach`` @@ -47,6 +48,16 @@ can be handy when you debug a large-scale job. Please refer to .. _TotalView user guide: https://docs.roguewave.com/en/totalview/current/html/ +Exiting TotalView without completing a full run of your code, may not clean up the Flux job. +In that case you will need to cancel the flux job manually. + +.. code-block:: console + + $ flux cancel + +.. note:: + Use ``flux jobs`` to find + ---------------------------------------------- Better Handling of Flux's Internal Exec Events ---------------------------------------------- @@ -66,7 +77,7 @@ exec-handling Tcl code into TotalView:: catch {dset TV::exec_handling { {^(flux|lrun|srun|jsrun)(]*>()?|||)*$ go}} } -This code should either be added to the site-wide ``.tvdrc`` file +This code has been added to the site-wide ``.tvdrc`` file to enable this for all TotalView sessions or per-user file (e.g., ``tvdrc`` in the current working directory) to enable this only for the user's own sessions. From 008b38e3db3a31fc67ff87da5a0a249123220924 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Fri, 1 Mar 2024 23:25:05 +0000 Subject: [PATCH 2/4] debugging: remove trailing whitespace Problem: There's some trailing whitespace and long lines in the jobs/debugging.rst doc. Fix up formatting. --- jobs/debugging.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jobs/debugging.rst b/jobs/debugging.rst index 8edd1a2..6215f71 100644 --- a/jobs/debugging.rst +++ b/jobs/debugging.rst @@ -1,7 +1,7 @@ .. _debugging: ============== -Debugging Jobs +Debugging Jobs ============== Flux supports parallel debuggers such as Rogue Wave Software (RWS)'s @@ -26,7 +26,7 @@ Attaching to an already running job: $ PID=$! $ totalview -pid ${PID} /proc/${PID}/exe -You can also just type ``totalview`` without ``-pid`` option +You can also just type ``totalview`` without ``-pid`` option For Classic UI: use its ``Start a Debugging Session`` GUI option to select the process of this ``flux-job`` command: ``A running program (attach)``. @@ -48,8 +48,8 @@ can be handy when you debug a large-scale job. Please refer to .. _TotalView user guide: https://docs.roguewave.com/en/totalview/current/html/ -Exiting TotalView without completing a full run of your code, may not clean up the Flux job. -In that case you will need to cancel the flux job manually. +Exiting TotalView without completing a full run of your code, may not clean +up the Flux job. In that case you will need to cancel the flux job manually. .. code-block:: console From 0feaa568d0e9c92a6afb82823d17cd2d22b704dd Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Fri, 1 Mar 2024 16:09:37 -0800 Subject: [PATCH 3/4] debugging: fix some formatting Problem: totalview menu options are not formatted properly. Use the :guilabel: role. --- jobs/debugging.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/jobs/debugging.rst b/jobs/debugging.rst index 6215f71..ad67289 100644 --- a/jobs/debugging.rst +++ b/jobs/debugging.rst @@ -11,8 +11,8 @@ Flux supports parallel debuggers such as Rogue Wave Software (RWS)'s Parallel Debugging using TotalView ---------------------------------- -Debugging your MPI job from the beginning of -parallel program execution: +Debugging your MPI job from the beginning +of parallel program execution: .. code-block:: console @@ -26,11 +26,13 @@ Attaching to an already running job: $ PID=$! $ totalview -pid ${PID} /proc/${PID}/exe -You can also just type ``totalview`` without ``-pid`` option -For Classic UI: use its ``Start a Debugging Session`` -GUI option to select the process of this ``flux-job`` command: -``A running program (attach)``. -For new UI: use ''Attach To Process'' +You can also just type ``totalview`` without ``-pid`` option. + +For the TotalView Classic user interface, select the process of this +``flux-job`` command with +:menuselection:`Start a Debugging Session --> A running program (attach)`. + +For new UI: use :menuselection:`Attach To Process`. .. note:: You use TotalView with the newly invoked ``flux job attach`` From bdbd3348fe00612bbc8bf6d5b8bdadeae40c4efb Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Fri, 1 Mar 2024 16:13:05 -0800 Subject: [PATCH 4/4] debugging: use site-independent language Problem: referencing the presumed content of a site wide totalview config file is inappropriate in site independent docs. Restore the earlier language. Also drop a superfluous comma. --- jobs/debugging.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/debugging.rst b/jobs/debugging.rst index ad67289..3e9b412 100644 --- a/jobs/debugging.rst +++ b/jobs/debugging.rst @@ -50,7 +50,7 @@ can be handy when you debug a large-scale job. Please refer to .. _TotalView user guide: https://docs.roguewave.com/en/totalview/current/html/ -Exiting TotalView without completing a full run of your code, may not clean +Exiting TotalView without completing a full run of your code may not clean up the Flux job. In that case you will need to cancel the flux job manually. .. code-block:: console @@ -79,7 +79,7 @@ exec-handling Tcl code into TotalView:: catch {dset TV::exec_handling { {^(flux|lrun|srun|jsrun)(]*>()?|||)*$ go}} } -This code has been added to the site-wide ``.tvdrc`` file +This code should either be added to the site-wide ``.tvdrc`` file to enable this for all TotalView sessions or per-user file (e.g., ``tvdrc`` in the current working directory) to enable this only for the user's own sessions.