From dba9523ef5ac6249e1cc344a3d7493184f4126bc Mon Sep 17 00:00:00 2001 From: UnciaBit Date: Sun, 16 Apr 2023 12:50:32 +0000 Subject: [PATCH 1/6] fix typo --- src/chapter4/multithreading.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chapter4/multithreading.md b/src/chapter4/multithreading.md index 25a1dc7..ad0c189 100644 --- a/src/chapter4/multithreading.md +++ b/src/chapter4/multithreading.md @@ -38,7 +38,7 @@ Before you run your job, it’s important to check the available resources. Command: ```bash -#SBATCH`--flag=value +#SBATCH --flag=value ``` ![sbatch Command](imgs/sbatch%20Command.png) @@ -62,4 +62,4 @@ squeue -u ![squeue Command](imgs/squeue%20Command.png) After you submitted your job, you can use the command squeue to monitor your job -you can see the status of your job to check whether it’s pending or running and also how long has it been since the job has started. \ No newline at end of file +you can see the status of your job to check whether it’s pending or running and also how long has it been since the job has started. From 098f964669944e4f2ad25056dd5f4131566c3a7d Mon Sep 17 00:00:00 2001 From: oraqlle <41113853+oraqlle@users.noreply.github.com> Date: Sat, 22 Apr 2023 14:44:27 +1000 Subject: [PATCH 2/6] Added 'FizzBuzz' challenge to C chapter. Added 'Bitwise Add' challenge to C chapter Clarified the wording of the 'Bitwise Multiply' challenge. Added additional notes to the C challenges page. --- src/chapter2/challenges.md | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/chapter2/challenges.md b/src/chapter2/challenges.md index b9ca281..1dcb954 100644 --- a/src/chapter2/challenges.md +++ b/src/chapter2/challenges.md @@ -2,37 +2,53 @@ The challenges for this chapter can found in the [HPC Training Challenges](https://github.com/MonashDeepNeuron/HPC-Training-Challenges) you should have cloned in the previous chapter. Remember to read the README's for each challenge for more details. Your attempts should be added and pushed to this repo in the corresponding directories and files. +> Note: +> +> Do not forget to add a `main()` function which is used to run/test your solutions. + ## Overview - [Challenges](#challenges) - [Overview](#overview) - [Challenge 1 - Hello World](#challenge-1---hello-world) - - [Challenge 2 - Fibonacci](#challenge-2---fibonacci) - - [Challenge 3 - GCD \& LCM](#challenge-3---gcd--lcm) - - [Challenge 4 - Bitwise Multiply](#challenge-4---bitwise-multiply) - - [Challenge 5 - Sum and Product Algorithms](#challenge-5---sum-and-product-algorithms) - - [Challenge 6 - Array Concatenation](#challenge-6---array-concatenation) + - [Challenge 2 - FizzBuzz](#challenge-2---fizzbuzz) + - [Challenge 3 - Fibonacci](#challenge-3---fibonacci) + - [Challenge 4 - GCD \& LCM](#challenge-4---gcd--lcm) + - [Challenge 5 - Bitwise Add](#challenge-5---bitwise-add) + - [Challenge 6 - Bitwise Multiply](#challenge-6---bitwise-multiply) + - [Challenge 7 - Sum and Product Algorithms](#challenge-7---sum-and-product-algorithms) + - [Challenge 8 - Array Concatenation](#challenge-8---array-concatenation) ## Challenge 1 - Hello World You're first challenge is to build and run 'Hello World!' on your own device. This should be relatively straight forward as there are no moving parts and the instructions are explicitly given at the start oft he chapter. -## Challenge 2 - Fibonacci +## Challenge 2 - FizzBuzz + +Create a program called `fizzbuzz.c` that prints the numbers from `0..100` (inclusive) but every number divisible by `3` prints `Fizz` instead and any number divisible by `5` prints `Buzz` and any number divisible by both prints `Fizzbuzz`. + +## Challenge 3 - Fibonacci Create a program called `fib.c` that calculates the first ten fibonacci numbers and prints them to the terminal. The implementation is up to you however, it cannot hard code the values into the program. -## Challenge 3 - GCD & LCM +## Challenge 4 - GCD & LCM This challenge consists of two tasks. The first is to create the G.C.D. (Greatest Common Divisor) algorithm. This can be done using whatever techniques you want. The second is to create the L.C.M. (Least Common Multiple) algorithm. This is a bit less common than G.C.D. so you may need to research a bit about it first. -## Challenge 4 - Bitwise Multiply +## Challenge 5 - Bitwise Add + +For this challenge you have to implement a function called `bitwise_add()` which, given two integers returns their sum using bitwise arithmetic. Any bitwise operators are allowed as well as conditional operators (eg. `==`, `<`). You can use regular arithmetic operators (eg. `+`, `*`) if it is necessary to perform other intermediate calculations but it is possible to solve this challenge without them. + +## Challenge 6 - Bitwise Multiply + +This challenge is similar to the last but instead of implementing `+` you must implement `*` (product). Your implementation should be contained in a function called `bitwise_multiply()`. You can use any bitwise or conditional operators. -For this challenge you have to implement a function called `bitwise_multiply()` which, given two integers returns their product using bitwise arithmetic. Other operators are allowed, just not binary `*`. +> Note: If you need `+` you can reimplement it internally in `bitwise_multiply` based on your solution from the previous challenge, import it to a header in this challenges folder and include it or copy it to this folder. Ask a trainer if you get stuck with this. -## Challenge 5 - Sum and Product Algorithms +## Challenge 7 - Sum and Product Algorithms This challenge involves implementing the sum and product reductions on an array or memory block of integers. As a bonus challenge, try and make the algorithms more generic and work with any binary operator. -## Challenge 6 - Array Concatenation +## Challenge 8 - Array Concatenation In this challenge you have to implement a general array concatenation function. This should join two arrays of the same type into a single array similar to `strcat()`. As an extra challenge, implement this concatenation algorithm so that if the destination buffer is not large enough, a new buffer of the required size is created and returns the pointer to the new buffer. From 11766bed14cd8b07aee10c8505996c5eb374b9e0 Mon Sep 17 00:00:00 2001 From: oraqlle <41113853+oraqlle@users.noreply.github.com> Date: Sat, 22 Apr 2023 14:44:27 +1000 Subject: [PATCH 3/6] Added 'FizzBuzz' challenge to C chapter. Added 'Bitwise Add' challenge to C chapter Clarified the wording of the 'Bitwise Multiply' challenge. Added additional notes to the C challenges page. Changes aimed to resolve #30 --- src/chapter2/challenges.md | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/chapter2/challenges.md b/src/chapter2/challenges.md index b9ca281..1dcb954 100644 --- a/src/chapter2/challenges.md +++ b/src/chapter2/challenges.md @@ -2,37 +2,53 @@ The challenges for this chapter can found in the [HPC Training Challenges](https://github.com/MonashDeepNeuron/HPC-Training-Challenges) you should have cloned in the previous chapter. Remember to read the README's for each challenge for more details. Your attempts should be added and pushed to this repo in the corresponding directories and files. +> Note: +> +> Do not forget to add a `main()` function which is used to run/test your solutions. + ## Overview - [Challenges](#challenges) - [Overview](#overview) - [Challenge 1 - Hello World](#challenge-1---hello-world) - - [Challenge 2 - Fibonacci](#challenge-2---fibonacci) - - [Challenge 3 - GCD \& LCM](#challenge-3---gcd--lcm) - - [Challenge 4 - Bitwise Multiply](#challenge-4---bitwise-multiply) - - [Challenge 5 - Sum and Product Algorithms](#challenge-5---sum-and-product-algorithms) - - [Challenge 6 - Array Concatenation](#challenge-6---array-concatenation) + - [Challenge 2 - FizzBuzz](#challenge-2---fizzbuzz) + - [Challenge 3 - Fibonacci](#challenge-3---fibonacci) + - [Challenge 4 - GCD \& LCM](#challenge-4---gcd--lcm) + - [Challenge 5 - Bitwise Add](#challenge-5---bitwise-add) + - [Challenge 6 - Bitwise Multiply](#challenge-6---bitwise-multiply) + - [Challenge 7 - Sum and Product Algorithms](#challenge-7---sum-and-product-algorithms) + - [Challenge 8 - Array Concatenation](#challenge-8---array-concatenation) ## Challenge 1 - Hello World You're first challenge is to build and run 'Hello World!' on your own device. This should be relatively straight forward as there are no moving parts and the instructions are explicitly given at the start oft he chapter. -## Challenge 2 - Fibonacci +## Challenge 2 - FizzBuzz + +Create a program called `fizzbuzz.c` that prints the numbers from `0..100` (inclusive) but every number divisible by `3` prints `Fizz` instead and any number divisible by `5` prints `Buzz` and any number divisible by both prints `Fizzbuzz`. + +## Challenge 3 - Fibonacci Create a program called `fib.c` that calculates the first ten fibonacci numbers and prints them to the terminal. The implementation is up to you however, it cannot hard code the values into the program. -## Challenge 3 - GCD & LCM +## Challenge 4 - GCD & LCM This challenge consists of two tasks. The first is to create the G.C.D. (Greatest Common Divisor) algorithm. This can be done using whatever techniques you want. The second is to create the L.C.M. (Least Common Multiple) algorithm. This is a bit less common than G.C.D. so you may need to research a bit about it first. -## Challenge 4 - Bitwise Multiply +## Challenge 5 - Bitwise Add + +For this challenge you have to implement a function called `bitwise_add()` which, given two integers returns their sum using bitwise arithmetic. Any bitwise operators are allowed as well as conditional operators (eg. `==`, `<`). You can use regular arithmetic operators (eg. `+`, `*`) if it is necessary to perform other intermediate calculations but it is possible to solve this challenge without them. + +## Challenge 6 - Bitwise Multiply + +This challenge is similar to the last but instead of implementing `+` you must implement `*` (product). Your implementation should be contained in a function called `bitwise_multiply()`. You can use any bitwise or conditional operators. -For this challenge you have to implement a function called `bitwise_multiply()` which, given two integers returns their product using bitwise arithmetic. Other operators are allowed, just not binary `*`. +> Note: If you need `+` you can reimplement it internally in `bitwise_multiply` based on your solution from the previous challenge, import it to a header in this challenges folder and include it or copy it to this folder. Ask a trainer if you get stuck with this. -## Challenge 5 - Sum and Product Algorithms +## Challenge 7 - Sum and Product Algorithms This challenge involves implementing the sum and product reductions on an array or memory block of integers. As a bonus challenge, try and make the algorithms more generic and work with any binary operator. -## Challenge 6 - Array Concatenation +## Challenge 8 - Array Concatenation In this challenge you have to implement a general array concatenation function. This should join two arrays of the same type into a single array similar to `strcat()`. As an extra challenge, implement this concatenation algorithm so that if the destination buffer is not large enough, a new buffer of the required size is created and returns the pointer to the new buffer. From d0b5fe2e08ae58ec4106485def0f47a7dcaaf745 Mon Sep 17 00:00:00 2001 From: oraqlle <41113853+oraqlle@users.noreply.github.com> Date: Sat, 22 Apr 2023 14:53:36 +1000 Subject: [PATCH 4/6] Clarified copying of the challenges repo (#27). --- src/chapter1/challenges.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/chapter1/challenges.md b/src/chapter1/challenges.md index e8ff4f1..34843f3 100644 --- a/src/chapter1/challenges.md +++ b/src/chapter1/challenges.md @@ -9,6 +9,7 @@ To get setup: - Click the link above to go to the repository on GitHub. - Click 'Use this template' button (green) and select 'Create a new repository'. - Give it a name and make sure it is private. +- Ensure you are copying it to your personal account and not the Monash DeepNeuron organisation. There will be a dropdown next to where you give the repo a name from which you can select your account. - Click 'Create repository from template'. - This will open the page for the repository. Click the '<> Code' button (green), make sure you are in the HTTPS tab and copy the link. - Open a terminal in your dev directory. From 8c4e48e96aa3a20bc53e9783be29f8f7ccac3de6 Mon Sep 17 00:00:00 2001 From: oraqlle <41113853+oraqlle@users.noreply.github.com> Date: Sat, 22 Apr 2023 15:00:42 +1000 Subject: [PATCH 5/6] Added GitHub mobile installation instructions for the 'Getting Started' chapter (#28). --- src/chapter1/github.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/chapter1/github.md b/src/chapter1/github.md index 73536d3..dfce59b 100644 --- a/src/chapter1/github.md +++ b/src/chapter1/github.md @@ -21,3 +21,7 @@ Once you have signed up for GitHub, you will need to provide your instructors wi ## Watching Repositories GitHub allows you 'watch' repositories. This means you'll be notified of changes to the repository so that you can keep on top of is happening with various projects. You'll be using this later in your training. + +## Download GitHub Mobile + +We would also request you install the GitHub mobile app. This can make it easier to login to your account (2FA), interact in discussions, reply to mentions and manage repositories and projects when you aren't at your computer. From e386efac1bcec6ccd07ea2bfbf4fa72c118218a3 Mon Sep 17 00:00:00 2001 From: oraqlle <41113853+oraqlle@users.noreply.github.com> Date: Sat, 22 Apr 2023 15:43:03 +1000 Subject: [PATCH 6/6] Bump book version --- src/version.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.md b/src/version.md index 8f1bfe8..92cf5fa 100644 --- a/src/version.md +++ b/src/version.md @@ -1 +1 @@ -version: 1.0.0 \ No newline at end of file +version: 1.1.0