3 Install R for Oracle Machine Learning for R
This chapter explains how to install R for OML4R.
This chapter contains these topics:
- About R and Oracle Machine Learning for R for On-Premises Database
OML4R requires an installation of R on the server computer and on each client computer that interacts with the server. - Install Oracle R Distribution on Linux
Instructions for installing Oracle R Distribution on Oracle Linux and on Redhat Enterprise Linux. - Install Oracle R Distribution on Oracle Solaris
Instructions for installing Oracle R Distribution on Oracle Solaris on Intel and on SPARC platforms. - Install Oracle R Distribution on IBM AIX
Instructions for installing Oracle R Distribution on IBM AIX. - Install Oracle R Distribution on Microsoft Windows
Instructions for installing Oracle R Distribution on Microsoft Windows. - Configure Oracle R Distribution to Use MKL on the Client
Instructions for configuring Oracle R Distribution to use MKL on a Linux or Windows client. - Uninstall Oracle R Distribution
Instructions for uninstalling Oracle R Distribution.
Related Topics
3.1 About R and Oracle Machine Learning for R for On-Premises Database
OML4R requires an installation of R on the server computer and on each client computer that interacts with the server.
R is third-party, open source software. Open source R is governed by GNU General Public License (GPL) and not by Oracle licensing.
Note:
The version of R must be the same on the server and on each client computer. Also, the version of OML4R must be the same on the server and on each client computer.- About ROracle
ROracle is an open source R package that enables interaction between R and an Oracle database. - Oracle R Distribution and OML4R
Oracle recommends that you use Oracle R Distribution, Oracle's free distribution of R, with OML4R.
See Also:
- The table of configuration requirements and server support in Oracle Machine Learning for R System Requirements for On-Premises Database for the versions of R that are supported with OML4R
- Oracle Machine Learning for R Licensing Information User Manual
Parent topic: Install R for Oracle Machine Learning for R
3.1.1 About ROracle
ROracle is an open source R package that enables interaction between R and an Oracle database.
ROracle is maintained and supported by Oracle.
ROracle is one of the open source supporting packages that is used by Oracle Machine Learning for R. The supporting packages are introduced in Client and Server Components of Oracle Machine Learning for R for On-Premises Database and described in Table 6-2.
3.1.2 Oracle R Distribution and OML4R
Oracle recommends that you use Oracle R Distribution, Oracle's free distribution of R, with OML4R.
Oracle R Distribution offers significant advantages for OML4R.
Why Oracle R Distribution?
-
Oracle R Distribution simplifies the installation of R for OML4R.
-
Oracle R Distribution is supported by Oracle for customers of Oracle Machine Learning, Oracle Linux, and Oracle Big Data Appliance.
-
On Linux, Oracle R Distribution simplifies integration with the Intel Math Kernel Library (MKL). MKL greatly improves the performance of many mathematical computations in R, including highly vectorized and threaded Linear Algebra, Fast Fourier Transforms (FFT), Vector Math, and Statistics functions. (See Enable MKL Support for Oracle R Distribution on a Linux Client.)
3.2 Install Oracle R Distribution on Linux
Instructions for installing Oracle R Distribution on Oracle Linux and on Redhat Enterprise Linux.
Before you begin the installation, verify that your Linux version is supported by Oracle Machine Learning for R, as described in the table of platform requirements in Oracle Machine Learning for R System Requirements for On-Premises Database. You can use this command to verify the Linux version:
# uname -r
Note:
For Oracle Linux systems that have access to the internet, Oracle recommends installing Oracle R Distribution from the Oracle Linux Yum Server.
The following topics describe installing Oracle R Distribution:
- Install Oracle R Distribution on Oracle Linux 7 Using Yum
Oracle recommends using yum to install Oracle R Distribution on Linux 7. - Install Oracle R Distribution on Oracle Linux Using RPMs
If yum is not available due to lack of internet access, then you can install the RPMs directly and resolve the dependencies manually. - Install Oracle R Distribution on Red Hat Enterprise Linux
Instructions on rebuilding the Oracle R Distribution RPMs on a Red Hat Linux system.
Parent topic: Install R for Oracle Machine Learning for R
3.2.1 Install Oracle R Distribution on Oracle Linux 7 Using Yum
Oracle recommends using yum to install Oracle R Distribution on Linux 7.
To install Oracle R Distribution on Oracle Linux 7 Using Yum:
-
Log in to the Linux server as root and change to the
/etc/yum.repos.d
directory:# cd /etc/yum.repos.d
-
List the contents of the directory to determine if the Oracle Linux 7 yum configuration file is present. The name of the configuration file is
public-yum-ol7.repo
.If the Oracle Linux 7 yum configuration file is not present, then download it from Oracle public yum by executing the
wget
command for your Linux platform:# wget https://public-yum.oracle.com/public-yum-ol7.repo
-
Open
public-yum-ol7.repo
in a text editor and specifyenabled=1
forol7_latest
,ol7_addons
andol7_optional_latest
:[ol7_latest] enabled=1 [ol7_addons] enabled=1 [ol7_optional_latest] enabled = 1
The location of the Oracle R Distribution packages is specified in
ol7_addons
. The location of the dependencies for the Oracle R Distribution RPMs is specified inol7_latest
and several dependencies are inoptional_latest
.The URLs for the Oracle R Distribution RPMs in the addons repository are shown in the example at the end of this topic.
Note:
If you are not using the most recent version of Oracle Linux and you want to install dependent packages that are specific to your version, then you must enable the corresponding Oracle Linux repository.
For example, to enable the Oracle Linux 7 base repository open
public-yum-ol7.repo
in a text editor and specifyenabled=1
forol7_latest
:[ol7_base] enabled=1
The output will look similar to the following:
[ol7_base] name=Oracle Linux $releasever installation media copy ($basearch) baseurl=https://public-yum.oracle.com/repo/OracleLinux/OL7/ base/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1
-
Execute the
yum
install
command to install R. Specify the version number to install for Rversion. For example, to install R-3.6.1, use the commandyum install R-3.6.1
.# yum install R-Rversion
To install the most recent version of R that is available on Oracle public yum:
# yum install R.x86_64
Note:
Do not assume that the most recent version of R on Oracle public yum is supported by your version of Oracle Machine Learning for R. Consult the table of configuration requirements and server support in Oracle Machine Learning for R System Requirements for On-Premises Database to determine which version of R you should use.
Example 3-1 Oracle R Distribution RPMs in addons Repository
In the following URLs, Rversion represents the version of Oracle R Distribution. For example, replace Rversion with 3.3.0-1 for R-3.3.0.
Oracle Linux 6:
https://public-yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/getPackage/R-Rversion.el6.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/getPackage/R-core-Rversion.el6.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/getPackage/R-core-extra-Rversion.el6.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/getPackage/R-devel-Rversion.el6.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/getPackage/libRmath-Rversion.el6.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/getPackage/libRmath-devel-Rversion.el6.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/getPackage/libRmath-static-Rversion.el6.x86_64.rpm
Oracle Linux 7:
https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-Rversion.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-core-Rversion.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-core-extra-Rversion.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-devel-Rversion.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/libRmath-Rversion.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/libRmath-devel-Rversion.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/libRmath-static-Rversion.el7.x86_64.rpm
Oracle Linux 8:
https://yum.oracle.com/repo/OracleLinux/OL8/addons/x86_64/getPackage/R-3.6.1-1.0.1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/addons/x86_64/getPackage/R-core-3.6.1-1.0.1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/addons/x86_64/getPackage/R-devel-3.6.1-1.0.1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/addons/x86_64/getPackage/libRmath-3.6.1-1.0.1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/addons/x86_64/getPackage/libRmath-devel-3.6.1-1.0.1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/addons/x86_64/getPackage/libRmath-static-3.6.1-1.0.1.el8.x86_64.rpm
Parent topic: Install Oracle R Distribution on Linux
3.2.2 Install Oracle R Distribution on Oracle Linux Using RPMs
If yum is not available due to lack of internet access, then you can install the RPMs directly and resolve the dependencies manually.
However, Oracle recommends that you use yum to install Oracle R Distribution, because yum automatically resolves RPM dependencies.
To download and install the RPMs, log in as root and execute the command rpm -Uvh rpm_name
for each RPM listed in the following sections:
- Oracle R Distribution 3.6.1 RPMs for Oracle Linux 7
Lists the Oracle R Distribution RPMs for Oracle Linux 7. - Oracle R Distribution 3.3.0 RPMs for Oracle Linux 7
Lists the Oracle R Distribution RPMs for Oracle Linux 7.
Parent topic: Install Oracle R Distribution on Linux
3.2.2.1 Oracle R Distribution 3.6.1 RPMs for Oracle Linux 7
Lists the Oracle R Distribution RPMs for Oracle Linux 7.
The Oracle R Distribution RPMs for Oracle Linux 7 are listed as follows:
https://yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-3.6.1-1.el7.x86_64.rpm
https://yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-core-3.6.1-1.el7.x86_64.rpm
https://yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-devel-3.6.1-1.el7.x86_64.rpm
https://yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/libRmath-3.6.1-1.el7.x86_64.rpm
https://yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/libRmath-devel-3.6.1-1.el7.x86_64.rpm
https://yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/libRmath-static-3.6.1-1.el7.x86_64.rpm
Parent topic: Install Oracle R Distribution on Oracle Linux Using RPMs
3.2.2.2 Oracle R Distribution 3.3.0 RPMs for Oracle Linux 7
Lists the Oracle R Distribution RPMs for Oracle Linux 7.
The Oracle R Distribution RPMs for Oracle Linux 7 are listed as follows:
https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-3.3.0-2.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-core-3.3.0-2.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-core-extra-3.3.0-2.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/R-devel-3.3.0-2.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/libRmath-3.3.0-2.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/libRmath-devel-3.3.0-2.el7.x86_64.rpm https://public-yum.oracle.com/repo/OracleLinux/OL7/addons/x86_64/getPackage/libRmath-static-3.3.0-2.el7.x86_64.rpm
Parent topic: Install Oracle R Distribution on Oracle Linux Using RPMs
3.2.3 Install Oracle R Distribution on Red Hat Enterprise Linux
Instructions on rebuilding the Oracle R Distribution RPMs on a Red Hat Linux system.
The Oracle Linux RPMs can be installed on Red Hat Linux systems. However, if you want to rebuild the Oracle R Distribution RPMs on a Red Hat Linux system, follow these instructions.
To install Oracle R Distribution on Red Hat Enterprise Linux:
-
Create an RPM build directory structure:
mkdir -p /rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
-
Set up RPM tools to use your own build tree (to avoid
root
):echo '%_topdir %(echo $HOME)/rpmbuild' > /.rpmmacros
-
From Oracle public yum, download the source RPM (
Rversion
.elx.src.rpm
where Rversion is the R version you are using and x is the Oracle Linux version you are using).Save the source RPM to the
rpmbuild/SRPMS
directory. -
Rebuild Red Hat Enterprise Linux using
rpmbuild
.rpmbuild --rebuild /rpmbuild/SRPMS/R-Rversion.elx.src.rpm
Note:
If any dependencies are missing, install them as root.
The binary RPMs are built and saved under
/rpmbuild/RPMS.
-
Log in as root and execute these commands to install R:
# rpm -i path/rpmbuild/RPMS/R-Rversion.elx.x86_64.rpm # rpm -i path/rpmbuild/RPMS/R-core-Rversion.elx.x86_64.rpm # rpm -i path/rpmbuild/RPMS/libRmath-Rversion.elx.x86_64.rpm # rpm -i path/rpmbuild/RPMS/libRmath-devel-Rversion.elx.x86_64.rpm # rpm -i path/rpmbuild/RPMS/libRmath-static-Rversion.elx.x86_64.rpm # rpm -i path/rpmbuild/RPMS/R-devel-Rversion.elx.x86_64.rpm
For example, this command installs R-3.6.1 on Red Hat Enterprise Linux x86-64 version 7, where the path to
rpmbuild
is/user/home/
.rpm -i /user/home/rpmbuild/RPMS/x86_64/R-core-3.6.1-1.el7.x86_64.rpm
Parent topic: Install Oracle R Distribution on Linux
3.3 Install Oracle R Distribution on Oracle Solaris
Instructions for installing Oracle R Distribution on Oracle Solaris on Intel and on SPARC platforms.
Before you begin the installation, verify that your Oracle Solaris version is supported by Oracle Machine Learning for R, as described in the table of platform requirements in Oracle Machine Learning for R System Requirements for On-Premises Database. You can use this command to verify the version of Oracle Solaris:
uname -r
To install Oracle R Distribution on Oracle Solaris:
-
Go to the Oracle Open Source Software Download page for Oracle R Distribution.
-
Download the files for your installation, where Rversion is the version you are installing and sunstudioversion is the version of Sun Studio. For R-3.3.0, Rversion is 3.3.0.0:
-
For x86 64-bit systems:
ord-Rversion-sol10-x86-64-sunstudioversion.tar.gz ord-Rversion-supporting-sol10-x86-64-sunstudioversion.tar.gz
-
For SPARC 64-bit systems:
ord-Rversion-sol10-sparc-64-sunstudioversion.tar.gz ord-Rversion-supporting-sol10-sparc-64-sunstudioversion.tar.gz
-
-
Uncompress the first file, either
sol110-x86-64
orsol10-sparc
. -
Run
install.sh
as root to install the Solaris PKG file for Oracle R Distribution, where installation_path is the path to the directory in which to install Oracle R Distribution.# install.sh installation_path
If you do not specify an installation path, then the default path is used. The default path is:
-
For Solaris SPARC:
/usr/lib/sparcv9
-
For Solaris Intel:
/usr/lib/amd64
-
-
Uncompress the second file, either
supporting-sol10-x86-64
orsupporting-sol10-sparc
, to a local directory such as$ORACLE_HOME/lib
. Add that directory to$LD_LIBRARY_PATH
.These tar files contain the shared libraries for
libR.so
:-
libiconv.so.2
-
libncurses.so.5
-
libreadline.so.6
-
libsunperf.so
libsunperf.so
, Sun Performance Library, and its dependent shared libraries are included in Oracle Solaris Studio. -
-
Set environment variables as follows, where installation_path is the path to the directory in which to install Oracle R Distribution:
-
For ksh:
# export R_HOME=installation_path/R # export PATH=$R_HOME/bin:$PATH # export LD_LIBRARY_PATH=$R_HOME/lib:$LD_LIBRARY_PATH
-
For csh:
# setenv R_HOME=installation_path/R # setenv PATH=$R_HOME/bin:$PATH # setenv LD_LIBRARY_PATH=$R_HOME/lib:$LD_LIBRARY_PATH
-
-
Run the following command to verify that
libR.so
is picking up its shared library dependencies correctly from the local directory.# ldd -r installation_path/R/lib/libR.so
-
Start R by typing
R
at the command prompt:% R
Parent topic: Install R for Oracle Machine Learning for R
3.4 Install Oracle R Distribution on IBM AIX
Instructions for installing Oracle R Distribution on IBM AIX.
Before installing Oracle R Distribution, verify that your version of IBM AIX is supported by Oracle Machine Learning for R, as described in the table of platform requirements in Oracle Machine Learning for R System Requirements for On-Premises Database. You can use this command to verify the version of IBM AIX:
uname -r
To install Oracle R Distribution on IBM AIX:
-
Go to the Oracle Open Source Software Download page for Oracle R Distribution.
-
Download the files for your installation, where Rversion is 3.3.0.0 for R-3.3.0:
ord.Rversion-aix.tar.gz ord-supporting-aix-Rversion.tar.gz
-
Uncompress and untar
ord-supporting-aix-Rversion.tar.gz
:$ gunzip ord-supporting-aix-Rversion.tar.gz # get ord-supporting-aix-Rversion.tar $ tar -xvf ord-supporting-aix-Rversion.tar # extract contents of .tar file $ ls ord-supporting-aix-Rversion # list of rpms bash-4.2-5.aix5.1.ppc.rpm bzip2-1.0.6-1.aix5.1.ppc.rpm bzip2-devel-1.0.6-1.aix5.1.ppc.rpm cairo-1.10.0-1.aix5.2.ppc.rpm curl-7.28.1-1.aix5.1.ppc.rpm curl-devel-7.28.1-1.aix5.1.ppc.rpm expat-2.0.1-3.aix5.1.ppc.rpm fontconfig-2.5.0-1.aix5.1.ppc.rpm gettext-0.17-1.aix5.1.ppc.rpm glib2-2.28.6-1.aix5.1.ppc.rpm info-4.13a-2.aix5.1.ppc.rpm libiconv-1.14-1.aix5.1.ppc.rpm libidn-1.29-1.aix5.1.ppc.rpm libidn-devel-1.29-1.aix5.1.ppc.rpm libpng-1.5.9-1.aix5.1.ppc.rpm libpng-devel-1.5.9-1.aix5.1.ppc.rpm libssh2-1.4.3-2.aix5.1.ppc.rpm libssh2-devel-1.4.3-2.aix5.1.ppc.rpm openldap-2.4.23-0.3.aix5.1.ppc.rpm openldap-devel-2.4.23-0.3.aix5.1.ppc.rpm openssl-1.0.1p-1.aix5.1.ppc.rpm openssl-devel-1.0.1p-1.aix5.1.ppc.rpm pcre-8.35-1.aix5.1.ppc.rpm pcre-devel-8.35-1.aix5.1.ppc.rpm pixman-0.28.2-1.aix5.1.ppc.rpm pkg-config-0.25-2.aix5.1.ppc.rpm readline-6.2-3.aix5.1.ppc.rpm readline-devel-6.2-3.aix5.1.ppc.rpm texinfo-4.13a-2.aix5.1.ppc.rpm xrender-0.9.1-3.aix5.2.ppc.rpm xz-devel-5.0.7-1.aix5.1.ppc.rpm xz-libs-5.0.7-1.aix5.1.ppc.rpm zlib-1.2.6-1.aix5.1.ppc.rpm zlib-devel-1.2.6-1.aix5.1.ppc.rpm
You can also download these RPMs from AIX Open Source Packages.
-
Install the RPMs as root using an
rpm
command:$ cd /download_directory/ord-supporting-aix-Rversion $ su # rpm -i *.rpm
To upgrade existing dependencies, use:
# rpm -UF *.rpm
If you experience conflicts with dependencies, use:
# rpm -UF --nodeps *.rpm
-
Add
/opt/freeware/lib64
and/opt/freeware/lib
to theLIBPATH
environment variable:-
For ksh:
$ export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib:$LIBPATH
-
For csh:
$ setenv LIBPATH /opt/freeware/lib64:/opt/freeware/lib:$LIBPATH
Ensure that
/opt/freeware/lib64
is before/opt/freeware/lib
and/opt/freeware/lib
is before/usr/lib
. -
-
Uncompress
ord-
Rversion
-aix.tar.gz
to getord-
Rversion
-aix.tar
install.sh
anduninstall.sh
:$ gunzip ord.Rversion-aix.tar.gz $ tar -xf ord.Rversion-aix.tar
-
Run
install.sh
as root to install the filesets in Oracle R Distribution:In the following command, installation_path is the desired location for the Oracle R Distribution that is different than
/
and rte_package_name is the Oracle R Distribution fileset to install.$ sudo ./install.sh rte_package_name installation_path
The path
/opt/R
is used if you do not specify an installation path.The options for rte_package_name are:
Option Description ORD
Install all of the filesets in Oracle R Distribution.
ORD.core
Installs only the
ORE.core
fileset.ORD.devel
Installs only the
ORE.devel
fileset, which requires theORE.core
fileset.The following command installs all of the filesets using the specified path:
$ sudo ./install.sh ORD /opt/R/3_3
The following commands install the
ORD.core
andORD.devel
filesets:$ sudo ./install.sh ORD.core
installation_path
$ sudo ./install.sh ORD.develinstallation_path
-
Add
installation_path/usr/bin
to thePATH
environment variable:-
For ksh:
$ export PATH=installation_path/usr/bin:$PATH
-
For csh:
$ setenv PATH installation_path/usr/bin:$PATH
-
-
Run
ldd
to ensure that shared library dependencies were picked up correctly:$ ldd installation_path/usr/lib/R/bin/exec/R $ ldd installation_path/usr/lib/R/lib/libR.so (libiconv, libreadline) $ ldd installation_path/usr/lib/R/lib/libRlapack.so $ ldd installation_path/usr/lib/R/lib/libRblas.so
Parent topic: Install R for Oracle Machine Learning for R
3.5 Install Oracle R Distribution on Microsoft Windows
Instructions for installing Oracle R Distribution on Microsoft Windows.
Before installing Oracle R Distribution, verify that your version of Microsoft Windows is supported by Oracle Machine Learning for R, as described in the table of platform requirements in Oracle Machine Learning for R System Requirements for On-Premises Database.
Follow these steps to install Oracle R Distribution on Windows:
-
Go to the Oracle Open Source Software Download page for Oracle R Distribution.
-
Select R Distribution for Windows 64 bit. Save the zip file on your computer.
ORD-Rversion-win.zip
-
Unzip the file and extract the executable file.
ORD-Rversion-win.exe
-
Double-click the executable file to start the installation of Oracle R Distribution.
-
Follow the instructions to complete the installation.
Parent topic: Install R for Oracle Machine Learning for R
3.6 Configure Oracle R Distribution to Use MKL on the Client
Instructions for configuring Oracle R Distribution to use MKL on a Linux or Windows client.
With this simple configuration step, Oracle R Distribution dynamically uses MKL if it is installed on your system.
This topic contains these sections:
- Enable MKL Support for Oracle R Distribution on a Linux Client
Follow these steps to enable MKL for Oracle R Distribution on a Linux Client. - Enable MKL Support for Oracle R Distribution on a Windows Client
Follow these steps to enable MKL for Oracle R Distribution on a Windows client (64-bit).
Parent topic: Install R for Oracle Machine Learning for R
3.6.1 Enable MKL Support for Oracle R Distribution on a Linux Client
Follow these steps to enable MKL for Oracle R Distribution on a Linux Client.
-
Install MKL. You can download MKL from the Intel® Math Kernel Library website.
Note: To install MKL on your computer, you must have an MKL license.
-
Add
libmkl_rt.so
,$RHOME/lib
, and$ORACLE_HOME/lib
to theLD_LIBRARY_PATH
system environment variable. For example, in the Bash shell:export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}: /path_to/libmkl_rt.so: ${RHOME}/lib: ${ORACLE_HOME}/lib
-
Start R and execute the
Sys.BlasLapack
function:Sys.BlasLapack() $vendor [1] "Intel Math Kernel Library (Intel MKL)" $nthreads [1] -1
The returned value of $vendor
indicates that MKL has replaced the BLAS
and LAPACK
that are native to R.
The returned value of nthreads
indicates the number of threads to be used by MKL. By default all available threads are used ($nthreads
= -1).
Parent topic: Configure Oracle R Distribution to Use MKL on the Client
3.6.1.1 Modifying the Number of Threads for MKL on Linux
You can change the number of threads to be used by MKL by editing the system environment variable MKL_NUM_THREADS
. For example, the following statement in the Bash shell, causes MKL to use 3 threads:
export MKL_NUM_THREADS=3
After setting MKL_NUM_THREADS
to 3, the output of Sys.BlasLapack
shows a value of 3 for $nthreads
.
R> Sys.BlasLapack() $vendor [1] "Intel Math Kernel Library (Intel MKL)" $nthreads [1] 3
3.6.2 Enable MKL Support for Oracle R Distribution on a Windows Client
Follow these steps to enable MKL for Oracle R Distribution on a Windows client (64-bit).
-
Install MKL. You can download MKL from the Intel® Math Kernel Library website:
Note: To install MKL on your computer, you must have an MKL license.
-
Add the location of
libOrdBlasLoader.dll
andmkl_rt.dll
to thePATH
system environment variable.Note:
In a typical installation of Oracle R Distribution,
libOrdBlasLoader.dll
is located in the R home directory:C:\Program Files\R\R-version\bin\x64
In a full installation of MKL 11.1,
mkl_rt.dll
is located in the Intel MKL Composer XE directory:C:\Program Files (x86)\Intel\Composer XE 2013 SP
-
Start R and execute the
Sys.BlasLapack
function:R> Sys.BlasLapack() $vendor [1] "Intel Math Kernel Library (Intel MKL)" $nthreads [1] -1
The returned value of $vendor
indicates that MKL has replaced the BLAS
and LAPACK
that are native to R.
The returned value of nthreads
indicates the number of threads to be used by MKL. By default all available threads are used ($nthreads
= -1).
- Modify the Number of Threads for MKL on Windows
You can change the number of threads to be used by MKL by editing the system environment variableMKL_NUM_THREADS
.
Parent topic: Configure Oracle R Distribution to Use MKL on the Client
3.6.2.1 Modify the Number of Threads for MKL on Windows
You can change the number of threads to be used by MKL by editing the system environment variable MKL_NUM_THREADS
.
If MKL_NUM_THREADS
does not exist, then you must create it as described in:
After setting MKL_NUM_THREADS
to 3, the output of Sys.BlasLapack
shows a value of 3 for $nthreads
.
R> Sys.BlasLapack() $vendor [1] "Intel Math Kernel Library (Intel MKL)" $nthreads [1] 3
3.7 Uninstall Oracle R Distribution
Instructions for uninstalling Oracle R Distribution.
To uninstall Oracle R Distribution, follow the instructions in the following sections:
- Uninstall Oracle R Distribution on Windows
Instructions for uninstalling Oracle R Distribution on Windows. - Uninstall Oracle R Distribution on Linux
Instructions for uninstalling Oracle R Distribution on Linux. - Uninstalling Oracle R Distribution on Oracle Solaris
Instructions for uninstalling Oracle R Distribution on Oracle Solaris. - Uninstall Oracle R Distribution on IBM AIX
Instructions for uninstalling Oracle R Distribution on Oracle R Distribution on IBM AIX.
Parent topic: Install R for Oracle Machine Learning for R
3.7.1 Uninstall Oracle R Distribution on Windows
Instructions for uninstalling Oracle R Distribution on Windows.
Uninstall Oracle R Distribution just as you would uninstall any other Windows program, using Programs and Features in Windows Control Panel.
Parent topic: Uninstall Oracle R Distribution
3.7.2 Uninstall Oracle R Distribution on Linux
Instructions for uninstalling Oracle R Distribution on Linux.
To uninstall Oracle R Distribution on Linux, log in as root and execute the commands in the example in the order shown. This example uninstalls R-3.6.1. To uninstall a different version of R, replace the R version in the example with the number of the version you want to uninstall.
Example 3-2 Linux Commands for Uninstalling Oracle R Distribution
Execute the rpm -e rpmname
command, where rpmname is the name of the RPM you want to remove.
For example, to remove R-3.6.1 on Oracle Linux 7:
rpm -e R-3.6.1-1.el7
rpm -e R-devel
rpm -e R-core
rpm -e R-core-extra
rpm -e libRmath-devel
rpm -e libRmath
rpm -e libRmath-static
Parent topic: Uninstall Oracle R Distribution
3.7.3 Uninstalling Oracle R Distribution on Oracle Solaris
Instructions for uninstalling Oracle R Distribution on Oracle Solaris.
To uninstall Oracle R Distribution on Oracle Solaris, follow the instructions in the readme on the Oracle R Distribution downloads page on the Oracle Technology Network.
The Oracle R Distribution installation directory on Oracle Solaris includes an uninstall script. Log in as root and run the script as follows, where installation_path is the path to the directory in which Oracle R Distribution is installed:
Example 3-3 Solaris Script for Uninstalling Oracle R Distribution
./uninstall.sh installation_path
Note:
If you do not specify the installation path, then the following default path is used:-
For Solaris SPARC:
/usr/lib/sparcv9
-
For Solaris Intel:
/usr/lib/amd64
Parent topic: Uninstall Oracle R Distribution
3.7.4 Uninstall Oracle R Distribution on IBM AIX
Instructions for uninstalling Oracle R Distribution on Oracle R Distribution on IBM AIX.
To uninstall Oracle R Distribution on IBM AIX, follow the instructions in the readme on the Oracle R Distribution downloads page on the Oracle Technology Network.
Example 3-4 AIX Scripts for Uninstalling Oracle R Distribution
Run uninstall.sh
as root to uninstall the filesets in Oracle R Distribution:
In the following command, installation_path is the location in which Oracle R Distribution is installed and rte_package_name is the Oracle R Distribution fileset to uninstall.
$ sudo ./uninstall.sh rte_package_name installation_path
The path /opt/R
is used if you do not specify an installation path.
The options for rte_package_name are:
Option | Description |
---|---|
|
Uninstall all of the filesets in Oracle R Distribution. |
|
Uninstalls only the |
|
Uninstall only the |
The following command uninstalls all of the filesets using the specified path:
$ sudo ./uninstall.sh ORD /opt/R/3_3
The following commands uninstall the ORD.core
and ORE.devel
filesets:
$ sudo ./install.sh ORD.core
$ sudo ./install.sh ORD.devel
Parent topic: Uninstall Oracle R Distribution