R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("rpvm-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('rpvm') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "PVM.barrier" > > ### * PVM.barrier > > flush(stderr()); flush(stdout()) > > ### Name: PVM.barrier > ### Title: Group synchronization > ### Aliases: .PVM.barrier > ### Keywords: utilities connection interface > > ### ** Examples > > gname <- "pvmtest" > ## Not run: myinst <- .PVM.joingroup (gname) > # do something here ... > ## Not run: .PVM.barrier (gname, 5) > > > > cleanEx(); ..nameEx <- "PVM.bcast" > > ### * PVM.bcast > > flush(stderr()); flush(stdout()) > > ### Name: PVM.bcast > ### Title: Broadcasting the data > ### Aliases: .PVM.bcast > ### Keywords: utilities connection interface > > ### ** Examples > > gname <- "pvmtest" > ## Not run: .PVM.initsend () > ## Not run: .PVM.pkintvec (1:10) > ## Not run: .PVM.bcast(gname, msgtag = 11) > > > > cleanEx(); ..nameEx <- "PVM.buffers" > > ### * PVM.buffers > > flush(stderr()); flush(stdout()) > > ### Name: PVM.buffers > ### Title: Manipulating Message Buffers > ### Aliases: .PVM.getsbuf .PVM.getrbuf .PVM.setsbuf .PVM.setrbuf > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: sbufid <- .PVM.getsbuf () > > > > cleanEx(); ..nameEx <- "PVM.bufinfo" > > ### * PVM.bufinfo > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.bufinfo > ### Title: Message buffer infomation > ### Aliases: .PVM.bufinfo > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: bufid <- .PVM.recv (-1, -1) > ## Not run: info <- .PVM.bufinfo (bufid) > > > > cleanEx(); ..nameEx <- "PVM.config" > > ### * PVM.config > > flush(stderr()); flush(stdout()) libpvm [pid26510] /tmp/pvmd.0: No such file or directory libpvm [pid26510] /tmp/pvmd.0: No such file or directory libpvm [pid26510] /tmp/pvmd.0: No such file or directory libpvm [pid26510]: pvm_config(): Can't contact local daemon > > ### Name: .PVM.config > ### Title: PVMD configuration > ### Aliases: .PVM.config > ### Keywords: utilities connection interface > > ### ** Examples > > try (.PVM.config ()) Error in .PVM.config() : PVM: pvmd not responding > > > > cleanEx(); ..nameEx <- "PVM.exit" > > ### * PVM.exit > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.exit > ### Title: Unregister process from local PVM deamon. > ### Aliases: .PVM.exit > ### Keywords: utilities connection interface > > ### ** Examples > > ## Finished with PVM > ## Not run: .PVM.exit() > > > > cleanEx(); ..nameEx <- "PVM.freebuf" > > ### * PVM.freebuf > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.freebuf > ### Title: Free message buffer > ### Aliases: .PVM.freebuf > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: bufid <- .PVM.mkbuf ("Raw") > ## Send the message ... > ## Not run: .PVM.freebuf (bufid) > > > > cleanEx(); ..nameEx <- "PVM.gather" > > ### * PVM.gather > > flush(stderr()); flush(stdout()) > > ### Name: PVM.gather > ### Title: Gather the data into root > ### Aliases: .PVM.gather > ### Keywords: utilities connection interface > > ### ** Examples > > gname <- "pvmtest" > ## Not run: > ##D if (myinum == 0) { > ##D result <- .PVM.gather(as.integer (1:100), > ##D msgtag = 11, group = gname, root = 0) > ##D } > ## End(Not run) > > > > cleanEx(); ..nameEx <- "PVM.getinst" > > ### * PVM.getinst > > flush(stderr()); flush(stdout()) > > ### Name: PVM.getinst > ### Title: Instance number identified by group name and task id > ### Aliases: .PVM.getinst > ### Keywords: utilities connection interface > > ### ** Examples > > gname <- "pvmtest" > ## Not run: myinum <- .PVM.getinst (gname) > > > > cleanEx(); ..nameEx <- "PVM.gettid" > > ### * PVM.gettid > > flush(stderr()); flush(stdout()) > > ### Name: PVM.gettid > ### Title: Task id identified by group name and instance number > ### Aliases: .PVM.gettid > ### Keywords: utilities connection interface > > ### ** Examples > > gname <- "pvmtest" > leader <- 0 > ## Not run: leadtid <- .PVM.gettid (gname, leader) > > > > cleanEx(); ..nameEx <- "PVM.group" > > ### * PVM.group > > flush(stderr()); flush(stdout()) > > ### Name: PVM.group > ### Title: Join or leave a names group > ### Aliases: .PVM.joingroup .PVM.lvgroup > ### Keywords: utilities connection interface > > ### ** Examples > > gname <- "pvmtest" > ## Not run: myinum <- .PVM.joingroup (gname) > ## Not run: .PVM.lvgroup (gname) > > > > cleanEx(); ..nameEx <- "PVM.gsize" > > ### * PVM.gsize > > flush(stderr()); flush(stdout()) > > ### Name: PVM.gsize > ### Title: Get the size of the group > ### Aliases: .PVM.gsize > ### Keywords: utilities connection interface > > ### ** Examples > > gname <- "pvmtest" > ## Not run: size <- .PVM.gsize(gname) > > > > cleanEx(); ..nameEx <- "PVM.initsend" > > ### * PVM.initsend > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.initsend > ### Title: Initialize send buffer > ### Aliases: .PVM.initsend .PVM.encoding > ### Keywords: utilities connection interface > > ### ** Examples > > a <- 1:10 > ## Not run: bufid <- .PVM.initsend ("InPlace") > ## Not run: .PVM.pkintvec (a) > ## Not run: .PVM.send (tid, msgtag) > > > > cleanEx(); ..nameEx <- "PVM.kill" > > ### * PVM.kill > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.kill > ### Title: Kill pvm process > ### Aliases: .PVM.kill > ### Keywords: utilities connection interface > > ### ** Examples > > ## kill one of spawned children > ## Not run: .PVM.kill (children[1]) > > > > cleanEx(); ..nameEx <- "PVM.mcast" > > ### * PVM.mcast > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.mcast > ### Title: Multicast data > ### Aliases: .PVM.mcast > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: .PVM.initsend ("Raw") > ## Not run: .PVM.pkintvec (1:10) > ## Not run: .PVM.mcast (tids, msgtag = 5) > > > > cleanEx(); ..nameEx <- "PVM.mkbuf" > > ### * PVM.mkbuf > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.mkbuf > ### Title: Create message buffer > ### Aliases: .PVM.mkbuf > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: bufid <- .PVM.mkbuf ("Raw") > ## Send the message ... > ## Not run: .PVM.freebuf (bufid) > > > > cleanEx(); ..nameEx <- "PVM.mstats" > > ### * PVM.mstats > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.mstats > ### Title: Status of host machines > ### Aliases: .PVM.mstats > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: .PVM.mstats ("abacus") > > > > cleanEx(); ..nameEx <- "PVM.mytid" > > ### * PVM.mytid > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.mytid > ### Title: Current task id > ### Aliases: .PVM.mytid > ### Keywords: utilities connection interface > > ### ** Examples > > ## For name(tid) of process and to register with PVM > ## Not run: mytid <- .PVM.mytid() > > > > cleanEx(); ..nameEx <- "PVM.notify" > > ### * PVM.notify > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.notify > ### Title: Monitor pvmd > ### Aliases: .PVM.notify > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: .PVM.notify (msgtag = 999, what = "Exit", tids) > > > > cleanEx(); ..nameEx <- "PVM.nrecv" > > ### * PVM.nrecv > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.nrecv > ### Title: Nonblocking receive > ### Aliases: .PVM.nrecv > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: myparent <- .PVM.parent () > ## Not run: > ##D while (1) { > ##D bufid <- .PVM.nrecv (myparent, 4) > ##D if (bufid > 0) { > ##D data <- .PVM.upkintvec () > ##D # do something ... > ##D break > ##D } else { > ##D # do something else > ##D } > ##D } > ## End(Not run) > > > > cleanEx(); ..nameEx <- "PVM.options" > > ### * PVM.options > > flush(stderr()); flush(stdout()) > > ### Name: PVM.options > ### Title: libpvm Options > ### Aliases: PVM.options > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: PVM.options (what = "DebugMask") > > > > cleanEx(); ..nameEx <- "PVM.pack" > > ### * PVM.pack > > flush(stderr()); flush(stdout()) > > ### Name: PVM.pack > ### Title: Packing data > ### Aliases: PVM.pack .PVM.pkdouble .PVM.pkint .PVM.pkstr .PVM.pkintvec > ### .PVM.pkdblvec .PVM.pkstrvec .PVM.pkintmat .PVM.pkdblmat .PVM.pkstrmat > ### .PVM.pkfactor > ### Keywords: utilities connection interface > > ### ** Examples > > ## Pack and send a matrix > a <- matrix (1:20, nrow=4) > ## Not run: .PVM.pkdblmat (a) > > > > cleanEx(); ..nameEx <- "PVM.parent" > > ### * PVM.parent > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.parent > ### Title: Parent task id > ### Aliases: .PVM.parent > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: myparent <- .PVM.parent () > > > > cleanEx(); ..nameEx <- "PVM.probe" > > ### * PVM.probe > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.probe > ### Title: Probe receive > ### Aliases: .PVM.probe > ### Keywords: utilities connection interface > > ### ** Examples > > ## To check a node (specified by tid) for a message > ## Not run: MsgReady <- .PVM.probe (tid, msgtag) > ## To see if any node is sending message with tag thisTag > ## Not run: AnyMessageWithThisTag <- .PVM.probe (-1, thisTag) > ## To see if node tid is sending any message. > ## Not run: AnyMessageFromThisTID <- .PVM.probe (tid, -1) > > > > cleanEx(); ..nameEx <- "PVM.pstats" > > ### * PVM.pstats > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.pstats > ### Title: Status of PVM processes > ### Aliases: .PVM.pstats > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: tid <- .PVM.parent () > ## Not run: status <- .PVM.pstats (tid) > > > > cleanEx(); ..nameEx <- "PVM.rapply" > > ### * PVM.rapply > > flush(stderr()); flush(stdout()) > > ### Name: PVM.rapply > ### Title: Parallel apply > ### Aliases: PVM.rapply > ### Keywords: utilities connection interface > > ### ** Examples > > a <- matrix(rnorm(100), nrow = 10) > ## Not run: PVM.rapply (a, sum, 3) > > > > cleanEx(); ..nameEx <- "PVM.recv" > > ### * PVM.recv > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.recv > ### Title: Blocking receive > ### Aliases: .PVM.recv > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: myparent <- .PVM.parent () > ## Not run: bufid <- .PVM.recv (myparent, 4) > ## Not run: data <- .PVM.upkintvec () > > > > cleanEx(); ..nameEx <- "PVM.reduce" > > ### * PVM.reduce > > flush(stderr()); flush(stdout()) > > ### Name: PVM.reduce > ### Title: Reduction > ### Aliases: .PVM.reduce > ### Keywords: utilities connection interface > > ### ** Examples > > gname <- "pvmtest" > ## Not run: > ##D if (myinum == 0) { > ##D result <- .PVM.reduce (as.double (rnorm (10)), > ##D "Sum", msgtag = 11, group = gname, root = 0) > ##D } > ## End(Not run) > > > > cleanEx(); ..nameEx <- "PVM.scatter" > > ### * PVM.scatter > > flush(stderr()); flush(stdout()) > > ### Name: PVM.scatter > ### Title: Scatter a vector across the group > ### Aliases: .PVM.scatter > ### Keywords: utilities connection interface > > ### ** Examples > > gname <- "pvmtest" > ## Not run: > ##D myrow <- .PVM.scatter(as.integer (1:100), 10, msgtag = 11, group = > ##D gname, root = 0) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "PVM.send" > > ### * PVM.send > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.send > ### Title: Send data > ### Aliases: .PVM.send > ### Keywords: utilities connection interface > > ### ** Examples > > a <- 1:10 > ## Not run: > ##D bufid <- .PVM.initsend () > ##D .PVM.pkintvec (a) > ##D .PVM.send (tid, msgtag) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "PVM.serialize" > > ### * PVM.serialize > > flush(stderr()); flush(stdout()) > > ### Name: PVM.serialize > ### Title: Serialize R Objects > ### Aliases: .PVM.serialize .PVM.unserialize > ### Keywords: utilities connection interface > > ### ** Examples > > ## Pack and send a matrix > ## Not run: > ##D BUFTAG<-22 > ##D tid <- .PVM.mytid() > ##D a <- matrix (1:20, nrow=4) > ##D .PVM.initsend() > ##D .PVM.serialize(a) > ##D .PVM.send(tid, BUFTAG) > ##D ## Receive the matrix > ##D .PVM.recv(tid, BUFTAG) > ##D .PVM.unserialize() > ## End(Not run) > > > > cleanEx(); ..nameEx <- "PVM.spawn" > > ### * PVM.spawn > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.spawn > ### Title: Spawn child tasks > ### Aliases: .PVM.spawn .PVM.spawnR .PVM.spawnflags > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: > ##D children <- .PVM.spawnR (slave = "helloR.R") > ## End(Not run) > > > > cleanEx(); ..nameEx <- "PVM.tasks" > > ### * PVM.tasks > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.tasks > ### Title: Tasks information > ### Aliases: .PVM.tasks > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: > ##D .PVM.tasks () > ## End(Not run) > > > > cleanEx(); ..nameEx <- "PVM.tidtohost" > > ### * PVM.tidtohost > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.tidtohost > ### Title: Host id of a task > ### Aliases: .PVM.tidtohost > ### Keywords: utilities connection interface > > ### ** Examples > > ## Find out which host this process in running on > ## Not run: > ##D myhost <- .PVM.tidtohost (.PVM.mytid()) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "PVM.trecv" > > ### * PVM.trecv > > flush(stderr()); flush(stdout()) > > ### Name: .PVM.trecv > ### Title: Timeout receive > ### Aliases: .PVM.trecv > ### Keywords: utilities connection interface > > ### ** Examples > > ## Not run: myparent <- .PVM.parent () > ## Not run: bufid <- .PVM.trecv (myparent, 4, 2) > ## Not run: if (bufid > 0) data <- .PVM.upkintvec () > > > > cleanEx(); ..nameEx <- "PVM.unpack" > > ### * PVM.unpack > > flush(stderr()); flush(stdout()) > > ### Name: PVM.unpack > ### Title: Unpacking data > ### Aliases: PVM.unpack .PVM.upkdouble .PVM.upkint .PVM.upkstr > ### .PVM.upkintvec .PVM.upkdblvec .PVM.upkstrvec .PVM.upkintmat > ### .PVM.upkdblmat .PVM.upkstrmat .PVM.upkfactor > ### Keywords: utilities connection interface > > ### ** Examples > > ## Unpack a matrix > ## Not run: a <- .PVM.upkdblmat () > > > > cleanEx(); ..nameEx <- "PVMD" > > ### * PVMD > > flush(stderr()); flush(stdout()) > > ### Name: PVMD > ### Title: Vitural Machine Control > ### Aliases: PVMD .PVM.start.pvmd .PVM.addhosts .PVM.delhosts .PVM.halt > ### Keywords: utilities connection interface > > ### ** Examples > > # start a new virtual machine on local machine > ## Not run: > ##D .PVM.start.pvmd () > ##D # add two more hosts to it > ##D .PVM.addhosts ("sparky", > ##D "thud.cs.utk.edu ep=$R_LIBS/rpvm/") > ##D # do some work ... > ##D # finished with one machine > ##D .PVM.delhosts ("thud.cs.utk.edu") > ##D # do some other work ... > ##D # finished with pvm > ##D .PVM.halt () > ## End(Not run) > > > > cleanEx(); ..nameEx <- "inin.sprng.master" > > ### * inin.sprng.master > > flush(stderr()); flush(stdout()) > > ### Name: init.sprng.master > ### Title: Interface to rsprng for initializing SPRNG > ### Aliases: init.sprng.master init.sprng.slave init.sprng.group > ### .SPRNG.INIT.TAG > ### Keywords: interface distribution > > ### ** Examples > > # in master script > ## Not run: oldrng <- init.sprng.master (children, seed = 2321) > # in slave script > ## Not run: oldrng <- init.sprng.slave () > # in group processes > ## Not run: oldrng <- init.sprng.group ("mygroup", root = 0, seed = 1231) > > > > ### *