Skip to content

Useful Environment Variables🔗

The env folder contains some example configuration files you can use to setup your Shell environment to make interacting with the H4H cluster as convenient as possible.

While setting these up is optional, it can be easier than remembering a bunch of paths and IPs associated with the servers and directories available on H4H.

This tutorial assumes you are using a Unix-compatible shell. If you are using Powershell on Windows, unfortunately this tutorial isn't for you; consider installing Window Subsystem for Linux (WSL).

Local Environment🔗

The env/local.bash_env file includes environment variables with the IPs and ports for the remote nodes on H4H. It can be copied into your home directory and renamed to .bash_env. To load the variables when the Shell starts, you need to edit your rc file (e.g., .bashrc for Bash or .zshrc for ZSH on macOS). Open the appropriate file (e.g., nano ~/.bashrc) and add the following lines:

# if the file exists, load it
if [ -f ~/.bash_env ]; then
    source ~/.bash_env
fi

Save the file and either restart your shell or run source ~/.bashrc to load the associated variables. You can test if this worked with:

echo $H4HLOGIN

This should print the login node IP.

Remote Environment🔗

To make navigating between the various group directories and sub directories on H4H easier, the file env/remote.bash_env contains a set of standard enviromental variables for use in scripts on H4H. The setup is the same as for your local .bash_env file, but should be completed on the login node after you make an SSH connection to the server. It provides links to standard directories specified in the H4H Data Management Plan that can make it easier for you to setup and maintain your project in a DMP-compliant manner.

Visit the tutorial on connecting to H4H to learn how to connect to the login node and setup your environment.