NOAA-EMC / GEFS

4 stars 14 forks source link

Remove -l and --login flags #116

Closed XianwuXue-NOAA closed 1 year ago

XianwuXue-NOAA commented 1 year ago

Based on NCO's comments below, all -l and --login flags in bin files should be removed, please note that these changes will not affect NCO's parts, just affect developer using rococo workflow:

It has been noted that there is slowness when logging into the development machine. A major contributor to this problem is the multiple initializations of the user login environment when running scripts with the -l or --login flags. There are many scripts beginning with #!/bin/bash -l or #!/bin/bash --login in order to automatically load the user's environment when executed via cron. Each time the -l or --login is used, all modules from your login scripts are loaded and this could be multiple times if several scripts are called during your cron or interactive session. To improve performance and avoid the negative impacts of excessive module loads, we are asking user's to do the following

1) Remove -l or --login and only have #!/bin/bash at the top of all of your scripts. (or the equivalent shell you use) 2) Edit your crontab to have the first line as as SHELL=/bin/bash -l (or csh/ksh shell equivalent) to initialize your cron environment on startup so that using -l or --login on shell scripts is not needed.

XianwuXue-NOAA commented 1 year ago

I will do it in each job, so the issue is not needed.