Skip to content

Commit

Permalink
Started the basic layout and timeline of HPC training content
Browse files Browse the repository at this point in the history
  • Loading branch information
oraqlle committed Feb 26, 2023
1 parent b90f507 commit d831730
Show file tree
Hide file tree
Showing 50 changed files with 439 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy
on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install mdbook
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Deploy GitHub Pages
run: |
# This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory.
mdbook build
git worktree add gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf *
mv ../book/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI
on: [push, pull_request]

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install stable
rustup default stable
- name: Install mdbook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Run tests
run: mdbook test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@
*.exe
*.out
*.app

# mdBook Output
book
132 changes: 132 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
94 changes: 94 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Contributing

Thank you for taking the time to contribute.
Any and all contributions are always very much appreciated. However, to make sure the process of accepting patches goes for everyone (especially for the maintainer), you should try to follow these few simple guidelines when you contribute:

## Prerequisites

1. [rustup](https://www.rust-lang.org/tools/install) - for the Rust compiler and Cargo
2. [mdBook](https://rust-lang.github.io/mdBook/) - Book generation tool

## Steps to Contribute

1. Fork the repository.
2. Create a new branch based on the `dev` branch (`git checkout -b <your_branch> dev`).
If your contribution is a bug fix, you should name your branch `bugfix/xxx`;
for a feature, it should be `feature/xxx` etc. Otherwise, just use your good
judgment. Consistent naming of branches is appreciated since it makes the
output of `git branch` easier to understand with a single glance.
3. Do your modifications on that branch.
4. Make sure your modifications did not break anything by building and verifying the output using:

```sh
mdbook serve --open
```

5. Commit your changes. Your commit message should start with a one line
short description of the modifications, with the details and explanations
of your modifications following in subsequent paragraphs or bullet points. If you address an issue, create a subtitle with the issues number and title followed by the changes involved in resolving the issue.
Please limit your lines to about 78 characters in commit messages, since
it makes the output easier to read in `git log`. Also, starting your commit
message with a tag describing the nature of the commit is nice, since it
makes the commit history easier to skim through. For commits that do not
change any functionality (e.g. refactoring or fixing typos), the `[NFC]`
tag (No Functionality Change) can be used. Here's an example of an
acceptable commit message:

```txt
[TAG] Refactor the interface
- Rename elem to contains
- Rename subset to is_subset, and make is_subset applicable in infix notation
Issue (#12) - Add an at `at_key` method:
- Added the `at_key` method
- operator[] is now bound to at_key instead of find
```

When applicable, please squash adjacent _wip_ commits into a single _logical_ commit.
If your contribution has several logical commits, it's fine.
6. Push the changes to your fork (`git push origin <your_branch>`).
7. Open a pull request against the package's `dev` branch (not against `main`).

We will do my best to respond in a timely manner. I might discuss your patch and suggest some modifications, or I might amend your patch myself and ask you for feedback.
You will always be given proper credit.

## Style guide

Markdown uses the CommonMark style guide for the most part however, certain exceptions are allowed for customizing the style. It is a guide for a reason.

- Any code example should have a corresponding example link that is either a full file/project or a link to an external compiler (eg. Godbolt).
- Any free standing or example links that are related should be put in a bullet-list and separate unrelated links by a empty line.
- Reserve the use of quote blocks (lines beginning with `>` in Markdown) for side notes relating to content or examples

For C content such as examples:

- Indent using 4 spaces.
- Do not leave trailing white spaces at the end of lines, and no more than a
single newline at the end of a source file.
- A definition blocks' initial brace should start on a newline, not trail off the declaration.

For C++ content such as examples:

- Indent using 4 spaces.
- Do not leave trailing white spaces at the end of lines, and no more than a
single newline at the end of a source file.
- A definition blocks' initial brace should start on a newline, not trail off the declaration.
- Prefer direct initialisation (`{}` over `=`) over assignment initialisation, especially for primitive types.
- Prefer brace-based initialisation for invoking a types constructor.
- Use spaces on either side of constructor arguments when using braces (eg. `int{ _ }`).
- Use `auto` as variable introducer and declare type explicitly in the brace initialiser or on right-hand-side of the assignment.
- Prefer trailing return types on functions over prefixed notation.
- Prefer to separate functions declarations (eg. `constexpr auto`), signature, constant and reference qualifiers (classes), `noexcept` specification and return type on separate lines if function declaration gets too long. Indent the constant and references qualifiers, `noexcept` specification and return type if they are on a newline.

```cxx
constexpr auto
really_long_function_signature(that_takes lots_of_arguments, with_really long_names, for_types and_arguments)
noexcept( noexcept(long_noexcept_specification) && noexcept(with_multiple_conditions) )
-> a_really_long_return_type<with_lots<of_nested>, template_type<parameters, and_metaprogramming>>
{}
```
- Indent `requires` clauses and `requires` expressions.
- `#include` should be sorted in alphabetical order.
- Mostly use your own judgment and stick to the style of the existing and surrounding code.
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
# HPC-Training
HPC Training Content
# The HPC Training Book

This repository contains the source code for the HPC Training content and challenges for new HPC recruits. This book is available online or can be built locally.

## Building

To build this book you need [mdBook](https://rust-lang.github.io/mdBook/index.html) a tool for creating books with Markdown. mdBook can be installed using Cargo - Rust's package manager.

```sh
$ cargo install mdbook
```

You can build this book you must clone this repository using Git. You can then build it and even serve it to localhost to view in your browser. The serve command will produce a localhost you can view.

```sh
$ git clone https://github.com/MonashDeepNeuron/HPP.git
$ cd HPP

# Build ...
$ mdbook build

# ... or serve build and serve locally
$ mdbook serve --open
```

## Contributors

- Tyler Swann
- Ankita Gosavi
- Nikhil Kannachel
- Mitchell Mibus

## Code of Conduct, License & Contributing

Refer to the [Code of Conduct](/CODE_OF_CONDUCT.md) and the [License](/LICENSE) for this repository for the expected behavior of contributors and users of the repository. If you have any concerns reach out to me (Tyler Swann) on Teams or follow standard M procedures for issues you are having within the team, branch or MDN. If you wish to contribute, follow the [contributing guide](/CONTRIBUTING.md).
15 changes: 15 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[book]
authors = [
"oraqlle (aka Tyler Swann)"
]
title = "HPC Training"
description = "Monash DeepNeuron's HPC Training Content"

language = "en"
multilingual = false

src = "src"

[output.html]
mathjax-support = true
git-repository-url = "https://github.com/MonashDeepNeuron/HPC-Training"
49 changes: 49 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Summary

[Welcome](home.md)

- [Getting Started](./chapter1/chapter1.md)
- [Windows](./chapter1/windows.md)
- [Mac](./chapter1/mac.md)
- [Linux](./chapter1/linux.md)
- [WSL](./chapter1/wsl.md)
- [GitHub](./chapter1/github.md)
- [M3](./chapter1/m3.md)

- [Brief Introduction to C](./chapter2/intro-to-c.md)
- [Hello World](./chapter2/helloworld.md)
- [Header & Source Files](./chapter2/files.md)
- [Compilers & Linkers](./chapter2/compiler.md)
- [Types & Variables](./chapter2/vars.md)
- [Control Flow](./chapter2/ctrl-flow.md)
- [Loops](./chapter2/loops.md)
- [Functions](./chapter2/functions.md)
- [Arrays & Strings](./chapter2/array.md)
- [Pointers & Memory](./chapter2/memory.md)
- [Structures](./chapter2/structs.md)
- [Macros & The Preprocessor](./chapter2/macros.md)
- [The Standard Library](./chapter2/stdlib.md)
- [Challenges](./chapter2/challenges.md)

- [M3](./chapter3/chapter3.md)
- [Logging In](./chapter3/login.md)
- [Linux Commands](./chapter3/linux-cmds.md)
- [Compiling](./chapter3/compiling.md)
- [M3's Shared Filesystem](./chapter3/shared-fs.md)
- [Bash Scripts](./chapter3/bash.md)
- [Job batching & SLURM](./chapter3/slurm.md)
- [Challenges](./chapter3/challenges.md)

- [Parallel Computing](./chapter4/chapter4.md)
- [What is Parallel Computing?](./chapter4/parallel-computing.md)
- [Shared Memory Resources](./chapter4/shared-memory.md)
- [Multithreading](./chapter4/multithreading.md)
- [OpenMP](./chapter4/openmp.md)
- [Challenges](./chapter4/challenges.md)

- [Distributed Computing](./chapter5/chapter5.md)
- [What is Distributed Computing](./chapter5/distrubuted-computing.md)
- [Message Passing](./chapter5/message-passing.md)
- [OpenMPI](./chapter5/openmpi.md)

[Acknowledgements](./acknowledgements.md)
Loading

0 comments on commit d831730

Please sign in to comment.