Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# Create an interactive session that uses 8 cores:
[salexan5@mblog2 ~]$ salloc -A arcc -t 10:00 -c 8
salloc: Granted job allocation 861904
salloc: Nodes mbcpu-001 are ready for job
[salexan5@mbcpu@mbcpu-001 ~]$ module load gcc/13.2.0 r/4.4.0

# Check the slurm environment variable: SLURM_JOB_CPUS_PER_NODE
[salexan5@mbcpu@mbcpu-001 ~]$ echo $SLURM_JOB_CPUS_PER_NODE
8

# What does R detect?
[salexan5@mbcpu@mbcpu-001 ~]$ Rscript r_multicore.R $SLURM_JOB_CPUS_PER_NODE
[1] "Num of Cores: 8"
[1] "detectCores: 96"
[1] "mc.cores: 8"

...