Skip to content

Commit

Permalink
change 24 workers to 4 workers
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleBeannie committed Jan 15, 2025
1 parent 6c13add commit eb802f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vignettes/sim_fixed_design_custom.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,12 @@ one_sim <- function(sim_id = 1,
}
```

After that, we will execute `one_sim()` multiple times using parallel computation. The following lines of code takes 24 works to run 100 simulations.
After that, we will execute `one_sim()` multiple times using parallel computation. The following lines of code takes 4 works to run 100 simulations.
```{r}
tic()
registerDoFuture()
registerDoRNG()
plan("multisession", workers = 24)
plan("multisession", workers = 4)
set.seed(2025)
ans <- foreach(
Expand Down
2 changes: 1 addition & 1 deletion vignettes/sim_gs_design_custom.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Then we run `one_sim()` `r n_sim` times via parallel computation.
tic()
registerDoFuture()
registerDoRNG()
plan("multisession", workers = 24)
plan("multisession", workers = 4)
set.seed(2025)
ans <- foreach(
Expand Down

0 comments on commit eb802f7

Please sign in to comment.