Learn how to run jobs on HPCC and related tools to boost programming efficiency, including git/github, emacs, tmux, Makefile, oh-my-zsh. There are also some optional topics like VS Code, Docker, auctex.
- All material are saved or linked in this repo. To download it, run
git clone https://github.com/QEC-pages/programming-workshop.gitorgit clone [email protected]:QEC-pages/programming-workshop.gitwith ssh - To synchronize the update, run
git pullwithin the folder- If you have edited files locally,
git pullmay produce a conflict. Before learninggit, a work-around is runninggit clone ...in a new empty folder.
- If you have edited files locally,
- HPCC
- HPCC is the cluster computer at UCR. Before the workshop, try to
finish the following two steps to make sure you can access it
through
sshand run basic linux command - obtain an account
- get started
- a tip: ssh without pasword
- job management
- parallel computing with openmp
- e.g. parfor in c++, gap, matlab, python, etc
- nodes specification
- Everything else in this workshop shall work in any unix-like environment. But usually we rely on the computing power of HPCC to do heavy calculations.
- HPCC is the cluster computer at UCR. Before the workshop, try to
finish the following two steps to make sure you can access it
through
- Editor and Window management
- emacs
- tmux
module load tmuxtmuxstart a new seesiontmux aattach to previous session.tmux.confsee sample- tmux-resurrect save window layout
- VS Code and rmate (not to be covered here, HPCC is not VS Code-friendly)
- Makefile
- Makefile is a shortcut for all kinds of commands.
- introduction
- see example 1 and example 2
- Git/GitHub
gitis a version control software, and github is one of the online hosts.- Git
- basic commands
mkdir my-first-repo
cd my-first-repo
git init
echo "hello git" >> README.md
git add README.md
git commit -m "my first commit"- show info
git status
git log
git config --list
- you might need to set up name and email
git config --global user.name "Some Name"
git config --global user.email "[email protected]"
- GitHub We will create several repos in the QEC-pages to demonstrate how to collaborate through branches and pull requests.
git clone ...
git push- Move your local repo to GitHub
- This happen when the code or repo is already on your local machine
- Create an empty repo on Github and then you will see the instruction there.
- oh-my-zsh
- homepage
oh-my-zshis a version ofzsh, an ultimate alternative tobash. It helps to work with git in terminal.- we will also make use of
~/.bashrcand similar files here.
- C++
- Quick compilation with multiple files
- comment style with Doxygen
- Homework
- Send a pull request to this repo programming workshop, where you don't have write access. (e.g. fix some typo, add a link to a resource page, or improving the text format.) You should fork this repo to your own account, make changes and commit, then send the pull request.
- Make some commit and create a new branch in this repo min weight decoder, where you should have been granted write access.
- Optional: write a min weight decoder for the Hamming code, classical [7,4,3] first, and then quantum [[7,1,3]]. references: wiki, pdf, linear code
- Min weight decoder
- Random Window decoder
- build a C++ project with random window decoder
- Sample code
- Docker
- Debug the program, instead of the environment.
- Gitpod
- Bring docker online
- GitHub Action
- Automation with docker
- Example: generate doxygen document for a C++ repo automatically
- Github Page
- A static website to present your repo