I'm trying to run Rserve on Microsoft R Client and execute RevoScaleR functions over a network connection. I can run non-RevoScaleR functions, but RevoScaleR seems to have some kind of compatibility issue.
I can start an Rserve, connect, and have it execute code that doesn't involve RevoScaleR:
> library(RSclient)
> rsc <- RSconnect(port=30120)
> RSeval(rsc, '
+ model <- lm(dist~speed, cars)
+ predict(model, cars)')
1 2 3 4 5 6 7 8
-1.849460 -1.849460 9.947766 9.947766 13.880175 17.812584 21.744993 21.744993
9 10 11 12 13 14 15 16
21.744993 25.677401 25.677401 29.609810 29.609810 29.609810 29.609810 33.542219
17 18 19 20 21 22 23 24
33.542219 33.542219 33.542219 37.474628 37.474628 37.474628 37.474628 41.407036
25 26 27 28 29 30 31 32
41.407036 41.407036 45.339445 45.339445 49.271854 49.271854 49.271854 53.204263
33 34 35 36 37 38 39 40
53.204263 53.204263 53.204263 57.136672 57.136672 57.136672 61.069080 61.069080
41 42 43 44 45 46 47 48
61.069080 61.069080 61.069080 68.933898 72.866307 76.798715 76.798715 76.798715
49 50
76.798715 80.731124
But if I try to run RevoScaleR functions, I get a "remote evaluation failed" error:
> RSeval(rsc, '
+ model <- rxLinMod(dist~speed, cars)
+ rxPredict(model, cars)')
Error in RSeval(rsc, "\nmodel <- rxLinMod(dist~speed, cars)\nrxPredict(model, cars)") :
remote evaluation failed
and Rserve produces the following error output:
> Error in doTryCatch(return(expr), name, parentenv, handler) :
ignoring SIGPIPE signal
Error in doTryCatch(return(expr), name, parentenv, handler) :
Write error: expected 8 got
Strangely, RevoScaleR seems to work intermittently if I put Rserve in debug mode. It also works if I run Rserve on Microsoft R Server on Windows, but Rserve on Windows is deeply limited.
One of my suspicions is that Rserve's forking might be causing issues, but the only fork-related warnings I can find regarding RevoScaleR are about a thread pool feature that I don't have enabled. I feel like connections with the BxlServer might also be an issue - Rserve doesn't seem to create a new BxlServer on fork - but I couldn't find any documentation about that, and I don't even know if the BxlServer is involved if you're not connecting to SQL Server. GDB shows the SIGPIPE is occurring in SendAndReceiveBxlFnToServer, which sounds like the BxlServer would be involved.
I'm on SLES 11 SP3 and Microsoft R Client 3.3.3.
Is Rserve incompatible with RevoScaleR? If it is compatible, do I need to perform any additional setup over what I would with regular R to make it work?