- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -
Tmux: Difference between revisions
(Created page with "'''The problem:''' When building code for the MI300A you may encounter quite long compilation times. In order to anyway being able to build large applications, you can deploy a tool called tmux. When calling tmux from a shell it somewhat opens another shell within the first one. You can "leave" that shell by holding Ctrl and pressing b as well as pressing d afterwards (without Ctrl being held!). Actually this does not stop the shell but dispatch your terminal from said...") |
(made contents looking nice and shiny) |
||
Line 1: | Line 1: | ||
When building code for the MI300A you may encounter quite long compilation times. In order to anyway being able to build large applications, you can deploy a tool called tmux. By doing so, you will be able to log out of the system while the compilation takes place. Please find below a description of how this can be done. | |||
When calling tmux from a shell it somewhat opens another shell within the first one. You can "leave" that shell by holding Ctrl and pressing b as well as pressing d afterwards (without Ctrl being held!). Actually this does not stop the shell but | When calling tmux from a shell it somewhat opens another shell within the first one. Here you can start your build. You can "leave" that shell by holding Ctrl and pressing b as well as pressing d afterwards (without Ctrl being held!). Actually this does not stop the "inner" shell but dispatches your terminal from it (the "inner" shell continues running "in the background", even if you log out of the system). | ||
When you like to return to the shell still running "in the background", you can do so by means of the command tmux attach-session. | When you like to return to the shell still running "in the background", you can do so by means of the command | ||
$> tmux attach-session | |||
If you have multiple such sessions running "in the background" you can list them by means of the command | |||
$> tmux list-sessions | |||
Use the id listed in the first column as argument to the -t flag in order to return to a specific one, e.g. | |||
$> tmux attach-session -t 2 | |||
Further tips: | '''Further tips:''' | ||
* | * In order to keep the login node responsive for interactive usage, prepend your build command by | ||
* In case you like to see output in the shell but redirect it to a file at the same time, use <your build command> |& tee <file> | $> nice -+19 | ||
* In case you encounter issues with doing so, in particular when using colorized output, prepending your command with the command unbuffer may provide a solution, i.e. do $> unbuffer <your build command> | * In case you like to see output in the shell but redirect it to a file at the same time (e.g. for later analyses), use | ||
$> <your build command> |& tee <file> | |||
* In case you encounter issues with doing so, in particular when using colorized output, prepending your command with the command unbuffer may provide a solution, i.e. do | |||
$> unbuffer <your build command> |
Latest revision as of 00:27, 29 January 2025
When building code for the MI300A you may encounter quite long compilation times. In order to anyway being able to build large applications, you can deploy a tool called tmux. By doing so, you will be able to log out of the system while the compilation takes place. Please find below a description of how this can be done.
When calling tmux from a shell it somewhat opens another shell within the first one. Here you can start your build. You can "leave" that shell by holding Ctrl and pressing b as well as pressing d afterwards (without Ctrl being held!). Actually this does not stop the "inner" shell but dispatches your terminal from it (the "inner" shell continues running "in the background", even if you log out of the system).
When you like to return to the shell still running "in the background", you can do so by means of the command
$> tmux attach-session
If you have multiple such sessions running "in the background" you can list them by means of the command
$> tmux list-sessions
Use the id listed in the first column as argument to the -t flag in order to return to a specific one, e.g.
$> tmux attach-session -t 2
Further tips:
- In order to keep the login node responsive for interactive usage, prepend your build command by
$> nice -+19
- In case you like to see output in the shell but redirect it to a file at the same time (e.g. for later analyses), use
$> <your build command> |& tee <file>
- In case you encounter issues with doing so, in particular when using colorized output, prepending your command with the command unbuffer may provide a solution, i.e. do
$> unbuffer <your build command>