Dear R Users,

I have a relatively simple rmpi question. 

My configation is:
- R version 2.7.2
- rmpi 0.5-6
- Deino MPI 1.1.0
- Windows XP SP2

After succesfully spawning slaves, I am trying to assign values to 
variables in the environment of each slave and run some simple calcs. This 
appears to fail, as below: my assignment of value "1" to variable "a" 
appears to come back OK, but then when I try and retrieve it, it fails. 

Could someone please point out what I might be doing wrong ? 

I spawn 8 slaves below, but have deleted the output from slaves 3-7 just 
to save space and make the output easier to read.

> mpi.spawn.Rslaves() 
        8 slaves are spawned successfully. 0 failed.
master (rank 0, comm 1) of size 9 is running on: Personal 
slave1 (rank 1, comm 1) of size 9 is running on: Personal 
slave2 (rank 2, comm 1) of size 9 is running on: Personal 
...
slave8 (rank 8, comm 1) of size 9 is running on: Personal 
> mpi.remote.exec(paste("I am",mpi.comm.rank(),"of",mpi.comm.size())) 
$slave1
[1] "I am 1 of 9"

$slave2
[1] "I am 2 of 9"
...
$slave8
[1] "I am 8 of 9"

> mpi.remote.exec(eval(assign("a","1")))
$slave1
[1] "1"

$slave2
[1] "1"
...
$slave8
[1] "1"

> mpi.remote.exec(eval(assign("b","2")))
$slave1
[1] "2"

$slave2
[1] "2"
...
$slave8
[1] "2"

> mpi.remote.exec(a)
$slave1
[1] "Error in eval(expr, envir, enclos) : object \"a\" not found\n"
attr(,"class")
[1] "try-error"

$slave2
[1] "Error in eval(expr, envir, enclos) : object \"a\" not found\n"
attr(,"class")
[1] "try-error"
...
$slave8
[1] "Error in eval(expr, envir, enclos) : object \"a\" not found\n"
attr(,"class")
[1] "try-error"


Thanks in advance,
Tolga

Generally, this communication is for informational purposes only
and it is not intended as an offer or solicitation for the purchase
or sale of any financial instrument or as an official confirmation
of any transaction. In the event you are receiving the offering
materials attached below related to your interest in hedge funds or
private equity, this communication may be intended as an offer or
solicitation for the purchase or sale of such fund(s).  All market
prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without notice.
Any comments or statements made herein do not necessarily reflect
those of JPMorgan Chase & Co., its subsidiaries and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.
        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to