I also wanted to add the result from my Windows machine (R 3.0.0) to the
answer below:
> ncore = system('nproc')
> ncore
[1] 127
# My machine was not happy about starting a cluster with 127 nodes though.
Best wishes,
Jon
On 18-Apr-13 15:13, Jon Olav Skoien wrote:
I dont think this has anything to do with the snow package, you should
rather start by checking what is the output of system('nproc') is on
your computer, and also whether it is possible to assign this to a
variable. I tried on a redhat linux (R 2.15.0) server:
> ncore = system('nproc')
16
> ncore
[1] 0
# the result is printed, not returned
Best wishes,
Jon
On 18-Apr-13 10:52, Kaiyin Zhong (Victor Chung) wrote:
Dear all,
I found a strange thing with the snow package.
This will work:
y = matrix(1:4, 2)
cl = makeCluster(rep('localhost', 8), type='SOCK')
parMM(cl, y, y)
This will not:
y = matrix(1:4, 2)
ncore = system('nproc')
parMM(cl, y, y)
Error in cut.default(i, breaks) : invalid number of intervals
I also tried:
cl = makeCluster(rep('localhost', ncore), type='SOCK')
cl = makeCluster(rep('localhost', as.integer(ncore)), type='SOCK')
no luck.
Could anyone please help? Thanks!
Best regards,
Kaiyin ZHONG
------------------------------
FMB, Erasmus MC
k.zh...@erasmusmc.nl
kindlych...@gmail.com
[[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.
--
Jon Olav Skøien
Joint Research Centre - European Commission
Institute for Environment and Sustainability (IES)
Land Resource Management Unit
Via Fermi 2749, TP 440, I-21027 Ispra (VA), ITALY
jon.sko...@jrc.ec.europa.eu
Tel: +39 0332 789206
Disclaimer: Views expressed in this email are those of the individual and do
not necessarily represent official views of the European Commission.
______________________________________________
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.