Closed nuest closed 6 years ago
the FastR build, at the moment, does a full GNU R build because it reuses some of the artifacts that are generated during that build. that means that we have some dependencies on native libraries (see https://github.com/graalvm/fastr#pre-requisites). if you can retrieve the com.oracle.truffle.r.native/gnur/R-3.3.2/gnur_configure.log file from the failed docker image, that'll give you more concrete information as to what the problem is.
Thanks for the pointer. The problem was a missing F77 compiler:
root@4f3ca9619954:/tmp/fastr# cat com.oracle.truffle.r.native/gnur/R-3.3.2/gnur_configure.log
checking build system type... x86_64-pc-linux-gnu
[...]
configure: error: No F77 compiler found
So I re-checked your documentation link and installed gfortran
, libpcre3-dev
, and the various compression libs in -dev
versions: https://github.com/nuest/fastr-docker/commit/4596a283859ae64596eae3135c84eccc32baa3fe
Now I have some make logs to go through and fix, will post updates here:
Since a full GNU R build is required, looking at the Rocker Dockerfiles might help.
The Docker build works now, automated on GitHub:
Feedback by fastr developers would be highly appreciated. If welcome, I'd be happty to contribute a blog post or wiki page about how you could use this image. The most prominent use case I can think of is "regular R" users trying out their code with fastr
Hi Daniel,
thank you for putting this together! We'll probably add a link from our README.
One idea: if you also run mx build
in graal/compiler directory and then run FastR with mx --dynamicimports graal/compiler R
, then FastR will run with Graal compiler, i.e. long running computations should run much faster. You can verify that by running mx --dynamicimport graal/compiler --J "@-Dgraal.TraceTruffleCompilation=true" R
and some loop like for (i in 1:10000) unique(1:i)
, logs of compilation activity should be printed in the console.
Thanks! That worked quickly, I do see the logging messages.
I will push this change it would be cool to have some kind of benchmark, I'm happy about any pointers if you have already a short comparison script.
Do you mind helping me out and explain the difference between mx R
and running /fastr/bin/R
?
do you mind helping me out and explain the difference between mx R and running /fastr/bin/R
mx R
directly runs java (and FastR in it), while ./bin/R
is launcher script taken from GNU R almost as is and it preprocessed options before running java & FastR. With ./bin/R
you can do for example, ./bin/R CMD INSTALL mypackage
, which you can't do with mx R
, but at the same time with mx
you get all the mx
support, like adding java arguments via --J @'args'
and starting with debugger via -d
etc.
it would be cool to have some kind of benchmark
There is one in the documentation [1] and another here [2], there are some micro benchmarks available in older Purdue FastR repo [3] that we moved out of this FastR repo since then.
[1] http://www.graalvm.org/docs/reference-manual/languages/r/#high-performance [2] https://github.com/graalvm/examples/tree/master/fastr_scalar [3] https://github.com/allr/purdue-fastr/tree/master/test/r
Thanks for the links!
I updated the README with the minimal example, a proper comparison based on the containers is very easy to do but will have to wait until someone asks for it :-)
I'm trying to build FastR from source, see https://github.com/nuest/fastr-docker and the
Dockerfile
.I get an error building GNU R, see https://github.com/nuest/fastr-docker/issues/1
Can you guys point me to some potential issues?