R programming - submitting jobs on a multiple node linux cluster using PBS

前端 未结 3 1480
谎友^
谎友^ 2021-01-17 16:26

I am running R on a multiple node Linux cluster. I would like to run my analysis on R using scripts or batch mode without using parallel computing software such as MPI or sn

3条回答
  •  萌比男神i
    2021-01-17 16:56

    This was an answer to a related question - but it's an answer to the comment above (as well).

    For most of our work we do run multiple R sessions in parallel using qsub (instead).

    If it is for multiple files I normally do:

    while read infile rest
    do
    qsub -v infile=$infile call_r.pbs 
    done < list_of_infiles.txt
    

    call_r.pbs:

    ...
    R --vanilla -f analyse_file.R $infile
    ...
    

    analyse_file.R:

    args <- commandArgs()
    infile=args[5]
    outfile=paste(infile,".out",sep="")...
    

    Then I combine all the output afterwards...

提交回复
热议问题