--- title: 'Setup of the login node ' taxonomy: category: - docs --- [toc] ## Login Shell{#login_shell} The default login shell is set to bash. The basic PATH settings are automatically loaded, but to create a personalized startup file, prepare a shell such as .bashrc (for bash). ! Please do not delete the following contents in the home .bashrc, as they are necessary for setting up the bash environment. ```nohighlight # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi ``` ### Change of the Login Shell{#change_shell} You can change the login shell from the [User Portal](https://web.kudpc.kyoto-u.ac.jp/portal/). 1. Log in to the User Portal. 2. Select **Change Login Shell** from the left menu. 3. Select the login shell that you want to change from the pull-down menu and press **SUBMIT**. ### Notes on creating shell startup files{#precautions_shell} If you want to execute startup commands only on a particular system, you can write a conditional statement according to the result of the hostname command, as shown in the following example. **For .bashrc – bash** ```nohighlight case `hostname` in camphor*) #Processing for system A ;; laurel*) #Processing for System B, C and Cloud ;; gardenia*) #Processing for System G ;; esac ``` **For .tcshrc – tcsh** ```nohighlight switch(`hostname`) case camphor*: #Processing for system A breaksw case laurel*: #Processing for System B, C and Cloud breaksw case gardenia*: #Processing for System G breaksw endsw ``` ## Use of software (Modules) to change the setup {#modules} Modules is a software that allows you to set up the necessary environment settings for using compilers, libraries, and applications on each system at once. Please refer to [Modules](/config/modules) for details. ### Default environment in FY2023 (as of 2023-04-01) Each login node has a different module environment that is automatically loaded at login. The batch processing environment and the compiler environment in the following table are loaded. When the fiscal year changes or the system configuration changes, we review the environment and version to be loaded. | login node | System Environment | Batch Processing Environment | Compile Environment |---------- | ---------------- | ------------- | --------------- | camphor.kudpc.kyoto-u.acjp | SysA | slurm | intel, intelmpi, PrgEnvIntel | laurel.kudpc.kyoto-u.acjp | SysB | slurm | intel, intelmpi, PrgEnvIntel | cinnamon.kudpc.kyoto-u.ac.jp | SysC | slurm | intel, intelmpi, PrgEnvIntel | gardenia.kudpc.kyoto-u.ac.jp | SysG | slurm | nvhpc, openmpi, PrgEnvNvidia If you want to switch from the login environment to the cloud system environment, you can switch with the following command. ```bash $ module switch SysCL ``` ## Notification Email from the System{#notification_mail} Notification emails from the system, such as Slurm error notifications, are sent to the local email addresses of system A, B, C, and E. You can check this email with the **mutt** command, but we recommend that you create a .forward file in your home directory and forward it to your regular email address so that you can check it as soon as possible. #### Example of creating forward file. ```nohighlight ## Set up to forward email to foo@example.com $ echo "foo@example.com" > ~/.forward ``` ## Translating Messages into Japanese{#message_japanese} To translate command output and compiler translation messages into Japanese, set **ja_JP.UTF-8** to the environment variable LANG as well as set the character encoding of your SSH client (e.g. PuTTY) to **UTF-8**. ```nohighlight ## Set environment variable LANG (for bash) $ export LANG=ja_JP.UTF-8 ## Set environment variable LANG (for tcsh) $ setenv LANG ja_JP.UTF-8 ## The man command is displayed in Japanese. $ man man man(1) man(1) Name man - Format and display online manual pages. manpath - Determine the search path for manual pages for each user. Format man [-adfhktwW] [-m system] [-p string] [-C config_file] [-M path] [-P pager] [-S section_list] [section] name ... ``` <!-- ## cronの設定{#cron_setting} 定期的な処理を自動で実行させたい場合などは、cronを使用します。 複数台で構成されているログインノードのうち、システムAではcamphor1、システムB、Cではlaurel1のみ設定が可能です。cronの設定が可能なログインノードにログインする場合は、 [システム内でsshを行うための鍵ペア作成](#key) を行っている必要があります。 **cronの設定(システムAの場合)** ```nohighlight ## cron設定が可能なcamphor1にログイン $ ssh camphor1.kudpc.kyoto-u.ac.jp ## cronの設定内容を確認する $ crontab -l ## cronの設定(エディタが開く) $ crontab -e ``` --> ## Process Limits{#limit} Since the login node is shared by many users, CPU and memory utilization is limited. CPU time limit can be extended with the commands described below. Please extend as necessary. | Item | Initial Value | Maximum Value | - | - | - | CPU Time / Process | 4 hours | 24 hours | Number of CPU cores / user | 4 cores | same as on the left | Memory size / user | 16GB | same as on the left ### For bash{#limit_bash} If you are using bash, use the ulimit command. **Check the current settings** ```nohighlight $ ulimit -a ... cpu time (seconds, -t) 14400 ... ``` **Extend to maximum value** ```nohighlight $ ulimit -t 86400 # Extend CPU TIME to the maximum value $ ulimit -a # Check ... cpu time (seconds, -t) 86400 ... ``` ### For tcsh{#limit_tcsh} If you are using tcsh, you can use the limit and unlimit commands to check the settings and extend to the maximum value. **Check the current settings** ```nohighlight $ limit cputime 4:00:00 ... ``` **Extend to maximum value** ```nohighlight $ unlimit # Extend $ limit # Check cputime 24:00:00 ... ```