[R] Unix batch to different nodes

stephen sefick ssefick at gmail.com
Thu Sep 30 13:48:20 CEST 2010


This, I think, all depends on how the server is set up.

On Thu, Sep 30, 2010 at 1:21 AM, Daisy Englert Duursma
<daisy.duursma at gmail.com> wrote:
> Hello,
>
> I am struggling with computing nodes in Unix.
>
> I have the use of a Unix server that has 30 nodes and I would like to
> batch scripts.
>
> Here is an R example that results in 72 repeated tasks based on the 2
> loops. If I wanted to send these out to the different nodes, each node
> has 1 task and the remaining 42 tasks are put in a queue, what would I
> do?
>
> #Example:
>
> proj.dir<-"C:/test/"
> setwd(proj.dir)
>
>
> group.vars <- c("biol1","biol4","biol5","biol6","biol12","biol15","biol16","biol17")
> species <- c("aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii")
>
> for (gv in 1:length(group.vars)){
> for (sp in 1:length(species)){
>
> zzz <- file(paste(group.vars[gv],species[sp],".TXT",sep=""),"w")
>        cat(paste(group.vars[gv]),file=zzz)
>        cat(paste(species[sp]),file=zzz)
> close(zzz)
> }
> }
>
> I know it is a silly script test but the division is similar to my
> real task which is repeated 459 times and each run takes 18 hours
>
> At this point I am confused what should be written in Unix and then at
> what point should I call R. I have read an abundance of things but I
> feel like I am missing something essential. Or perhaps I have read all
> the wrong things.
>
>
> Thanks,
> Daisy
>
>
> --
> Daisy Englert Duursma
>
> Room E8C156
> Dept. Biological Sciences
> Macquarie University  NSW  2109
> Australia
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>



-- 
Stephen Sefick
____________________________________
| Auburn University                                   |
| Department of Biological Sciences           |
| 331 Funchess Hall                                  |
| Auburn, Alabama                                   |
| 36849                                                    |
|___________________________________|
| sas0025 at auburn.edu                             |
| http://www.auburn.edu/~sas0025             |
|___________________________________|

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

                                -K. Mullis

"A big computer, a complex algorithm and a long time does not equal science."

                              -Robert Gentleman



More information about the R-help mailing list