ARCHIVED: Use R on Karst at IU
To use R on Karst at Indiana University, first set up your user environment by loading the r
module and its prerequisite modules (the cURL multi-protocol file transfer library and the Java Runtime Environment). To make the necessary modules load automatically every time you log into Karst, add the following lines to your ~/.modules
file:
module load curl module load java module load r
If your R session requires fewer than 20 minutes, you can load the necessary modules and launch the application from the command line. If your session requires more than 20 minutes, submit a batch job:
- Create an R file (for example,
R_input.r
) containing the commands R should run. - Create a TORQUE script (for example,
R_job
); for example (replaceusername
with your IU username andmy_iu_email
with your IU email address):#!/bin/bash #PBS -l nodes=1:ppn=16 #PBS -l walltime=01:00:00 #PBS -m ae #PBS -M my_iu_email #PBS -N R_job_name #PBS -V cd /N/u/username/Karst/working_directory module load curl module load java module load r R CMD BATCH R_input.r
To use parallel CPUs, add the following command to your execution line to enable MKL threading:
export MKL_NUM_THREADS="8"
On Karst, you can set up to 16 threads.
- To submit your job script (for example,
R_job
), on the command prompt, enterqsub R_job
. To check the status of your job, enterqstat -u username
(replaceusername
with your IU username).
If you have questions or need help regarding the use of R on IU's research supercomputers, contact the UITS Research Applications and Deep Learning team.
This is document amsh in the Knowledge Base.
Last modified on 2023-05-09 14:45:10.