Setup R and relevant packages for a DTU HPC account ( http://www.hpc.dtu.dk ) . Update: Now works with new LSF queue system.
Login to your account
ssh $USER@login2.gbar.dtu.dk
qrsh
Note that the following instructions will override your
~/.R/Makevars
so backup (or ignore if you don't know what this means).
Clone this repo to your home folder and run the main script
git clone https://github.com/DTUAqua/hpc_setup
cd hpc_setup
export PATH=${HOME}/bin:$PATH
MAKE="make -j8" make all
Say we have an R script
echo "m <- diag(1e3)+1; system.time(for(i in 1:10) m%*%m)" > script.R
We can run the script the usual way by
R --vanilla < script.R
In order to submit this script to the queue replace the above line by
submit "R --vanilla < script.R"
On submission you'll see a list of default parameters attached to the job
Job parameters
==============
MAX_DURATION = 08:00:00 (hh:mm:ss)
MAX_MEMORY = 8gb
OMP_NUM_THREADS = 1
MC_CORES = 1
These four environment variables can be passed to the submit
command. We'll see some examples in the following.