[R] submitting R scripts with command_line_arguments to PBS HPC clusters

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Wed Jul 12 03:01:11 CEST 2017


This sounds like an operating system specific question, in that "submit the R script to a PBS HPC scheduler" would be the kind of action that would run R with very different environment variables and possibly different access credentials than your usual interactive terminal.  A thorough reading of the "Installation and Administration Guide" and some study of your HPC documentation are in order. 
-- 
Sent from my phone. Please excuse my brevity.

On July 11, 2017 5:25:20 PM PDT, Bogdan Tanasa <tanasa at gmail.com> wrote:
>Dear all,
>
>please could you advise me on the following : I've written a R script
>that
>reads 3 arguments from the command line, i.e. :
>
>" args <- commandArgs(TRUE)
>TUMOR <- args[1]
>GERMLINE <- args[2]
>CHR <- args[3] ".
>
>when I submit the R script to a PBS HPC scheduler, I do the following
>(below), but ... I am getting an error message.
>(I am not posting the error message, because the R script I wrote works
>fine when it is run from a regular terminal ..)
>
>Please may I ask, how do you usually submit the R scripts with command
>line
>arguments to PBS HPC schedulers ?
>
>qsub -d $PWD -l nodes=1:ppn=4 -l vmem=10gb -m bea -M tanasa at gmail.com \
>-v TUMOR="tumor.bam",GERMLINE="germline.bam",CHR="chr22" \
>-e script.efile.chr22 \
>-o script.ofile.chr22 \
>script.R
>
>Thank you very very much  !
>
>-- bogdan
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list