Changes between Version 13 and Version 14 of cypress/R


Ignore:
Timestamp:
Aug 22, 2017 8:57:20 PM (2 years ago)
Author:
fuji
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • cypress/R

    v13 v14  
    101101library(doParallel)
    102102
    103 # use the environment variable SLURM_NTASKS_PER_NODE to set the number of cores
    104 registerDoParallel(cores=(Sys.getenv("SLURM_NTASKS_PER_NODE")))
     103# use the environment variable SLURM_CPUS_PER_TASK to set the number of cores
     104registerDoParallel(cores=(Sys.getenv("SLURM_CPUS_PER_TASK")))
    105105
    106106# Bootstrapping iteration example
     
    132132#SBATCH --time=00:01:00         # WallTime
    133133#SBATCH --nodes=1               # Number of Nodes
    134 #SBATCH --ntasks-per-node=16    # Number of Tasks per Node
     134#SBATCH --ntasks-per-node=1    # Number of Tasks per Node
     135#SBATCH --cpus-per-task=16      # Number of threads per task (OMP threads)
    135136
    136137module load R/3.1.2
    137138
    138 Rscript bootstrap.R
     139Rscript bootstrap.R $SLURM_CPUS_PER_TASK
    139140}}}
    140141
     
    148149args<-commandArgs(TRUE)
    149150
    150 # use the environment variable SLURM_NTASKS_PER_NODE to set the number of cores
     151# use the environment variable SLURM_CPUS_PER_TASK to set the number of cores
    151152registerDoParallel(cores=(as.integer(args[1])))
    152153
     
    179180#SBATCH --time=00:01:00         # WallTime
    180181#SBATCH --nodes=1               # Number of Nodes
    181 #SBATCH --ntasks-per-node=16    # Number of Tasks per Node
     182#SBATCH --ntasks-per-node=1    # Number of Tasks per Node
     183#SBATCH --cpus-per-task=16      # Number of threads per task (OMP threads)
    182184
    183185module load R/3.1.2
    184186
    185 Rscript bootstrapWargs.R $SLURM_TASKS_PER_NODE
     187Rscript bootstrapWargs.R $SLURM_CPUS_PER_TASK
    186188}}}
    187189