Skip to content

best practices

Stratis Ioannidis edited this page Jan 8, 2023 · 18 revisions

Best Practices

Do NOT Run Jobs on the Gateways!!!

NEVER run jobs on the gateway. Always either reserve an interactive node, or submit your jobs through batch scripts, as described here.

Storage

Avoid running disk I/O heavy jobs from your home directory. Additional options can be found in disk storage.

Aliases

You'll soon realize you need to write the same commands over and over while using discovery cluster. Defining aliases for such commands can speed up your workflow. You need to define aliases in your ~/.bashrc file. Structure looks like this:

alias aliasname='commands'

So whenever you call aliasname, commands will be executed. Some useful examples are:

alias sq="squeue -l -u ($username)"
alias si="sinfo -Nle"

More examples of useful aliases can be found in this .bashrc file example.

Advanced SSH Login

Password-less Login

To avoid entering your password every time you connect to Discovery, you can generate an SSH key and use it for authentication during your connection. Instructions on how to do so can be found here.

Hostname aliases

You can also create an alias for Discovery and declare your username by editing your SSH configuration file. In particular, by adding these lines

Host xfer
    HostName xfer.discovery.neu.edu
    User YOURUSERNAME

Host discovery
    HostName login.discovery.neu.edu
    User YOURUSERNAME

to your (local) .ssh/config file. After these aliases are set up, you can subsequently log in to discovery by typing:

ssh discovery

and transfer files via, e.g.:

scp LOCALFILE xfer:/scratch/REMOTEFILE