Skip to content

Commit d4e151c

Browse files
committed
[GR-11478] Update CHANGELOG.md.
PullRequest: fastr/2190
2 parents 0d1d44b + f5ef758 commit d4e151c

File tree

4 files changed

+32
-19
lines changed

4 files changed

+32
-19
lines changed

CHANGELOG.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,25 @@
22

33
New features:
44

5+
* new Graal LLVM based back-end for running packages native code.
6+
* The default {FASTR_HOME}/etc/Makeconf is configured to use the Graal LLVM toolchain to build the native code of R packages.
7+
* The toolchain builds standard native binaries for a given plarform and also embeds the corresponding LLVM bitcode in them.
8+
* R builtin `fastr.setToolchain(name)` (`name` can be `llvm` or `native`) sets the compiler toolchain used for package building (modifies etc/Makeconf).
9+
* To switch back to the previous toolchain configuration that used `GCC`, execute `fastr.setToolchain("native")`.
10+
* Option `--R.BackEnd` specifies the default backend used to execute packages native code.
11+
* Different R packages can be run via different backends in one FastR context.
12+
* `--R.BackEnd=native`, the default, is JNI based backend that runs directly the actual native code.
13+
* `--R.BackEnd=llvm` is the new LLVM backend that loads the LLVM bitcode embedded in package libraries and runs it via Graal LLVM.
14+
* `--R.BackEndNative=pkg1,pkg2,...` enumerates packages whose native code will be executed by the native backend.
15+
* `--R.BackEndLLVM=pkg1,pkg2,...` enumerates packages whose native code will be executed by the LLVM backend.
16+
* Note: All `--R.BackEnd*` options are passed to R subprocesses.
17+
* Debugging of packages native code with LLVM backend.
18+
* Option `--R.DebugLLVMLibs` activates debugging of native code using the bundled LLVM bitcode.
19+
* Builtin `fastr.useDebugMakevars(use)` activates/deactivates a special `etc/Makevars.site` tailored for building the packages native code for debugging.
520
* `gc` attempts to invoke Java GC when FastR is run with `--R.EnableExplicitGC=true`
621
* this is intended only for testing purposes and it is not recommended to run GC explicitly in FastR.
722
* `gc` is not invoking Java GC by default because GNU-R GC and Java GC are fundamentally
823
different and this may lead to unintended behavior.
9-
* Option `--R.BackEnd` specifies an RFFI backend. `--R.BackEnd=native`, the default, activates the JNI based backend, while `--R.BackEnd=llvm` activates the LLVM backend loading the LLVM bitcode bundled with package libraries. Note: All ``--R.BackEnd*` options are passed to R subprocesses.
10-
* Option `--R.BackEndNative` enumerates packages whose native code will be executed by the native backend (JNI based)
11-
* Option `--R.BackEndLLVM` enumerates packages whose native code will be executed by the LLVM backend
12-
* Option `--R.DebugLLVMLibs` activates debugging of native code using the bundled LLVM bitcode
13-
* Builtin `fastr.useDebugMakevars(use)` activates/deactivates a special `etc/Makevars.site` for debugging native code
14-
* Builtin `fastr.setToolchain(name)` (`name` can be `llvm` or `native`) sets the compiler toolchain used for package building
1524

1625
Added missing R builtins and C APIs
1726

@@ -34,7 +43,6 @@ Bug fixes:
3443
* failures when working with large vectors (>1GB)
3544

3645

37-
3846
# 19.2.0
3947

4048
New features:

com.oracle.truffle.r.native/run/configure_fastr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ done
102102
res=$?
103103
if [[ $res != 0 ]]; then
104104
echo "Cannot build a simple C program linking with libgfortran, libgcc_s, and libquadmath."
105-
echo "Please install GCC using:"
106-
echo " On Debian based systems: apt-get install build-essential"
107-
echo " On CentOS/RHEL: yum groupinstall \"Developent Tools\""
105+
echo "Please install GCC and gfortran using:"
106+
echo " On Debian based systems: sudo apt-get install build-essential gfortran"
107+
echo " On CentOS/RHEL/Oracle Linux: sudo yum groupinstall \"Developent Tools\"; yum install gcc-gfortran"
108108
echo ""
109109
printHelp
110110
exit 1

com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import com.oracle.truffle.api.profiles.ConditionProfile;
4747
import com.oracle.truffle.api.source.SourceSection;
4848
import com.oracle.truffle.r.runtime.FileSystemUtils;
49+
import com.oracle.truffle.r.runtime.REnvVars;
4950
import com.oracle.truffle.r.runtime.RError;
5051
import com.oracle.truffle.r.runtime.RError.Message;
5152
import com.oracle.truffle.r.runtime.RError.RErrorException;
@@ -591,11 +592,15 @@ public static DLLInfo loadLibR(RContext context, String path, Function<String, L
591592
try {
592593
handle = load.apply(path);
593594
} catch (UnsatisfiedLinkError ex) {
594-
throw RSuicide.rSuicide(context, "error loading libR from: " + path + ".\n" +
595-
"If running on the NFI backend, did you provide the location of libtrufflenfi.so as the value of the system " +
596-
"property 'truffle.nfi.library'?\nThe current value is '" + System.getProperty("truffle.nfi.library") + "'.\n" +
597-
"Is the OpenMP runtime library (libgomp.so) present on your system? This library is, e.g., typically part of the GCC package.\n" +
598-
"Details: " + ex.getMessage());
595+
throw RSuicide.rSuicide(context, String.format("error loading libR from: %s.\n" +
596+
"Message: " + ex.getMessage() + "\n\n" +
597+
"Troubleshooting: \n\n" +
598+
" * If you have not already %s/bin/configure_fastr yet, try running it.\n\n" +
599+
" * Is the OpenMP runtime library (libgomp.so) present on your system? This library is, e.g., typically part of the 'gcc' package.\n\n" +
600+
" * Are the gfortran runtime libraries present on your system? These libraries are, e.g., typically part of the 'gfortran' package.\n\n" +
601+
" * Did you provide the location of libtrufflenfi.so as the value of the system " +
602+
"property 'truffle.nfi.library'? The current value is '%s'.\n\n",
603+
path, REnvVars.rHome(), System.getProperty("truffle.nfi.library")));
599604
} catch (Throwable ex) {
600605
throw RSuicide.rSuicide(context, "error loading libR from: " + path + ". Details: " + ex.getMessage());
601606
}

mx.fastr/mx_fastr_dists.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,16 +301,16 @@ def mx_register_dynamic_suite_constituents(register_project, register_distributi
301301
],
302302
include_in_polyglot=False,
303303
post_install_msg="NOTES:\n---------------\n" +
304-
"The user specific library directory was not created automatically. " +
305-
"You can either create the directory manually or edit file ${graalvm_languages_dir}/R/etc/Renviron to change it to any desired location. " +
306-
"Without user specific library directory, users will need write permission for the GraalVM home directory in order to install R packages. " +
307-
"\n\n" +
308304
"FastR needs a system-dependent configuration because it links with some system libraries. " +
309305
"A generic configuration that works out of the box on most Linux distributions with GCC and gfortran installed is provided by default. " +
310306
"If you are on another system (e.g., MacOS), wish to fine-tune the configuration to your system, or should you encounter any " +
311307
"issues when running FastR or during R packages installation, try running the following script that adjusts " +
312308
"the configuration to your system: \n" +
313309
" ${graalvm_languages_dir}/R/bin/configure_fastr\n\n" +
310+
"The user specific library directory was not created automatically. " +
311+
"You can either create the directory manually or edit file ${graalvm_languages_dir}/R/etc/Renviron to change it to any desired location. " +
312+
"Without the user specific library directory, users will need write permission for the GraalVM home directory in order to install R packages. " +
313+
"\n\n" +
314314
"The R component comes without native image by default. If you wish to build the native image, " +
315315
"which provides faster startup, but slightly slower peak performance, then run the following:\n" +
316316
" ${graalvm_languages_dir}/R/bin/install_r_native_image\n\n" +

0 commit comments

Comments
 (0)