From 833ce4fb92cf6ad3fe511f7d9445f7133ebbf138 Mon Sep 17 00:00:00 2001 From: Natalya Date: Wed, 17 Jul 2024 08:22:00 -0700 Subject: [PATCH] fix typo and path to example --- docs/day3/3_computational-tasks.md | 2 +- docs/day3/7_running_R_scripts.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/day3/3_computational-tasks.md b/docs/day3/3_computational-tasks.md index efbae03..7ef17df 100644 --- a/docs/day3/3_computational-tasks.md +++ b/docs/day3/3_computational-tasks.md @@ -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'. diff --git a/docs/day3/7_running_R_scripts.md b/docs/day3/7_running_R_scripts.md index a456a7b..8883b12 100644 --- a/docs/day3/7_running_R_scripts.md +++ b/docs/day3/7_running_R_scripts.md @@ -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. @@ -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