Hi
 
I hoping someone can help me in with problem below. Basically I'm trying
to the do the following
 
1) Create a shared big matrix called the.data in the master R session
2) Create 2 Rslaves
3) attach the shared big matrix in the slave session
4) do some analysis on the Rslaves
5) close the Rslaves
 
I'm getting stuck on point 3 and my code is below - please note this
just a simple example to illustrate the issue
 
Many thanks
 
Christian Davies
 
############ Code ################
# 1) Dummy data
    the.data<-as.big.matrix(rbind(c(1:3),c(4:6)),shared = T)
# get description
    the.data.desc<-describe(the.data)
# 2) Create Slaves
    mpi.spawn.Rslaves(nslaves = 2)
# send description to slaves
    mpi.bcast.Robj2slave(the.data.desc)
# check object has gone to slaves
  mpi.remote.exec(exists("the.data.desc"))
# 3) Try to attach shared object
# ******** This is where the code fails *******#
    mpi.remote.exec(the.data.copy<-attach.big.matrix(the.data.desc))
 

# ************** Error Msgs *******************#
#$slave1
#[1] "Error in attach.big.matrix(the.data.desc) : \n  Fatal error in
attach: shared big.matrix could not be attached.\n"
#attr(,"class")
#[1] "try-error"
 
#$slave2
#[1] "Error in attach.big.matrix(the.data.desc) : \n  Fatal error in
attach: shared big.matrix could not be attached.\n"
#attr(,"class")
#[1] "try-error"

 
# 4) do some analysis
   analysis<-mpi.remote.exec(apply(the.data.copy,2,min))
# 5) Close RSlaves
    mpi.close.Rslaves()
 
 
 

If there is any advice in this email, it is general advice only and has been prepared by Macquarie Group or one of its related entities (“Macquarie”). 

Macquarie has made every reasonable effort to ensure the information provided is correct, but Macquarie makes no representation nor any warranty as to whether the information is accurate, complete or up to date. To the extent permitted by law, Macquarie accepts no responsibility for any errors or misstatements, negligent or otherwise. The information provided may be based on assumptions or market conditions and may change without notice. 
Macquarie, its associates, officers or employees may also have interests in the financial products referred to in this information by acting in various roles. They may buy or sell the financial products as principal or agent and as such may effect transactions which are not consistent with any recommendations (if any in this information).  Macquarie or its associates may also receive fees or brokerage for acting in the above capacities.

The information in this email is confidential. If you ar...{{dropped:13}}

