Installing XGBoost GPU for R on Ubuntu AMI - r

I'm on the AWS deeplearning Ubuntu AMI trying to install the XGboost GPU version R package using the instructions here: http://xgboost.readthedocs.io/en/latest/build.html#building-with-gpu-support
I've cloned the repo, made a new build dir and then executed:
cmake .. -DUSE_CUDA=ON -DR_LIB=ON
The error:
/usr/lib/R/bin/exec/R: symbol lookup error: /usr/lib/libblas.so.3: undefined symbol: gotoblas
/usr/lib/R/bin/exec/R: symbol lookup error: /usr/lib/libblas.so.3: undefined symbol: gotoblas
/usr/lib/R/bin/exec/R: symbol lookup error: /usr/lib/libblas.so.3: undefined symbol: gotoblas
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find LibR (missing: LIBR_HOME LIBR_INCLUDE_DIRS LIBR_LIB_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindLibR.cmake:173 (find_package_handle_standard_args)
CMakeLists.txt:165 (find_package)
I believe this is due to the libblas.so.3 file living in /home/ubuntu/src/OpenBLAS instead of a more standard location. Just need a little nudge to bridge my lack of linux env variable knowledge and connect the two. Thanks!

You can try to create symbolic link from the expected location to the actual location of the shared library file or the directory which contains the expected shared library file to get around the problem.

Related

Fail to install RCall - Julia package

Following RCall's documentation, I ran Pkg.add("RCall") which looked to be working. Then, running using RCall gave:
WARNING: could not import StatsModels.Formula into RCall
ERROR: LoadError: RCall not properly installed. Please run Pkg.build("RCall")
#... few lines later
ERROR: Failed to precompile RCall [6f49c342-dc21-5d91-9882-a32aef131414] to C:\Users\jke4\.julia\compiled\v1.1\RCall\8GFyb.ji.
That's why I ran Pkg.build("RCall"):
┌ Error: Error building `RCall`:
│ ERROR: LoadError: R cannot be found. Set the "R_HOME" environment variable to re-run Pkg.build("RCall").
I believe, accordingly to RCall's documentation that I have to do a custom installation, but why can't am I able to simply install by Pkg.add("RCall") like it's suppose to be done?
RCall.jl can simply be installed with
Pkg.add("RCall")
Note:
Julia version is 1.1.0.
using Conda does work.
There is no R version installed in my Windows computer
I do understand what is my error message and how I can deal with it. My question is why do I have it whereas I wasn't suppose to, quoting RCall's documentation:
RCall.jl will automatically install R for you using Conda if it doesn't detect that you have R 3.4.0 or later installed already.
Update
Alright, I've done what #Cameron Bieganek suggests: pkg> pin StatsModels#0.5
And it seems to work for a moment. However, after doing ] up, accordingly with the issue I had in this question.
using RCall now gives:
ERROR: LoadError: RCall not properly installed. Please run Pkg.build("RCall")
and Pkg.build("RCall"):
┌ Error: Error building `RCall`:
│ ERROR: LoadError: IOError: stat: invalid argument (EINVAL)
This time I can't get what's the error.
GitHub
Please note that this question is also referenced on GitHub RCall.jl.

Error when installing MultiNest for MPI - missing Fortran libraries

I am trying to install MultiNest and PyMultiNest on Ubutnu 16.04. I have OpenMPI installed and can successfully run programs with it. However, during the installation of MultiNest, I get this:
kevin#kevin-VirtualBox:~/MultiNest/build$ cmake ..
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Detected gfortran, adding -ffree-line-length-none compiler flag.
CMake Warning at /usr/share/cmake-3.5/Modules/FindMPI.cmake:406 (message):
Unable to find MPI library mpi_mpifh
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindMPI.cmake:596 (interrogate_mpi_compiler)
src/CMakeLists.txt:86 (FIND_PACKAGE)
-- Could NOT find MPI_Fortran (missing: MPI_Fortran_LIBRARIES)
-- MPI not found, only non-MPI MultiNest libraries will be built.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kevin/MultiNest/build
Any guidance on how to fix this?
When I installed 'libopenmpi-dev', the cmake process seemed to finish properly.

R on ubuntu 16: unable to load shared object, undefined symbol: gotoblas

I am on the Amazon Deep Learning AMI image trying to use R.
$ which R returns
/usr/bin/R
$ R returns
/usr/lib/R/bin/exec/R: symbol lookup error: /usr/lib/libblas.so.3: undefined symbol: gotoblas
sudo update-alternatives --config libblas.so.3 returns 4 possible selections:
/usr/lib/openblas-base/libblas.so.3, /usr/lib/atlas-base/atlas/libblas.so.3, /usr/lib/libblas/libblas.so.3 and /usr/lib/openblas-base/libblas.so.3
By selecting option 2 I can get into the R repl. However, I receieve the following warning:
unable to load shared object '/usr/lib/R/library/stats/libs/stats.so':
/usr/lib/liblapack.so.3: undefined symbol: gotoblas
This same error causes package installations to fail.
Any help would be greatly appreciated.
Fixed! I followed this post and used sudo update-alternatives --config liblapack.so.3 to switch to the correct BLAS version.

Ubuntu 16.04: fatal error: X11/Xlib.h: No such file or directory

I am trying to install Rgtk2 (dependency for rattle). I am using R thru Anaconda. I am getting the following error.
In file included from Rgtk.c:7:0:
/usr/include/gtk-2.0/gdk/gdkx.h:32:10: fatal error: X11/Xlib.h: No such file or directory
#include <X11/Xlib.h>
^~~~~~~~~~~~
I tried the following workarounds as found in StackOverflow and other blogs.
Installed libx11-dev, mesa-common-dev, libglu1-mesa-dev, libxrandr-dev, libxi-dev
Tried installing RGtk2_2.20.31 from source.
Every time I am getting the same error.
anaconda has its own environment, which by default usually lacks X11 headers(e.g libx11-dev, or whatever you call it). Try "conda install -c conda-forge xorg-libx11" . It worked for me when a certain R-package threw an error "X11/Xlib.h : No such file or directory".

Is it possible to use ArrayFire in Juliabox?

Is it possible to use ArrayFire in Juliabox? If it is possible how can I do it?
-I downloaded the installer and I installed ArrayFire following the installation steps.
-I included the PATH of the installed folder through push! (LOAD_PATH, "Path")
-I installed the package via Pkg.add("ArrayFire")
-Finally when I tried to use Pkg.test, I got the following error:
Pkg.test("ArrayFire")
INFO: Testing ArrayFire
ERROR: LoadError: error compiling init: could not load library "libaf"
libaf.so: cannot open shared object file: No such file or directory
....

Resources