This lesson teaches the basics of interacting with high-performance computing (HPC) clusters through the command line
NOTE: This is not Carpentries boilerplate! Please read carefully.
Follow the instructions found in The Carpentries' example lesson to create a repository for your lesson. Install Ruby, Make, and Jekyll following the instructions here.
For easier portability, we use snippets of text and code to capture inputs
and outputs that are host- or site-specific and cannot be scripted. These
are stored in a library
_includes/snippets_library, with
subdirectories matching the pattern InstitutionName_ClusterName_scheduler
.
If your cluster is not already present, please copy (cp -r
) the closest
match as a new folder under snippets_library
.
.snip
extension, to make
tracking easier. These files contain Markdown-formatted text, and will
render to HTML when the lesson is built.12
.include
statements. For example, the first snippet in episode
12 is included using {% include /snippets/12/info.snip %}
.Edit _config_options.yml
in your snippets folder. These options set such
things as the address of the host to log in to, definitions of the command
prompt, and scheduler names. You can also change the order of the episodes,
or omit episodes, by editing the configuration block under episode_names
in this file.
Set the environment variable HPC_JEKYLL_CONFIG
to the relative path of the
configuration file in your snippets folder:
export HPC_JEKYLL_CONFIG=_includes/snippets_library/.../_config_options.yml
Preview the lesson locally, by running make serve
. You can then view the
website in your browser, following the links in the output (usually,
https://localhost:4000). Pages will be automatically regenerated every
time you write to them.
If there are discrepancies in the output, edit the snippet file containing it, or create a new one and customize.
Add your snippet directory name to the GitHub Actions configuration file, .github/workflows/test_and_build.yml.
Check out a new branch(git checkout -b new_branch_name
), commit your
changes, and push to your fork of the repository. If you're comfortable
sharing, please file a Pull Request against our upstream repo.
We would love to have your site config for the Library.
To maintain compatibility, please do not merge your new branch into your
fork's gh-pages
branch. Instead, wait until your pull request has been
merged upstream, then pull down the upstream version. Otherwise, your
repository will diverge from ours, and pull requests you make in the
future will probably not be accepted.
The steps above will help you port the default HPC Intro lesson to your specific cluster, but the changes will only be visible on your local machine. To build a website for a specific workshop or instance of the lesson, you'll want to make a stand-alone copy.
This will let you create an exact duplicate of your fork. Without this, GitHub won't let you create a second fork of a repository on the same account.
yyyy-mm-dd-hpc-intro
.If your snippets are already included in the snippet library, skip this step.
gh-pages
" or similar. To the right of that, click the button to Create
Pull Request._config.yml
GitHub builds sites using the top-level _config.yml
, only, but
you want the values set in the snippet library.
_includes/snippet_library/Institution_Cluster_scheduler/_config_options.yml
_config.yml
for editing._config_options.yml
, overwriting the values under the SITE
specific configuration section of the top-level _config.yml
. Leave the
rest as-is._config.yml
ar ecorrect and
complete.https://your-github-account.github.io/name-of-the-repository
.The following list of items is meant as a guide on what content should go where in this repo. This should work as a guide where you can contribute. If a bullet point is prefixed by a file name, this is the lesson where the listed content should go into. This document is meant as a concept map converted into a flow of learning goals and questions. Note, again, that it is possible, when building your actual lesson, to re-order these files, or omit one or more of them.
User profiles of people approaching high-performance computing from an academic and/or commercial background are provided to help guide planning and decision-making.
Why use a cluster? (20 minutes)
Working on a remote HPC system (35 minutes)
ssh
, ls
, hostname
, logout
, nproc
, free
,
scp
, man
, wget
Working with the scheduler (1 hour 15 minutes)
sbatch
, squeue -u
, watch
, -N
, -n
,
-c
, --mem
, --time
, scancel
, srun
, --x11 --pty
,--mail-user
, --mail-type
,watch
-N
-n
-c
Accessing software via Modules (45 minutes)
module avail
, module load
, which
, echo $PATH
, module list
, module unload
, module purge
, .bashrc
, .bash_profile
, git clone
, make
make
, git clone
,.bashrc
, .bash_profile
Transferring files with remote computers (30 minutes)
wget
, scp
, rsync
(callout), mkdir
, FileZilla,dos2unix
, unix2dos
,gzip
, tar
, dos2unix
, cat
, unix2dos
, sftp
, pwd
,
lpwd
, put
, get
Running a parallel job (1 hour)
nano
, sbatch
, squeue
Using resources effectively (40 minutes)
fastqc
, sacct
, ssh
, top
, free
, ps
, kill
, killall
(note that some of these may not be appropriate on shared systems)Using shared resources responsibly (20 minutes)
Playing friendly in the cluster (psteinb: the following is very tricky as it is site dependent, I personally would like to see it in _extras)
Filesystems and Storage: objectives likely include items from @psteinb's Shared Filesystem lesson:
echo $TEMP
, ls -al /tmp
, df
, quota
Advanced Job Scripting and Submission:
squeue
, bjobs
etc.), explain different job
states and relate to scheduler basicsscancel
, bkill
etc.)Filesystem Zoo:
/tmp
/shared
or however your shared file system is called