Skip to content

Commit f15650b

Browse files
committed
ac
1 parent 7117c41 commit f15650b

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

_practice/2023-04-04.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*note: this is integrative3*
2+
1. Update more rows on your KWL Chart based on what we did today.
3+
1. Contribute to your group repo and review a team mate's PR
4+
2. Install [ gcc](https://gcc.gnu.org/install/) locally and practice using it. Repeat steps we did in class on your computer and then change the order of parameters; try skipping steps to produce errors, etc. Export the list of variations you tried and summarize what you learned as a list of tips and reminders on what the parameters do/why/when you would need them (or not) in {index} `gcctips.md`. (to reinforce what we learned)
5+
3. Write two short programs that do the same thing in different ways and compile them both to assembly (eg using a for vs while loop to sum numbers up to a number). Check the assembly to see if they produce the same thing or if it's different. Save your code (in code blocks) and notes about your findings in `assemblycompare.md`
6+
4. On Seawulf, modfiy `main.c` from class to accept the integer as a command line argument instead of via input while running the program. [See this tutorial for an example](http://crasseux.com/books/ctutorial/argc-and-argv.html).
7+
5. Write a bash script that runs your compiled program for each integer from 10 to 30 (syntax for a range is `{start..end}` so this would be `{10..30}`)
8+
6. Create an sbatch script to run your script on a compute node and save the output to a file. The sbatch script should compile and link the program and then call the script. [see the options](https://web.uri.edu/hpc-research-computing/using-seawulf/#sbatch)
9+
7. use [scp](https://www2.stat.duke.edu/comp/security/scp_man.html) to download your modified main, script files, and output to your local computer and include them in your kwl repo.
10+
8. Answer the following in {index}`hpc.md` of your KWL repo: (to think about how the design of the system we used in class impacts programming and connect it to other ideas taught in CS)
11+
```
12+
1. What kinds of things would your code need to do if you were going to run it on an HPC system?
13+
2. What Sbatch options seem the most helpful?
14+
3. How might you go about setting the time limits for a script? How could you estimate how long it will take?
15+
```

_prepare/2023-04-04.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1. [install this hardware simulator](https://www.nand2tetris.org/software)
2+
1. Create {index}`operators.md` and make some notes about what you know about operators. What kinds of operators are you familiar with? Which have you seen in programming? math?

_review/2023-04-04.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*note: this is integrative3*
2+
1. Update your KWL Chart based on what you have learned.
3+
1. Contribute to your group repo and review a team mate's PR.
4+
2. Install [ gcc](https://gcc.gnu.org/install/) locally and practice using it. Repeat steps we did in class on your computer and then change the order of parameters; try skipping steps to produce errors, etc. Export the list of variations you tried and summarize what you learned as a list of tips and reminders on what the parameters do/why/when you would need them (or not) in {index}`gcctips.md`. (to reinforce what we learned)
5+
3. Create some variations of the `hello.c` we made in class. Make `hello2.c` print twice with 2 print commands. Make `hello5.c` print 5 times with a for loop and `hello7.c` print 7 times with a for loop. Build them all on the command line and make sure they run correctly.
6+
4. Write a bash script, {index}`assembly.sh` to compile each program to assembly and print the number of lines in each file.
7+
5. Put the output of your script in {index}`hello_assembly_compare.md`. Add to the file some notes on how they are similar or different based on your own reading of them.
8+
1. Read about [sbatch](https://web.uri.edu/hpc-research-computing/using-seawulf/#sbatch). Answer the following in {index}`hpc.md` of your KWL repo: (to think about how the design of the system we used in class impacts programming and connect it to other ideas taught in CS)
9+
```
10+
1. What kinds of things would your code need to do if you were going to run it on an HPC system?
11+
2. What Sbatch options seem the most helpful?
12+
3. How might you go about setting the time limits for a script? How could you estimate how long it will take?
13+
```

0 commit comments

Comments
 (0)