microsoft / microsoft-r-open

Microsoft R Open Source
212 stars 69 forks source link

MRO 3.6.0 release date #101

Open waynelapierre opened 5 years ago

waynelapierre commented 5 years ago

Just wondering when will MRO 3.6.0 be released?

vikram-rawat commented 5 years ago

Any updates on this repository hasn't been updated in 5 months

aakhmetz commented 5 years ago

Microsoft R Open 3.6.0, based on the recently-released R 3.6.0, is currently under development, and we'll make an announcement here when it's available too. Microsoft R Open 3.5.3, based on R 3.5.3, will be available next week, on May 10, 2019.

from here https://blog.revolutionanalytics.com/2019/05/availability-of-microsoft-r-open-352-and-353.html

AlexPars commented 5 years ago

Any update on release date for Microsoft R Open 3.6.0 and Microsoft R Open 3.6.1?

suvofalcon commented 4 years ago

Any updates on MRO 3.6 or 3.6.1 ? Is Revolution committed to releasing MRO .. Or it would suddenly be stopped in the same manner MRO was stopped for MacOS

Data-Jack commented 4 years ago

It would be great to know an expected release date or if it is being discontinued.

cerdman commented 4 years ago

An update on release schedule would be appreciated.

skanskan commented 4 years ago

Any news?

petesherick commented 4 years ago

I guess this issue should be closed and a new one opened for 3.6.1 and 3.6.2. Has Microsoft given up on R?

skanskan commented 4 years ago

Any alternative if we want to use a distribution of R 3.6.2 with MKL already integrated?

alexvorobiev commented 4 years ago

