[R-sig-hpc] how to get job index into R?

Richard Pearson richard.pearson at well.ox.ac.uk
Tue Nov 3 12:01:41 CET 2009


Hi Kristian

Are you talking about an array job on Sun Grid Engine (SGE), or something else? If SGE, 
you can access the array index from within R using:

arrayIndex <- Sys.getenv("SGE_TASK_ID")

HTH

Richard

Unger, Kristian wrote:
> Hi there!
> 
> I am fairly new to HPC therefore I am asking a pretty basic question. I would like to submit a job array which uses one single R script. The R script uses one dataset which I want to analyse a defined set of say 100 sets of variables. Which variables to choose should be determined by the job array index number. But how can the job index number handed over to the R script? Would this concept work out at all?
> 
> Best wishes
> 
> Kristian
> 
> _____
> 
> Dr Kristian Unger
> 
> Imperial College London
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
> 

-- 
Richard D Pearson                          richard.pearson at well.ox.ac.uk
Wellcome Trust Centre for Human Genetics   http://www.well.ox.ac.uk/~rpearson
University of Oxford                       Tel: +44 (0)1865 617890
Roosevelt Drive                            Mob: +44 (0)7971 221181
Oxford OX3 7BN, UK                         Fax: +44 (0)1865 287664



More information about the R-sig-hpc mailing list