[R] Rserve : CStack usage too close to the limit

Matthieu Decorde matthieu.decorde at ens-lyon.fr
Thu Apr 15 19:37:11 CEST 2010


I use the Rserve package (RserveEngine.jar) and
the Java client (REngine.jar) from Rforge.

I manipulate R matrices from within Java.

When calling a R function from the Java client on
a R matrix, Rserve gives an error :
"CStack too close to the limit"
That error happens when the matrix has a minimum
size (about 29x10000).

Here is the Java stacktrace I obtain from the execution :
org.rosuda.REngine.Rserve.RserveException: eval failed
  at org.rosuda.REngine.Rserve.RConnection.eval(RConnection.java:233)
  at main(ConnectToRserve.java:17)

When I call the same function from within R, with
exactly the same environment (I dumped my matrix in a file
which is then loaded in R), there is no error.

Thus, I believe the error comes from the Rserve protocol.

I have written a small Groovy script producing the error.
It is attached to this mail. Please contact me if you want
the complete matrix dump also.

I have already tried to contact Simon Urbanek, the author
of RServe, one month ago. Without success.

Does someone has encountered (and resolved) the same problem as me ?
Is there a more robust alternative to Rserve ?
Before beginning to work to bind the whole R core to the JVM, I would
like to explore all the possibilities to connect to R seamless.

If you know a more appropriate list for that kind of request, I would be 
glad to know it.

Thanks for your help,
Matthieu Decorde

More information about the R-help mailing list