Intel has made MKL free for both personal and commercial use (https://software.intel.com/en-us/mkl/choose-download). Looking at how MKL is added to MRO (by copying over a few shared libraries) it should be possible to take any standard binary distribution of R and just replace those shared libraries.

skanskan commented 4 years ago

Don't you need to compile R again? That produces all kind of errors on most users. Anyway, you don't only need to link R to the MKL shared libraries, you also need to use packages designed to use that libraries. R Open has its own repository.

tomwenseleers commented 4 years ago

Here is a short recipe to get Intel MKL up and running with R 3.6.2, just by copying across some of the Intel MKL BLAS files from Microsoft R Open to R 3.6.2, this is easier than having to recompile the whole of R against the Intel MKL libs :

  1. Install the latest version of R from https://cran.r-project.org/bin/windows/base/, i.e. currently R 3.6.2
  2. Install Microsoft R Open from https://mran.microsoft.com/download, which comes with the outdated R version 3.5.3 but also with the Intel MKL multithreaded BLAS libraries
  3. copy files libiomp5md.dll, Rblas.dll and Rlapack.dll from C:\Program Files\Microsoft\R Open\R-3.5.3\bin\x64 to C:\Program Files\R\R-3.6.2\bin\x64 (you can back up your existing default non-hyperthreaded Rblas.dll and Rlapack.dll files first if you like)
  4. copy Microsoft R Open libraries/packages MicrosoftR, RevoIOQ, RevoMods, RevoUtils and RevoUtilsMath from C:\Program Files\Microsoft\R Open\R-3.5.5\library to your default package directory, e.g. C:\Documents\R\win-library\3.6
  5. copy files Rprofile.site and Renviron.site from directory C:\Program Files\Microsoft\R Open\R-3.5.5\etc to C:\Progral Files\R\R-3.6.2\etc
  6. replace line 24 in file Rprofile.site options(repos=r) with options(repos="https://cran.rstudio.com") (or your favourite CRAN repository) to make sure that it will install the latest CRAN packages as opposed to the outdated mran.microsoft.com mirror that has outdated package versions, frozen at the 15th of April 2019. Also comment out lines 153, 154 and 155 with a #

Then restart RStudio to check that it works, with small SVD benchmark on my Intel Core i7-4700HQ 2.4GHz 4 core/8 thread laptop:

getMKLthreads()
4

# Singular Value Decomposition
m <- 10000
n <- 2000
A <- matrix (runif (m*n),m,n)
system.time (S <- svd (A,nu=0,nv=0))
   user  system elapsed 
  15.20    0.64    4.17

That same benchmark without Intel MKL installed ran at

   user  system elapsed 
  35.11    0.10   35.21 

so we get a >8 fold speed increase here!

Not sure what's up with Microsoft, and why they are no longer updatig MRO... And why they also dropped Mac OS X support...

I hope that, given that Intel MKL is free now, the R core people will sooner or later provide a precompiled R version that is compiled to use the Intel MKL libs, or possibly detect at run time if Intel MKL is installed, and if it is, use it. I think this is important, especially since the easy availability of a good multithreaded BLAS also determines how one would develop packages - e.g. if a good multithreaded BLAS would be available for all OSes one would veer towards using RcppArmadillo, which falls back on whatever BLAS one has installed (but on Windows would give drastically worse timings if Intel MKL is not installed), and if not RcppEigen would be the best option, as that has its own multithreaded matrix algebra, irrespective of the BLAS against which R is compiled...

PS Slight problem is that running setMKLthreads(4) will crash RStudio (that was already a problem in the official MRO 3.5.3 though) but it does work OK in the R console...

alexvorobiev commented 4 years ago

While it is not surprising that copying MKL libraries from MRO to a standard R distribution works as expected, the MRO license (https://mran.microsoft.com/assets/text/mkl-eula.txt) explicitly prohibits that:

The R Services MKL is licensed for exclusive use with the Licensed Products

That's why in my comment above I suggested downloading MKL from Intel. That version does not have any restrictions. An additional benefit is you are getting the latest MKL. The procedure is described here. You can also compile R yourself and specify MKL at that stage according to this article.

I personally plan to use Nix for compiling R with MKL. We use Nix for the rest of our analytics tools (many Python packages custom-built with support for MKL, GPUs, etc.) so extending it to R would be natural next step.

skanskan commented 4 years ago

6. options(repos="https://cran.rstudio.com")

Do you mean https://cran.rstudio.com or an specialized repository such as "mran" with the packages already compiled to use MKL?

tomwenseleers commented 4 years ago

@alexvorobiev Thanks for this - these instructions are for Ubuntu systems though, right, where it is of course much easier to compile R against some custom high performance BLAS like Intel MKL or OpenBlas... On Windows I haven't tried yet, but I bet it will be a pain unfortunately...

If you prefer to use the Intel MKL files downloaded from the Intel site directly, then according to Method 2 posted here: https://stackoverflow.com/questions/38090206/linking-intels-math-kernel-library-mkl-to-r-on-windows/42854705#42854705

this also works: Copy all the contents from inside these folders

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\redist\intel64\mkl C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\redist\intel64\compiler

to

C:\Program Files\R\R-3.6.2\bin\x64

Inside the destination folder, create 2 copies of mkl_rt.dll and rename one of them Rblas.dll and the other Rlapack.dll replacing the originals and also keeping mkl_rt.dll.

Only thing is that you will also need functions to set the nr of MKL threads to use etc, and that that function (setMKLthreads) is in the RevoUtilsMath package, which also is only distributed as part of MRO... So you'll still have to copy across that package, which may technically again breach the MRO license, unless you are happy with the default which is to use a nr of threads equal to the nr of physical cores...

I wonder, given that Intel MKL is free now, if the R core people could not compile by default to use the Intel MKL libs, or even have some environment variable that detects at run time if Intel MKL is installed, and if it, to use it? I think this is important, especially since the easy availability of a good multithreaded BLAS also determines how one would develop packages - e.g. if a good multithreaded BLAS would be available for all OSes one would veer towards using RcppArmadillo, which falls back on whatever BLAS one has installed (but on Windows would give drastically worse timings if Intel MKL is not installed), and if not RcppEigen would be the best option, as that has its own multithreaded matrix algebra, irrespective of the BLAS against which R is compiled...

tomwenseleers commented 4 years ago

@skanskan Most R packages I believe would use Intel MKL if you have it installed, especially if you install from source (and even, I believe, if you just install the precompiled binaries, as they all just call the BLAS or LAPACK routines, but they will have been replaced by the correct Intel MKL versions). I thought it was not a good idea to use the mran repository, as that uses the packages from April 2019, not the latest. Though Microsoft mentions you can use repos = c(CRAN = "https://cran.revolutionanalytics.com"), which would use the latest version of all repositories... Haven't tried what works best yet. I had the impression there were no problems just using the standard R repository, especially not if one asks to compile from source... But let me know what you think is the best course of action! I couldn't immediately see any differences in timing e.g. for matrix cross products, no matter what repository I used...

alexvorobiev commented 4 years ago

@tomwenseleers

given that Intel MKL is free now

I would think it would have to be licensed under some form of GPL or MIT license to be even considered for inclusion in R proper. As it stands MKL's license is https://software.intel.com/en-us/license/intel-simplified-software-license which, while super-permissive, still insists on (c) Intel and doesn't allow modifications.

tomwenseleers commented 4 years ago

@alexvorobiev But would it still not be possible e.g. to modify R so that it would make use of the Intel MKL if it is installed on one's system? And is it a problem that the Intel MKL part would still be copyright by Intel, and that no modification is allowed? I don't think R core modified the basic Lapack libraries either, right? And even LAPACK also has a more restrictive license, https://www.netlib.org/lapack/LICENSE.txt Also wonder then how Microsoft got around this license issue in MRO?

alexvorobiev commented 4 years ago

@tomwenseleers I agree, since building R with MKL is not that straightforward (and seems to be somewhat dependent on the version of MKL), having support for MKL in R proper out of the box would be very helpful. So far the most common approach is, like with MRO, just copy the libraries. For instance, https://github.com/eddelbuettel/mkl4deb.

suvofalcon commented 4 years ago

With Microsoft’s increased focus on Python , I am getting a strong feeling MRO will be dumped sooner or later ....

It’s better to plan shift towards CRAN ...

Regards

On Thu, 2 Jan 2020 at 11:28 PM, Alex Vorobiev notifications@github.com wrote:

@tomwenseleers https://github.com/tomwenseleers I agree, since building R with MKL is not that straightforward (and seems to be somewhat dependent on the version of MKL), having support for MKL in R proper out of the box would be very helpful. So far the most common approach is, like with MRO, just copy the libraries. For instance, https://github.com/eddelbuettel/mkl4deb.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/microsoft-r-open/issues/101?email_source=notifications&email_token=ADJFKB53IV7OTRSWU4P4BZLQ3YTKZA5CNFSM4HWIDIR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH66NTQ#issuecomment-570287822, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJFKBZBKHSYJU4FIHBHJH3Q3YTKZANCNFSM4HWIDIRQ .

-- Regards, Subhankar Bhattacharya ————————————

Sent from my  iPhone

DeanVogt commented 4 years ago

I've been using MRO for 12+ months, but sadly have to uninstall it in order to install at least one R package I need that appears to require 3.6. Too bad.

CapnBody commented 4 years ago

Any word on scheduled update?

jamesdalg commented 4 years ago

Agreed. Not even RDS files are compatible between the versions anymore (3.6 changed RDS files) and R-4.0 is out. It would help a great deal if a new version was published.

kummerer94 commented 4 years ago

Microsoft is working to bring out R 4.0.1 as the new MRO release. This has been confirmed on the Revolutions Blog (look into the comments): https://blog.revolutionanalytics.com/2020/06/r-402-now-available.html

Just give it some additional time. It is currently in testing.

matthewrspiegel commented 4 years ago

As of July 31st the new version of MRO was still not in testing. “About to enter testing” according to David Smith in the comments of a post on the revolution analytics site. Check the comments

However, he did say he should have some news to share “soon”. So hopefully “soon” is really soon and not another couple of months.

dancingfrog commented 2 years ago

Yes @suvofalcon , MRO has been dumped in favor of vanilla R...

Version 4.0.2 will be the last release of the MRO runtime, and the operationalization of machine learning models using MRO in the app pool of SQL Server Big Data Clusters will be retired.

https://docs.microsoft.com/en-us/lifecycle/announcements/microsoft-machine-learning-server-retiring https://cloudblogs.microsoft.com/sqlserver/2021/06/30/looking-to-the-future-for-r-in-azure-sql-and-sql-server/

... bummer