Skip to content

Commit 4ffca7c

Browse files
committed
Minor improvements in the documentation
1 parent e2e260b commit 4ffca7c

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

documentation/Index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FastR Documentation
22

3-
* [For FastR Users](user/Index.md)
3+
* [For FastR Users](user/README.md)
44
* [Java interoperability tutorial](tutorials/interop/javaInteroperability.md)
55
* [For FastR Contributors](dev/Index.md)
66
* [Building FastR](dev/building.md)

documentation/user/README.md

+17-13
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ The R language runtime can be installed to a GraalVM build the [GraalVM Updater]
1313
See `$GRAALVM_HOME/bin/gu --help` for more information.
1414

1515
### 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
1717
on the target system. Following commands should install those dependencies.
1818

1919
* Ubuntu 18.04 and 19.10: `apt-get install libgfortran-8-dev libgomp1`
2020
* Oracle Linux 8: `yum install libgfortran`
2121
* MacOS: `brew install [email protected]`
2222

23+
As of version 20.0.1 and later, FastR on Linux supports and bundles GFortran version 3
24+
runtime libraries. It is not necessary to install them. These libraries are compatible
25+
with GFortran compiler version 3 and later.
26+
2327
On macOS it is necessary to run `$GRAALVM_HOME/bin/configure_fastr`.
2428
This script will attempt to locate the necessary runtime libraries on your computer
2529
and will fine-tune the the GraalVM R installation according to your system.
@@ -59,14 +63,14 @@ $ R [polyglot options] [R options] [filename]
5963
$ Rscript [polyglot options] [R options] [filename]
6064
```
6165

62-
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`.
6367
Use `--help` to print the list of supported options. The most important options include:
6468
- `--jvm` to enable Java interoperability
6569
- `--polyglot` to enable interoperability with other GraalVM languages
6670
- `--vm.Djava.net.useSystemProxies=true` to pass any options to the JVM, this will be translated to `-Djava.net.useSystemProxies=true`.
6771

6872
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.
7074
Therefore the `--native` option, which is the default, will still start Rscript on top of JVM,
7175
but for the sake of future compatibility the Java interoperability will not be available in such case.
7276

@@ -85,9 +89,9 @@ The GraalVM R engine can run [R extensions](https://cran.r-project.org/doc/manua
8589
The *native* mode is better suited for code that does not extensively interact with the R API, for example,
8690
plain C or Fortran numerical computations working on primitive arrays. The *llvm* mode provides significantly
8791
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
8993
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,
9195
debug R and C code together.
9296

9397
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
96100
### Generating LLVM Bitcode
97101

98102
As of version 19.3.0, the GraalVM R engine is configured to use the
99-
[LLVM toolchain]({{ "/docs/reference-manual/languages/llvm/#llvm-toolchain" | relative_url }})
103+
[LLVM toolchain](http://graalvm.org/docs/reference-manual/languages/llvm/#llvm-toolchain)
100104
to compile R packages native code. This toolchain produces standard executable binaries for
101105
a given system, but it also embeds the corresponding LLVM bitcode into them.
102106
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:
159163
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.
160164
- 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.
161165

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.
163167

164168
## High Performance
165169
GraalVM runtime optimizes R code that runs for extended periods of time.
@@ -206,7 +210,7 @@ system.time(mutual_cpp(x))
206210
# user system elapsed
207211
# 0.037 0.003 0.040
208212
```
209-
(Uses [r_mutual.cpp]({{"/docs/examples/r_mutual.cpp" | relative_url }}).)
213+
(Uses [r_mutual.cpp](http://graalvm.org/docs/examples/r_mutual.cpp).)
210214
However, after a few iterations, GraalVM runs the R code efficiently enough to
211215
make the performance advantage of C/C++ negligible:
212216
```
@@ -221,9 +225,9 @@ GraalVM implementation of R is primarily aimed at long-running applications. The
221225

222226
The R language integration with the GraalVM ecosystem includes:
223227
- seamless interop with other GraalVM languages and with Java
224-
- debugging with [Chrome DevTools]({{"/docs/reference-manual/tools/#debugger" | relative_url }})
228+
- debugging with [Chrome DevTools](http://graalvm.org/docs/reference-manual/tools/#debugger)
225229
- [CPU and memory profiling]({{"/docs/reference-manual/tools/#profiler" | relative_url }})
226-
- [VisualVM integration]({{"/docs/reference-manual/tools/#heap-viewer" | relative_url }})
230+
- [VisualVM integration](http://graalvm.org/docs/reference-manual/tools/#heap-viewer)
227231

228232
To start debugging the code start the R script with `--inspect` option
229233
```shell
@@ -269,7 +273,7 @@ eval.polyglot('js', paste0(
269273
# JavaScript: 3
270274
# NULL -- the return value of eval.polyglot
271275
```
272-
(Uses [r_example.js]({{"/docs/examples/r_example.js" | relative_url }}).)
276+
(Uses [r_example.js](http://graalvm.org/docs/examples/r_example.js).)
273277

274278
R vectors are presented as arrays to other languages. This includes single element vectors, e.g., `42L` or `NA`.
275279
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.
336340
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`.
337341
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.
338342

339-
See the [Polyglot Reference]({{ "/docs/reference-manual/polyglot/" | relative_url }}) and the
340-
[Embedding documentation]({{ "/docs/graalvm-as-a-platform/embed/" | relative_url }})
343+
See the [Polyglot Reference](http://graalvm.org/docs/reference-manual/polyglot/) and the
344+
[Embedding documentation](http://graalvm.org/docs/graalvm-as-a-platform/embed/)
341345
for more information about interoperability with other programming languages.
342346

343347

0 commit comments

Comments
 (0)