Our slides are located at https://tinyurl.com/Intro-HPC-01-22-26
The following shell commands go together with the the workshop slides and can be pasted into the terminal (control-v on a PC, command-v on a Mac).
We recommend doing this one line at a time so you can observe each result individually.
Note, lines beginning with the pound sign '#' are comments, and don't do anything.
Print the path to the current directory
pwdList files and directories in the current directory
lsChange to a different directory
cd ~/project
pwdGo up one directory
cd ..Go to your home directory (both of the commands below do the same thing)
cd ~
cdDisplay the contents of a file
cat ~/hello.txtEdit a file
nano ~/hello.txt
# Now edit the file
# ^O to save
# ^X to exitCreate a directory
mkdir ~/project/workshop
ls ~/projectCopy files
cp ~/hello.txt ~/hello_copy.txt
ls ~/hello*Move files
mv ~/hello.txt ~/project/workshop
ls ~/hello*
ls ~/project/workshopDelete files
rm ~/hello_copy.txt
ls ~/hello*ssh to the transfer node and copy data to your home folder. Use the following paths depending on your cluster. e.g. for bouchet, use cd /apps/data/training
| Cluster | Data Path |
|---|---|
| mccleary | /gpfs/gibbs/data |
| grace | /gpfs/gibbs/data |
| bouchet | /apps/data |
| misha | /gpfs/radev/apps/services/data |
| milgram | /gpfs/milgram/data |
ssh transfer
# See the table above to replace "<data directory>" with the appropriate path depending on your cluster.
cd <data directory>/training
# Now copy the workshop data to your home directory
cp -r Intro-to-HPC ~/project/workshop
# Or try rsync
rsync -Pa Intro-to-HPC ~/project/workshop
#exit the transfer node
exitAlternative if the above did not work
cd ~/project/workshop
git clone https://github.com/ycrc/Intro-to-HPCViewing quotas
getquota# Navigate to a folder called interactive_example
cd ~/project/workshop/Intro-to-HPC/workshop_examples/interactive_example
# Request an interactive session in the devel partition:
salloc
# Load Python module:
module load Python
# Run the Python script:
python interpyexample.py
# To create a new conda environment:
salloc
module load miniconda
conda create -n myenv python=3.11 pandas numpy scipy matplotlib
# To use the conda environment:
conda activate myenv
# Step 1: Add ‘notebook` to make an existing environment compatible with Jupyter OOD:
conda activate myenv
conda install notebook
# OR:
# To create a Jupyter/OOD compatible conda environment from scratch:
conda create -y -n notebook_env python numpy pandas matplotlib notebook
# Step 2: To add your environment to the OOD Jupyter miniconda menu:
ycrc_conda_env.sh update