R: Difference between revisions

Jump to navigation Jump to search
81 bytes added ,  4 years ago
Fix R foreach script to use cpus-per-task on 1 node
m (Update R version to 3.6.0)
(Fix R foreach script to use cpus-per-task on 1 node)
Line 301: Line 301:


<!--T:52-->
<!--T:52-->
# Use the environment variable SLURM_NTASKS to set the number of cores.
# Use the environment variable SLURM_CPUS_PER_TASK to set the number of cores.
# This is for SLURM. Replace SLURM_NTASKS by the proper variable for your system.
# This is for SLURM. Replace SLURM_CPUS_PER_TASK by the proper variable for your system.
# Avoid manually setting a number of cores.
# Avoid manually setting a number of cores.
ncores = Sys.getenv("SLURM_NTASKS")  
ncores = Sys.getenv("SLURM_CPUS_PER_TASK")  


<!--T:53-->
<!--T:53-->
Line 326: Line 326:
#!/bin/bash
#!/bin/bash
#SBATCH --account=def-someacct  # replace this with your own account
#SBATCH --account=def-someacct  # replace this with your own account
#SBATCH --ntasks=4               # number of processes
#SBATCH --nodes=1                # number of node MUST be 1
#SBATCH --cpus-per-task=4       # number of processes
#SBATCH --mem-per-cpu=2048M      # memory; default unit is megabytes
#SBATCH --mem-per-cpu=2048M      # memory; default unit is megabytes
#SBATCH --time=0-00:15          # time (DD-HH:MM)
#SBATCH --time=0-00:15          # time (DD-HH:MM)
cc_staff
311

edits

Navigation menu