Oracle R Distribution 3.4.4 Released on Oracle’s Yum
This article is originally published at https://blogs.oracle.com/r/compendium/rss
Oracle R Distribution version 3.4.4 is now released on Oracle Linux 6 and Linux 7 yum channels.
This update, code named "Someone to Lean On", is a maintenance release for the R-3.4.x series, but a major update to the R Language engine since the release of Oracle R Distribution 3.3.0.
The R-3.4.x series brings several major changes aimed at improving the performance of R programs.
The Just-In-Time (JIT) byte-code compiler is now enabled by default. R will automatically byte code compile any code that is executed without explicitly calling any compile functions. This can result in significantly higher execution speeds as functions will be compiled prior to execution on the first or second invocation. The impact is larger on code that uses looping-type functionality.
The JIT byte compiler has been available in R for some time, but it was not enabled by default. To activate JIT compilation previously, users would be required to invoke the enableJIT() function from the built-in compiler package. The "level" argument tells R how much code to compile before execution. Arguments 1, 2, or 3 implement different levels of optimization; 0 disables JIT, 1 compiles functions before their first use, 2 also compiles functions before they are duplicated, and 3 also compiles loops before they are executed:
R> library(compiler)
R> enableJIT(level=3)
The JIT byte compiler can also be enabled by setting the environment variable R_ENABLE_JIT to one of these values.
R-3.4.4 (or 3.4.x series) introduces a variety of additional performance improvements:
- Increased performance when BLAS is used is improved for matrix and vector multiplication
- Sorting vectors of numbers and tables with missing values is faster
- Long strings no longer cause slowness in the str() function
- sapply() is faster when applied to arrays with dimension names
This is just a highlight of the changes since R-3.3.0 was released. Refer to the R NEWS file for
the detailed list of bug fixes and enhancements.
Oracle R Distribution 3.4.4 works with Oracle R Enterprise 1.5.1 after applying several workarounds:
1. Out of the box, ORE Embedded R Execution under R-3.4.4 will give the error:
> ore.doEval(function(){123})
Error in .oci.GetQuery(conn, statement, data = data, prefetch = prefetch,
ORA-06520: PL/SQL: Error loading external library
ORA-06522: libpcre.so.1: cannot open shared object file: No such file or directory
Beginning with R-3.3.0, ORD on Linux 6 is built against libraries provided in the R-core-extra library, which installs to $R_HOME/port/Linux-X64/lib by default.
The Oracle DB process cannot find libpcre because it's not in LD_LIBRARY_PATH for the Oracle process. Adding the following to $ORACLE_HOME/hs/admin/extproc.ora resolves the problem:
SET LD_LIBRARY_PATH=/usr/lib64/R/port/Linux-X64/lib
A database reboot is required for the change to take effect. With this update, the Oracle
process will find libpcre.so.1:
> ore.doEval(function(){123})
[1] 123
Note that this issue is only present for Linux 6 systems. The Linux 7 native libpcre library is used to build R and the path to libpcre is in the Oracle process LD_LIBRARY_PATH by default.
2. The ORE 1.5.1 supporting package Cairo must be rebuilt for compatibility with R-3.4.4:
R> install.packages("Cairo")
This applies to ORD 3.4.4 on Linux 6 and 7 systems. If the Cairo package is not rebuilt, embedded R functionality will give the error:
R> ore.doEval(function(){123)})
ORA-28578: protocol error during callback from an external procedure
With these changes, Oracle R Distribution 3.4.4 is compatible with Oracle R Enterprise 1.5.1.
The releases for Oracle R Distribution 3.4.4 on Windows, Solaris x86_64, Solaris SPARC and AIX will follow. Check the Oracle R Distribution download site from Oracle's Open Source Software portal for updates.
Thanks for visiting r-craft.org
This article is originally published at https://blogs.oracle.com/r/compendium/rss
Please visit source website for post related comments.