Looking at buying a couple Xeon Phi 5110P, but trying to estimate how much code I have to change or other software needed.
Currently I make good use of R
on a multi-core Windows machine (24 cores) by using the foreach
package, passing it other packages forecast
, glmnet
, etc. to do my parallel processing.
Having a Xeon Phi I understand I would want to compile R
https://software.intel.com/en-us/articles/running-r-with-support-for-intel-xeon-phi-coprocessors And I understand this could be done with a trail version of Parallel Studio XE.
Then do I then need to edit R's Makeconf file, adding the C/C++ flags and for the Phi? Compile all the needed packages before the trail on Parallel Studio expires? Or do I not need to edit the Makeconf to get the benefits of foreach
on the Phi?
Seems like some of this will be handled automatically once R is compiled, with offloading done by the Math Kernel Library (MKL), but I'm not totally sure of this.
Somewhat related question: Is the Intel Xeon Phi usable without a costly Intel Compiler?
Also revolutionanalytics.com seems to have a few related blog posts but not entirely conclusive for me: http://blog.revolutionanalytics.com/2015/05/behold-the-power-of-parallel.html
forecast
andforeach
too loop through thousands of time series and perform rolling origin forecasting for a range of methods. My uncertainty is around whether to use native mode or offloading, the individual calculations within the inner loop are not especially heavy so I don't know whether I can properly parallelize over the 200+ threads: can R run in each thread? – Matt Wellerforeach
who hasn't tried it, but relayed that another person had by setting up the MKL environment variables appropriately, letting blas and lapack do automatic offloading. Doing native mode, I would wonder about the overhead in transferring all the info to the Phi and possible memory limits if they are particularly large data sets. If you get a chance, let me know how things work out. – Zacharyforecast
package to a local library withinstall.packages
fails during compilation. I'm tempted to just go for it on an AWS box with RRO! Keep me posted how you get on. – Matt Weller