Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Krause
tardis-doc
Commits
3e0b9a58
Commit
3e0b9a58
authored
Sep 11, 2020
by
Michael Krause
🎉
Browse files
R: typos in core detetection
parent
96d35e1f
Pipeline
#7155
passed with stages
in 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
software/r.rst
View file @
3e0b9a58
...
...
@@ -114,8 +114,7 @@ Example :samp:`srun -c 16 --pty /bin/bash`
library(parallel)
library(gmp)
cores <- Sys.getenv("SLURM_ARRAY_TASK_ID")
cores <- if (cores == '') 1 else as.numeric(cores)
cores <- as.integer(Sys.getenv('SLURM_CPUS_PER_TASK', unset=1))
data <- matrix(as.bigz(2**521)-1, 16)
mclapply(data, factorize, mc.cores=cores)
...
...
@@ -138,8 +137,7 @@ Alternatively you can use `%dopar%` and `foreach`:
library(doMC)
library(gmp)
cores <- Sys.getenv("SLURM_ARRAY_TASK_ID")
cores <- if (cores == '') 1 else as.numeric(cores)
cores <- as.integer(Sys.getenv('SLURM_CPUS_PER_TASK', unset=1))
registerDoMC(cores)
foreach(i=seq(1,16)) %dopar% {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment