Skip to content

Commit

Permalink
fix typo and path to example
Browse files Browse the repository at this point in the history
  • Loading branch information
natalya-patrikeeva committed Jul 17, 2024
1 parent db86bd6 commit 833ce4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/day3/3_computational-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ In many research scenarios, tasks can exceed the capabilities of your laptop due
- **CPU Role**: Memory is where information is stored, but the CPU does the work. The CPU (Central Processing Unit) executes tasks and is rated by processing speed (Hz) and the number of cores.
- **Sequential vs. Parallel Processing**:
- Sequential tasks (instructions that must be performed in order) can be time-consuming. For example, a function `runSimulation()` taking 1 minute per run would need 1000 minutes to run 1000 times sequentially on a single laptop.
- Parallel processing can significantly reduce this time if we don't have to carry out the insturctions in order. With 100 laptops, the same task would take just 10 minutes.
- Parallel processing can significantly reduce this time if we don't have to carry out the instructions in order. With 100 laptops, the same task would take just 10 minutes.

### Parallelization and Multiple CPUs
- **Side Effect-Free Functions**: Functions that do not change anything outside their local environment can be parallelized, as they have no 'side effects'.
Expand Down
4 changes: 2 additions & 2 deletions docs/day3/7_running_R_scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Our Monte Carlo NPV simulation involves the following steps:
4. Repeat this process for a substantial number of trials (e.g., 50,000) to obtain a distribution of NPV values.
5. Analyze the results to understand the range and characteristics of NPV outcomes.

By running this simulation, we will gain valuable insights into how different input parameters impact NPV calculations and enable more informed economic decision-making. We will run this hands-on example in serial and in parallel, interactively and using a scheduler. We are going to run the R code, `investment-npv-parallel.R`. View the complete script [here](https://github.com/gsbdarc/rf_bootcamp_2024/blob/main/examples/investment-npv-parallel.R).
By running this simulation, we will gain valuable insights into how different input parameters impact NPV calculations and enable more informed economic decision-making. We will run this hands-on example in serial and in parallel, interactively and using a scheduler. We are going to run the R code, `investment-npv-serial.R`. View the complete script [here](https://github.com/gsbdarc/rf_bootcamp_2024/blob/main/examples/r_examples/investment-npv-serial.R).

#### Running Serial R Script on the Command Line
If you want to simply run the script, you can do so from the command line.
Expand All @@ -188,7 +188,7 @@ ncore <- 1
After loading the R module, we can run this script with `Rscript` command on the command line:

```bash
$ Rscript investment-npv-parallel.R
$ Rscript investment-npv-serial.R
```

```bash
Expand Down

0 comments on commit 833ce4f

Please sign in to comment.