Versions Compared

Key

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

...

You could do the same thing on Argon by composing a job script which first loads modules for the version of R module you want, but is otherwise the same; for example:

Code Block
languagebash
module load stack/2020.1
module load Rr/3.6.2_intel-19.0.5.1281
cd path/to/dataSet123
Rscript my/scripts/program.R inputDataSet123.txt > output123.txt

...

Code Block
languagebash
#$ -j y
#$ -o /localscratch

module load stack/2020.1
module load Rr/3.6.2_intel-19.0.5.1281
cd path/to/dataSet123
Rscript my/scripts/program.R inputDataSet123.txt
mv $SGE_STDOUT_PATH .

...

Running MPI jobs with R, particularly R-snow, requires some special handling. If the MPI processes will all be on a single host then you can essentially start R as normal and spawn MPI slave ranksMPIĀ ranks. However, if running across multiple nodes, the processes must be spawned by mpirun. This could also be done for the single node case. Since this will have R started by mpirun we need to use a wrapper that will distinguish between the master primary and slave secondary processes and start up the respective R sessions accordingly. This wrapper is called RMPISNOW. The launch command would look something like the following in an SGE job script.

...