You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
I would like to give it try to arrayfire-r, but I have some errors
I would appreciate very much some help with this.
My overall computing skills are pretty basic but I'm willing ;)
This is what I achieved.
Installed Ubuntu 14.04 with AMD Catalyst 15.302 in a Dell7910 with 2 Xeon E5-2609 v3, 32Gb RAM, Fury tri-X R9 GPU
No CUDA, no NVIDIA drives
Tested GPUrat and the benchmarks ran ok
Installed Arrayfire dependencies, compilers etc, but I have some problem with GLFW 3.2 GLX, apparently it compiled from source ok.
Installed Arrayfire 3.3.2
Installed Anaconda and other dependencies
Compiled & ran arrayfire benchmark ok
The CPU benchmarks' run is very slow, only uses one core!
Compiled & run arrayfire examples, but it runtime complained.
For example
./blas_opencl
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
ArrayFire v3.3.2 (OpenCL, 64-bit Linux, build f65dd97)
[0] AMD : Fiji, 3655 MB
-1- AMD : Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz, 32099 MB
Benchmark N-by-N matrix multiply
128 x 128: 257 Gflops
256 x 256: 779 Gflops
384 x 384: 1199 Gflops
512 x 512: 1605 Gflops
640 x 640: 2624 Gflops
768 x 768: 2822 Gflops
896 x 896: 3555 Gflops
1024 x 1024: 3204 Gflops
1152 x 1152: 3708 Gflops
1280 x 1280: 3968 Gflops
1408 x 1408: 3961 Gflops
1536 x 1536: 3947 Gflops
1664 x 1664: 4365 Gflops
1792 x 1792: 4434 Gflops
1920 x 1920: 4087 Gflops
2048 x 2048: 4352 Gflops
peak 4434.43 GFLOPS
Installed Revolutions R with MKL
Installed arrayfire-r without errors
( library("arrayfire", lib.loc="~/R/x86_64-pc-linux-gnu-library/3.2")) seems ok
running the arrayfire-r example it complains and the print result is similar to the piR(num) CPU function:
res = piAF(num)
GLX: Forward compatibility requested but GLX_ARB_create_context_profile is unavailableError: Could not Create GLFW Window!
Error in afRunif(num) : In function random
In file src/backend/opencl/kernel/random.hpp:142
OpenCL Error (-11): Build Program Failure when calling clBuildProgram
print(res)
[1] 3.141268
No Joy yet.. I tried 3.0 and could not install properly. I tried different things starting from clean install and probably glfw is a source of headache, arrayfire binaries or compile is another flavour of problems. Here is what works with arrayfire-r
Here is the R output with a clean Ubuntu 14.04 install, but my R snippet didn't work. However the errors are different. The arrayfire examples were OK, except for the graphics. This time I didn't install OpenCL GL headers, mesa or other stuff that could interfere with the AMD SDK.
So my question is ¿how to set up a working OpenCL environment for arrayfire-r? I'm not interested (yet) in the arrayfire graphic capabilities. Previously, I tried to disable GLFW when compiling Arrayfire, but I got errors complaining about glfw.
Cheers,
Aurelio
afInfo()
GLX: Forward compatibility requested but GLX_ARB_create_context_profile is unavailableError: Could not Create GLFW Window!
ArrayFire v3.3.2 (OpenCL, 64-bit Linux, build f65dd97)
[0] AMD : Fiji, 3749 MB
-1- AMD : Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz, 32099 MB
a <- c(1:100)
b <- array(a)
c <- afArray(b)
f <- afArray(b, type='single')
aa <- f_f + c_c
afPrint(aa)
No Name Array
[100 1 1 1]
Error in afPrint(aa) : In function print
In file src/api/c/print.cpp:89
This is the log of installed dependencies.
This list is following the Catalyst and Arrayfire install dependencies. Something different are the lines sudo apt-get install libglfw3
sudo apt-get install libglfw-dev
Arrayfire suggest: sudo apt-get install glfw3, but it always fails:
Yes it was the end of the R printout in RStudio! In the the bash terminal worked ok.
How can I make it work in RStudio??
export AF_PRINT_ERRORS=1
R CMD BATCH a.r
The a.r.Rout:
R version 3.2.4 (2016-03-16) -- "Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Microsoft R Open 3.2.4
Default CRAN mirror snapshot taken on 2016-04-01
The enhanced R distribution from Microsoft
Visit http://go.microsoft.com/fwlink/?LinkID=722555 for information
about additional features.
Multithreaded BLAS/LAPACK libraries detected. Using 12 cores for math algorithms.
Activity
AurelioG commentedon May 6, 2016
Hi there,
I would like to give it try to arrayfire-r, but I have some errors
I would appreciate very much some help with this.
My overall computing skills are pretty basic but I'm willing ;)
This is what I achieved.
Installed Ubuntu 14.04 with AMD Catalyst 15.302 in a Dell7910 with 2 Xeon E5-2609 v3, 32Gb RAM, Fury tri-X R9 GPU
No CUDA, no NVIDIA drives
Tested GPUrat and the benchmarks ran ok
Installed Arrayfire dependencies, compilers etc, but I have some problem with GLFW 3.2 GLX, apparently it compiled from source ok.
Installed Arrayfire 3.3.2
Installed Anaconda and other dependencies
Compiled & ran arrayfire benchmark ok
The CPU benchmarks' run is very slow, only uses one core!
Compiled & run arrayfire examples, but it runtime complained.
For example
./blas_opencl
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
ArrayFire v3.3.2 (OpenCL, 64-bit Linux, build f65dd97)
[0] AMD : Fiji, 3655 MB
-1- AMD : Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz, 32099 MB
Benchmark N-by-N matrix multiply
128 x 128: 257 Gflops
256 x 256: 779 Gflops
384 x 384: 1199 Gflops
512 x 512: 1605 Gflops
640 x 640: 2624 Gflops
768 x 768: 2822 Gflops
896 x 896: 3555 Gflops
1024 x 1024: 3204 Gflops
1152 x 1152: 3708 Gflops
1280 x 1280: 3968 Gflops
1408 x 1408: 3961 Gflops
1536 x 1536: 3947 Gflops
1664 x 1664: 4365 Gflops
1792 x 1792: 4434 Gflops
1920 x 1920: 4087 Gflops
2048 x 2048: 4352 Gflops
peak 4434.43 GFLOPS
Installed Revolutions R with MKL
Installed arrayfire-r without errors
( library("arrayfire", lib.loc="~/R/x86_64-pc-linux-gnu-library/3.2")) seems ok
running the arrayfire-r example it complains and the print result is similar to the piR(num) CPU function:
Cheers
Aurelio
[-]Port all functions from ArrayFire 3.0 [/-][+]Port all functions from ArrayFire 3.4[/+]pavanky commentedon May 6, 2016
@AurelioG I see that the C/C++ version is using 3.3.2 where as you are loading 3.2 for R. Can you try with 3.3 ?
I just ran the same code on an R9 Fury nano and did not get any errors.
If that doesn't work, can you post the output of
clinfoover here?AurelioG commentedon May 27, 2016
No Joy yet.. I tried 3.0 and could not install properly. I tried different things starting from clean install and probably glfw is a source of headache, arrayfire binaries or compile is another flavour of problems. Here is what works with arrayfire-r
This is my Arrayfire manifest
This is my CLinfo
pavanky commentedon May 27, 2016
@AurelioG That's weird. I tried the same code on my machine without any issues..
The error you are seeing seems to be coming from the OpenCL driver..
pavanky commentedon May 27, 2016
Apparently this can happen if you have an older version of AMDAPPSDK installed along side the newer version. Can you check if that is the case?
AurelioG commentedon May 29, 2016
Here is the R output with a clean Ubuntu 14.04 install, but my R snippet didn't work. However the errors are different. The arrayfire examples were OK, except for the graphics. This time I didn't install OpenCL GL headers, mesa or other stuff that could interfere with the AMD SDK.
So my question is ¿how to set up a working OpenCL environment for arrayfire-r? I'm not interested (yet) in the arrayfire graphic capabilities. Previously, I tried to disable GLFW when compiling Arrayfire, but I got errors complaining about glfw.
Cheers,
Aurelio
This is the log of installed dependencies.
This list is following the Catalyst and Arrayfire install dependencies. Something different are the lines
sudo apt-get install libglfw3
sudo apt-get install libglfw-dev
Arrayfire suggest: sudo apt-get install glfw3, but it always fails:
sudo apt-get uptdate
sudo apt-get update
sudo apt-get install gcc
sudo apt-get install dpkg
sudo apt-get build-dep lib32gcc1
sudo apt-get install dh-modaliases
sudo apt-get install execstack
sudo ./amd-driver-installer-15.302-x86.x86_64.run
sudo aticonfig --initial
apt-get install libfreeimage-dev libatlas3gf-base libfftw3-dev libglew-dev libglewmx-dev libglfw3-dev cmake
sudo apt-get install libfreeimage-dev libatlas3gf-base libfftw3-dev libglew-dev libglewmx-dev libglfw3-dev cmake
sudo apt-add-repository ppa:keithw/glfw3
sudo apt-get update
sudo apt-get install libglfw3
sudo apt-get install libglfw-dev
sudo apt-get install ocl-icd-libopencl1
sudo ./ArrayFire-v3.3.2_Linux_x86_64.sh --exclude-subdir --prefix=/usr/local
sudo dpkg -i MRO-3.2.4-Ubuntu-14.4.x86_64.deb
tar -xzf RevoMath-3.2.5.tar.gz
sudo ./RevoMath.sh
sudo dpkg -i rstudio-0.99.896-amd64.deb
sudo apt-get install libjpeg-dev libpng12-dev
sudo dpkg -i rstudio-0.99.896-amd64.deb
pavanky commentedon May 29, 2016
@AurelioG is that the end of the error message ? If not, can you run your script after running
export AF_PRINT_ERRORS=1?AurelioG commentedon May 30, 2016
Yes it was the end of the R printout in RStudio! In the the bash terminal worked ok.
How can I make it work in RStudio??
export AF_PRINT_ERRORS=1
R CMD BATCH a.r
The a.r.Rout:
R version 3.2.4 (2016-03-16) -- "Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Microsoft R Open 3.2.4
Default CRAN mirror snapshot taken on 2016-04-01
The enhanced R distribution from Microsoft
Visit http://go.microsoft.com/fwlink/?LinkID=722555 for information
about additional features.
Multithreaded BLAS/LAPACK libraries detected. Using 12 cores for math algorithms.
Attaching package: ‘arrayfire’
The following objects are masked from ‘package:stats’:
pavanky commentedon May 30, 2016
@AurelioG let me try out RStudio and see what's going wrong. I have only ever used command line.