{% include-markdown "environment/workflow.md" start="" %}
For more information:
!!! warning "Getting error '-bash: module: command not found' on access/login servers"
Recall that by default, the module command is NOT available on the access/login servers (on purpose). The module command is only available on computing nodes, within a slurm job.
All UL HPC systems use global home directories. You also have access with environment variables to several other pre-defined directories setup over several different File Systems which co-exist on the UL HPC facility and are configured for different purposes. They are listed below:
{% include-markdown "../filesystems/index.md" start="" end="" %}
The default login shell is bash -- see /etc/shells for supported shells.
!!! warning "ULHPC dotfiles vs. default dotfiles"
The ULHPC team DOES NOT populate shell initialization files (also known as dotfiles) on users' home directories - the default system ones are used in your home -- you can check them in /etc/skel/.* on the access/login servers. However, you may want to install the ULHPC/dotfiles available as a Github repository. See installation notes. A working copy of that repository exists in /etc/dotfiles.d on the access/login servers. You can thus use it:
bash $ /etc/dotfiles.d/install.sh -h # Example to install ULHPC GNU screen configuration file $ /etc/dotfiles.d/install.sh -d /etc/dotfiles.d/ --screen -n # Dry-run $ /etc/dotfiles.d/install.sh -d /etc/dotfiles.d/ --screen # real install
??? info "Changing Default Login Shell (or NOT)"
If you want to change your your default login shell, you should set that up using the ULHPC IPA portal (change the Login Shell attribute). Note however that we STRONGLY discourage you to do so. You may hit unexpected issues with system profile scripts expecting bash as running shell.
/etc/profile contains Linux system wide environment and startup programs. Specific scripts are set to improve your ULHPC experience, in particular those set in the ULHPC/tools repository, for instance:
- /etc/profile.d/slurm-prompt.sh: provide info of your running Slurm job on your prompt
- /etc/profile.d/slurm.sh: several helper function to
You can create dotfiles (e.g., .bashrc, .bash_profile, or .profile, etc) in your $HOME directory to put your personal shell modifications.
??? note "Custom Bash Initialisation Files"
On ULHPC system ~/.bash_profile and ~/.profile are sourced by login shells, while ~/.bashrc is sourced by most of the shell invocations including the login shells. In general you can put the environment variables, such as PATH, which are inheritable to subshells in ~/.bash_profile or ~/.profile and functions and aliases in the ~/.bashrc file in order to make them available in subshells. ULHPC/dotfiles bash configuration even source the following files for that specific purpose:
* `~/.bash_private`: custom private functions
* `~/.bash_aliases`: custom private aliases.
??? info "Understanding Bash Startup Files order" See reference documentation. That's somehow hard to understand. Some tried to explicit it under the form of a "simple" graph -- credits for the one below to Ian Miell (another one)

This explains why normally all [ULHPC launcher scripts](https://github.com/ULHPC/tutorials/tree/devel/launchers) start with the following [sha-bang](https://tldp.org/LDP/abs/html/sha-bang.html) (`#!`) header
```bash
#!/bin/bash -l
#
#SBATCH [...]
[...]
```
That's indeed the only way (_i.e._ using `/bin/bash -l` instead of the classical `/bin/bash`) to ensure that `/etc/profile` is sourced natively, and thus that all ULHPC environments variables and modules are loaded. _If you don't proceed that way_ (i.e. following the classical approach), you **MUST** then use the following template you may see from other HPC centers:
```bash
#!/bin/bash
#
#SBATCH [...]
[...]
# Load ULHPC Profile
if [ -f /etc/profile ]; then
. /etc/profile
fi
```
Since all ULHPC systems share the Global HOME filesystem, the same $HOME is available regardless of the platform. To make system specific customizations use the pre-defined environment ULHPC_CLUSTER variable:
!!! example "Example of cluster specific settings"
```shell
case $ULHPC_CLUSTER in
"iris")
: # Settings for iris
export MYVARIABLE="value-for-iris"
;;
"aion")
: # settings for aion
export MYVARIABLE="value-for-aion"
;;
*)
: # default value for
export MYVARIABLE="default-value"
;;
esac
```
{: style="width:150px; float: right;"}

The ULHPC facility runs RedHat-based Linux Distributions, in particular:
- the Iris cluster and the Aion cluster run RedHat (RHEL) Linux operating system, version 8 on the access and compute nodes. Servers (not accessible to users) run Rocky Linux 8, which is RHEL compatible, when appropriate.
{: style="width:75px; float: right;"}
- Experimental Grid5000 clusters run Debian Linux, version 11
Thus, you are more than encouraged to become familiar - if not yet - with Linux commands. We can recommend the following sites and resources:
See ULHPC Tutorial / Getting Started
{% include-markdown "environment/modules.md" start="" end="" %} {% include-markdown "environment/easybuild.md" start="" end="" %}
:fontawesome-solid-right-to-bracket: ULHPC Environment modules{: .md-button .md-button--link } :fontawesome-solid-right-to-bracket: Using Easybuild on ULHPC Clusters{: .md-button .md-button--link }
{% include-markdown "environment/conda.md" start="" end="" %}
:fontawesome-solid-right-to-bracket: Management of work environments with Conda{: .md-button .md-button--link }
