Skip to content

Technical Set Up

LeAnn M Lindsey edited this page Apr 14, 2023 · 5 revisions

Technical Set Up

Basics of working on CHPC at University of Utah

Logging In

ssh <uid>@notchpeak.chpc.utah.edu
<enter password>

Look at local file directory and move around

ls -lrt
tree
tree -L 2
tree -L 3

Set up a local working directory for this project

mkdir TOKENIZATION  //mkdir means "make directory"
cd TOKENIZATION     //cd means "change directory"
mkdir DATA
mkdir REFERENCE_INFO
mkdir SCRIPTS
cd REFERENCE_INFO

Check all of your allocations by typing "myallocation" at the prompt

myallocation 

Use grep to pull out only your gpu allocations

myallocation | grep 'gpu'

Now put this info in a file in the REFERENCE_INFO folder you made previously

cd //This brings you back to your home directory
cd TOKENIZATION
cd REFERENCE_INFO
myallocation > allocations.txt // the ">" redirects any text output into the file name "allocations.txt"

Now look at the file two ways

cat allocations.txt
pwd //This gives you the full path to this file
vi allocations.txt //This will open you a new vim window with your file in it.  VIM is an editing software
:wq //In VIM you do :wq or "write quit" to save your changes and exit

More information about working with VIM is here: https://opensource.com/article/19/3/getting-started-vim

See who is running gpu jobs in the queue

squeue | grep 'gpu'

Get an interative gpu allocation and then check the queue

salloc --account=<account-name> --partition=<partition-name> --nodes=1 --ntasks=8 --gres=gpu:a100:1
squeue -u $USER
squeue | grep 'gpu'

You should now see your UID in the queue

Here is a list of all of the GPU nodes at CHPC by number and some more documentation on them https://www.chpc.utah.edu/documentation/guides/gpus-accelerators.php

Log out

exit //This will exit your allocation
exit //This will exit your notchpeak session

Upload a file from your local machine to the CHPC file system

First open a terminal window on your computer and make sure you are not logged into notchpeak in that window. Then open a second window and log into notchpeak according to the instructions above. Navigate to the folder that you want the file to be transferred to and type "pwd" to get the full path.

From your home computer, find a test file you want to upload and navigate in terminal to that directory. Here I will show how to use a file I have in the Downloads folder.

cd Downloads
ls -lrt
pwd

When I typed ls -lrt, I see a recent file that I downloaded from ncbi called "genome_assemblies_genome_fasta.tar".

//My example 
scp genome_assemblies_genome_fasta.tar <uid>@notchpeak.chpc.utah.edu:/uufs/chpc.utah.edu/common/home/u1323098/sundar-group-space2/PHAGE/DATASETS

//generic
scp <filename> <uid>@notchpeak.chpc.utah.edu:<full path>

You will then have to type in your password.

After the transfer is complete, use the notchpeak terminal to make sure that the file exists and check that they are the same size by typing "ls -lrt" and checking that the file sizes are the same on both computers.

Compressing and Uncompressing files

You will very often need to compress and uncompress files to transfer them. In this case, the file is already compressed and you only need to uncompress, but I have found that it is also useful to know how to compress on Mac in a way that you can correctly uncompress on UNIX (not always that easy, for example, don't use zip).

using Tar on Mac to compress

tar -czvf ${dir_name}.tgz ${dir_name}

using Tar on UNIX to decompress

tar -xvf ${dir_name}.tgz