...
Code Block |
---|
|
$ module load R/4.01.0 |
For more details on using modules see our modules help guide at https://opus.nci.org.au/display/Help/Environment+Modules.
...
Code Block |
---|
|
#!/bin/bash
#PBS -P a00
#PBS -q normal
#PBS -l ncpus=1
#PBS -l mem=2GB
#PBS -l jobfs=8GB
#PBS -l walltime=00:30:00
#PBS -l wd
# Load module, always specify version number.
module load R/4.01.0
# Must include `#PBS -l storage=scratch/ab12+gdata/yz98` if the job
# needs access to `/scratch/ab12/` and `/g/data/yz98/`. Details on
# https://opus.nci.org.au/display/Help/PBS+Directives+Explained.
# Run R application
R --vanilla < input.r > output |
...
Code Block |
---|
|
#!/bin/bash
#PBS -q normal
#PBS -l ncpus=2
#PBS -l mem=4GB
#PBS -l jobfs=16GB
#PBS -l walltime=00:15:00
#PBS -l wd
# Load module, always specify version number.
module load R/4.01.0
# Set number of OMP threads
export OMP_NUM_THREADS=$PBS_NCPUS
# Must include `#PBS -l storage=scratch/ab12+gdata/yz98` if the job
# needs access to `/scratch/ab12/` and `/g/data/yz98/`. Details on
# https://opus.nci.org.au/display/Help/PBS+Directives+Explained.
# Run R application
R --vanilla -f input.r > output |
...
The list of modules that were loaded during the R build are in the /apps/R/<version>/README.nci
file. For example, for R/4.01.0
, the file is /apps/R/4.01.0/README.nci
. There you can see that intel-compiler/20192021.52.2810
was used. Therefore this is the version that needs to be loaded, as shown below:
Code Block |
---|
|
# Unload modules
$ module unload R intel-compiler
# Load modules, always specify version number.
$ module load R/4.01.0
$ module load intel-compiler/20192021.52.2810
$ R
....
>install.packages("randomForest",repos="https://mirror.aarnet.edu.au/pub/CRAN/")
Warning in install.packages("randomForest") :
''''''''''''''''''''''''''''''''lib = "/apps/R/4.01.0/lib64/R/library"'''''''''''''''''''''''''''''''' is not writeable
Would you like to create a personal library
''''''''''''''''''''''''''''''''~/R/x86_64-unknown-linux-gnu-library/4.01.0''''''''''''''''''''''''''''''''
to install packages into? (y/n) y |
If you wish to install packages in a different directory from the default ~/R/x86_64-unknown-linux-gnu-library/4.01.0
, you need to set the environment variable R_LIBS
to the new directory. For bash
, you will be able to set it using using
export R_LIBS=/path/to/your/new/directory:$R_LIBS |
command. This will also need to be set every time you use R.
...