You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/user/README.md
+17-13
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,17 @@ The R language runtime can be installed to a GraalVM build the [GraalVM Updater]
13
13
See `$GRAALVM_HOME/bin/gu --help` for more information.
14
14
15
15
### Requirements
16
-
GraalVM R engine requires the [OpenMP runtime library](https://www.openmprtl.org/) and [GFortran 3](https://gcc.gnu.org/wiki/GFortranBinaries) runtime libraries to be installed
16
+
GraalVM R engine requires the [OpenMP runtime library](https://www.openmprtl.org/) and [GFortran 8](https://gcc.gnu.org/wiki/GFortranBinaries) runtime libraries to be installed
17
17
on the target system. Following commands should install those dependencies.
18
18
19
19
* Ubuntu 18.04 and 19.10: `apt-get install libgfortran-8-dev libgomp1`
GraalVM R engine uses the same [polyglot options]({{ "/docs/reference-manual/polyglot/#polyglot-options" | relative_url}}) as other GraalVM languages and the same R options as [GNU R](https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Invoking-R-from-the-command-line), e.g., `bin/R --vanilla`.
66
+
GraalVM R engine uses the same [polyglot options](http://graalvm.org/docs/reference-manual/polyglot/#polyglot-options) as other GraalVM languages and the same R options as [GNU R](https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Invoking-R-from-the-command-line), e.g., `bin/R --vanilla`.
63
67
Use `--help` to print the list of supported options. The most important options include:
64
68
-`--jvm` to enable Java interoperability
65
69
-`--polyglot` to enable interoperability with other GraalVM languages
66
70
-`--vm.Djava.net.useSystemProxies=true` to pass any options to the JVM, this will be translated to `-Djava.net.useSystemProxies=true`.
67
71
68
72
Note: unlike other GraalVM languages, R does not yet ship with a
69
-
[Native Image]({{"/docs/reference-manual/aot-compilation/" | relative_url }}) of its runtime.
73
+
[Native Image](http://graalvm.org/docs/reference-manual/aot-compilation/) of its runtime.
70
74
Therefore the `--native` option, which is the default, will still start Rscript on top of JVM,
71
75
but for the sake of future compatibility the Java interoperability will not be available in such case.
72
76
@@ -85,9 +89,9 @@ The GraalVM R engine can run [R extensions](https://cran.r-project.org/doc/manua
85
89
The *native* mode is better suited for code that does not extensively interact with the R API, for example,
86
90
plain C or Fortran numerical computations working on primitive arrays. The *llvm* mode provides significantly
87
91
better performance for extensions that frequently call between R and the C/C++ code, because GraalVM LLVM
88
-
interpreter is also partially evaluated by the [Truffle library](https://github.com/oracle/graal/tree/master/truffle) like the R code, both can be inlined and optimized
92
+
interpreter is also partially evaluated by the [Truffle compiler](https://github.com/oracle/graal/tree/master/truffle) like the R code, both can be inlined and optimized
89
93
as one compilation unit. Moreover, GraalVM LLVM is supported by
90
-
[GraalVM tools]({{ "/docs/reference-manual/tools/" | relative_url }}) which allows to, for instance,
94
+
[GraalVM tools](http://graalvm.org/docs/reference-manual/tools/) which allows to, for instance,
91
95
debug R and C code together.
92
96
93
97
In one GraalVM R process, any R package can be loaded in either mode. That is, GraalVM R supports
@@ -96,7 +100,7 @@ mixing packages loaded in the *native* mode with packages loaded in the *llvm* m
96
100
### Generating LLVM Bitcode
97
101
98
102
As of version 19.3.0, the GraalVM R engine is configured to use the
to compile R packages native code. This toolchain produces standard executable binaries for
101
105
a given system, but it also embeds the corresponding LLVM bitcode into them.
102
106
The binaries produced by the LLVM Toolchain can be loaded in both modes: *native* or *llvm*.
@@ -159,7 +163,7 @@ Known limitations of GraalVM implementation of R compared to GNU R:
159
163
but do not execute any useful code. Character vectors are represented as Java Strings and therefore encoded in UTF-16 format. GraalVM implementation of R will add support for encoding in future releases.
160
164
- Some parts of the native API (e.g., `DATAPTR`) expose implementation details that are hard to emulate for alternative implementations of R. These are implemented as needed while testing the GraalVM implementation of R with various CRAN packages.
161
165
162
-
You can use the [compatibility checker]({{"/docs/reference-manual/compatibility/" | relative_url}}) to find whether the CRAN packages you are interested in are tested on GraalVM and whether the tests pass successfully.
166
+
You can use the [compatibility checker](http://graalvm.org/docs/reference-manual/compatibility) to find whether the CRAN packages you are interested in are tested on GraalVM and whether the tests pass successfully.
163
167
164
168
## High Performance
165
169
GraalVM runtime optimizes R code that runs for extended periods of time.
R vectors are presented as arrays to other languages. This includes single element vectors, e.g., `42L` or `NA`.
275
279
However, single element vectors that do not contain `NA` can be typically used in places where the other
@@ -336,8 +340,8 @@ of the implicit and explicit foreign objects conversions.
336
340
Note that R contexts started from other languages or Java (as opposed to via the `bin/R` script) will default to non-interactive mode, similar to `bin/Rscript`.
337
341
This has implications on console output (results are not echoed) and graphics (output defaults to a file instead of a window), and some packages may behave differently in non-interactive mode.
338
342
339
-
See the [Polyglot Reference]({{ "/docs/reference-manual/polyglot/" | relative_url }}) and the
0 commit comments