0% found this document useful (0 votes)
71 views3 pages

Great Lakes Cheat Sheet

Uploaded by

Tolu Romio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views3 pages

Great Lakes Cheat Sheet

Uploaded by

Tolu Romio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

periods)

G wget URL Download a file from Internet URL


unzip Extract a ZIP file
reat Lakes Cheat Sheet file.zip
Guide to general Linux (Bash) and Slurm tar xzf file Extract a gzip compressed tarball
commands (common extensions: .tar.gz and .tgz)

Accessing Great Lakes


Viewing and editing text files
Logging in from a terminal (Duo required) cat file Print entire content of file
ssh uniqname@greatlakes.arc-ts.umich.edu
less file Prints content of file page by page
Transferring files between Great Lakes and your
head file Print first 10 lines of file
system
scp input uniqname@greatlakes-xfer.arc- tail file Print last 10 lines of file
ts.umich.edu:output
nano Simple, easy to use text editor
scp -r input uniqname@greatlakes-xfer.arc-
ts.umich.edu:output vim Minimalist yet powerful text editor
scp uniqname@greatlakes-xfer.arc-ts.umich.edu:input
output emacs Extensible and customizable text editor

GUI Clients
Advanced file management
PuTTY SSH client for Windows
chmod Change read/write/execute permissions
WinSCP SCP client for Windows
which cmd List the full file path of a command
FileZilla FTP client for Windows, Mac, and Linux
whereis cmd List all related file paths (binary, source,
manual, etc.) of a command
Basic Linux file management
du dir List size of directory and its
man command Display the manual page for command subdirectories
pwd Print out the present working directory find Find file in a directory
ls List the files in the current directory
Aliases and system variables
ls -lh Show long, human-readable listing
alias Create shortcut to command
ls dir List files inside directory dir
env Lists all environment variables
rm file Delete file
export Create environment variable $var with
mkdir dir Create empty directory called dir var=val value val
rmdir dir Remove empty directory dir echo $var Print the value of variable $var
rm -r dir Remove directory dir and all contents .bashrc File that defines user aliases and
cd dir Change working directory to dir variables

cd .. Change working directory to parent


Input and output redirection
cd Change working directory to home
$(command) Runs command first, then inserts output
ls List the files in the current directory to the rest of the overall command
cp file1 Copy file1 as file2 < Standard input redirection
file2
> Standard output redirection
cp file1 dir Copy file1 into directory dir
2> Standard error redirection
mv file1 Rename file1 as file2
file2 2>&1 Standard error to standard output
redirection
mv file1 dir Move file1 into directory dir
cmd1 | cmd2 Pipe the output of cmd1 to cmd2
~ (tilde) Home directory
. (period) Current (working) directory Filters
.. (2 Parent directory wc Word, line, and character count

arc-ts.umich.edu/greatlakes Revised
5/2020
grep Find and print text matching a regular sinfo Cluster status
expression
srun Launch parallel job step
sort Sort input
sacct Display job accounting info
uniq Filter duplicate lines
cut Cut specific fields or columns Slurm Environment Variables
sed Stream editor for search and replace SLURM_JOBID Job ID
awk Extensive tool for complex filtering tasks SLURM_SUBMIT_DIR Job submission directory
SLURM_SUBMIT_HOST Host from which job was
Great Lakes directories submitted
/home/ For use with running jobs, 80 GB quota SLURM_JOB_NODELIST Node names allocated to job
uniqname
SLURM_ARRAY_TASK_ID Task ID within job array
/tmp Small file reads/writes, deleted after 10
days SLURM_JOB_PARTITION Job partition

/scratch Large file reads/writes, purged


periodically #SBATCH directives and #PBS
counterparts
/afs Only on login node, 10 GB backed up
#SBATCH #PBS Description

Lmod --job-name=name -N name Job name

module keyword Search for module names or --account=name -A name Account to charge
string descriptions matching string --partition=name -q name Submit to partition:
standard, gpu. viz,
module spider string Search for modules matching largemem,
string oncampus, debug
module avail Show modules that can be --time=dd-hh:mm:ss -l Time limit (walltime)
loaded now walltime=time

module load module Load module in the environment --nodes=count -l nodes=count Number of nodes

module show module Show the help and variables set --tasks-per- -l ppn=count Processes per node
by module node=count

--cpus-per- n/a CPU cores per


module list List currently loaded modules
task=count process
module unload module Remove module from --mem=count -l mem=count RAM per node (e.g.
environment 1000M, 1G)
module purge Remove all modules from --mem-per-cpu=count -l pmem=count RAM per CPU core
environment
--gres=gpu:count -l gpus=count GPUs per node
module save Save all currently loaded
--nodelist=nodes -l nodes=nodes Request nodes
collection modules to collection
--array=arrayspec -t arrayspec Define job array
module savelist Return all saved module
collections --output=%x-%j.log -o filepath Standard output in
run directory,
module describe Return all modules in collection formatted: jobName-
collection jobID.log

module restore Restore all modules from --error=%x-%j-E.log -e filepath Standard error log
collection collection
--export=ALL -V Copy environment

--export=var=val -v var=val Copy env variable


Slurm
--depend=var:jobid -W Job dependency
sbatch filename Submit a job script depend=var:job states (var): after,
filename id afterok, afterany,
afternotok
squeue -u user OR sq Show job queue for user
user --mail-user=email -M email Email for job alerts

scancel jobid Delete job jobid --mail-type=type -m type Email alert types:
BEGIN, END, NONE,
scontrol hold jobid Hold job jobid FAIL, REQUEUE

scontrol release jobid Release job jobid --exclude=nodes n/a Nodes to avoid

arc-ts.umich.edu/greatlakes Revised
5/2020
ARC-TS custom commands
my_usage Usage in CPU minutes
my_accounts Show account membership and
resource limits
home-quota Show home quota and usage per
user
scratch-quota Show scratch quota and usage per
account_root account
maxwalltime Show walltime available for jobs
(including upcoming maintenance)

ARC-TS Documentation & Support


GL User Guide: https://arc-ts.umich.edu/greatlakes/user-
guide
OnDemand/remote desktop: https://greatlakes.arc-
ts.umich.edu
Email hpc-support@umich.edu for further Great Lakes
support
Sensitive data should not be stored or processed on Great
Lakes

arc-ts.umich.edu/greatlakes Revised
5/2020

You might also like