libGL error: failed to load driver: swrast

[Old posts from the commercial version of ArrayFire] Issues and comments for download and installation. Getting up and running.

Moderators: melonakos, pavanky

libGL error: failed to load driver: swrast

Postby Adakite » Sun Mar 17, 2013 5:48 am

Hello Folks,

I just installed the demo version of ArrayFire on my workstation (ThinkStation C20 running Fedora 18, 64bits). My GPU is a EVGA 660 Ti and the Nvidia drivers version is 313.18 so very recent.

Once the examples compiled, I tried all of them both C and Fortran and got this error:
Code: Select all
libGL error: failed to load driver: swrast


here is what I got with "LIBGL_DEBUG=verbose":
Code: Select all
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL error: failed to load driver: swrast


If I do the same on glxinfo command, I do not have such error and none of my others GL application shows such error. I'm using matlab, IDL, Paraview and also games like 0.A.D. all of them are using OpenGL and run very smoothly on my Workstation. So I suspect that ArrayFire misses something with my GL libraries.

The building step did not show any error message so I'm kind of stuck at that point.

Any ideas/help/thoughts?

Thank you,
A.
Adakite
 
Posts: 5
Joined: Sun Mar 17, 2013 5:39 am

Re: libGL error: failed to load driver: swrast

Postby pavanky » Mon Mar 18, 2013 11:13 am

Hi,

This should usually be just a warning and not hinder arrayfire. If you are having trouble can you try installing "mesa" package on your os ?

If you are using Ubuntu or Linux Mint, this may help

http://ubuntuforums.org/showthread.php?t=1722306
Pavan Yalamanchili,
ArrayFire
--
~ If it is not broken, you have not tried hard enough ~
User avatar
pavanky
Site Admin
 
Posts: 1123
Joined: Mon Mar 15, 2010 7:39 pm
Location: Atlanta, GA

Re: libGL error: failed to load driver: swrast

Postby Adakite » Mon Mar 18, 2013 5:51 pm

the thing is that the compilation does not work and this is the only error message I have. Mesa is installed and I running Fedora 18.

Thanks anyway
Adakite
 
Posts: 5
Joined: Sun Mar 17, 2013 5:39 am

Re: libGL error: failed to load driver: swrast

Postby pavanky » Wed Mar 20, 2013 2:50 pm

Hi,

Can you do ldd on the libaf.so and print the output here ?

Also can you cd into the helloworld directory and do "make run" in there and see if that works ?
Pavan Yalamanchili,
ArrayFire
--
~ If it is not broken, you have not tried hard enough ~
User avatar
pavanky
Site Admin
 
Posts: 1123
Joined: Mon Mar 15, 2010 7:39 pm
Location: Atlanta, GA

Re: libGL error: failed to load driver: swrast

Postby Adakite » Wed Mar 20, 2013 7:14 pm

the lld outout is

Code: Select all
linux-vdso.so.1 =>  (0x00007fff099bf000)
   libcufft.so.5.0 => /usr/local/cuda/lib64/libcufft.so.5.0 (0x00002aaab0823000)
   libcublas.so.5.0 => /usr/local/cuda/lib64/libcublas.so.5.0 (0x00002aaab27d9000)
   libcuda.so.1 => /usr/lib64/nvidia/libcuda.so.1 (0x00002aaab61fb000)
   libcudart.so.5.0 => /usr/local/cuda/lib64/libcudart.so.5.0 (0x00002aaab6e05000)
   libcusparse.so.5.0 => /usr/local/cuda/lib64/libcusparse.so.5.0 (0x00002aaab7060000)
   libnpp.so.5.0 => /usr/local/cuda/lib64/libnpp.so.5.0 (0x00002aaabf036000)
   libcurand.so.5.0 => /usr/local/cuda/lib64/libcurand.so.5.0 (0x00002aaac4b21000)
   libgomp.so.1 => /lib64/libgomp.so.1 (0x00002aaac6a46000)
   libGL.so.1 => /usr/lib64/nvidia/libGL.so.1 (0x00002aaac6c55000)
   libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00002aaac6f78000)
   libm.so.6 => /lib64/libm.so.6 (0x00002aaac727c000)
   libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaac757d000)
   libc.so.6 => /lib64/libc.so.6 (0x00002aaac7793000)
   /lib64/ld-linux-x86-64.so.2 (0x0000003933600000)
   libdl.so.2 => /lib64/libdl.so.2 (0x00002aaac7b4c000)
   libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaac7d50000)
   libz.so.1 => /lib64/libz.so.1 (0x00002aaac7f6c000)
   librt.so.1 => /lib64/librt.so.1 (0x00002aaac8183000)
   libnvidia-tls.so.313.18 => /usr/lib64/nvidia/tls/libnvidia-tls.so.313.18 (0x00002aaac838b000)
   libnvidia-glcore.so.313.18 => /usr/lib64/nvidia/libnvidia-glcore.so.313.18 (0x00002aaac858f000)
   libX11.so.6 => /lib64/libX11.so.6 (0x00002aaacaa91000)
   libXext.so.6 => /lib64/libXext.so.6 (0x00002aaacadcb000)
   libxcb.so.1 => /lib64/libxcb.so.1 (0x00002aaacafde000)
   libXau.so.6 => /lib64/libXau.so.6 (0x00002aaacb1fc000)


nothing is missing.
surprinsly, now the error message is:

Code: Select all
make[1]: Entering directory `/run/arrayfire/examples/benchmarks'
COMPILER_PATH= /usr/local/cuda/bin/nvcc -m64 -I../../include -I/usr/local/cuda/include -O2 -DNDEBUG -c pi_cuda.cu
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ext/atomicity.h(48): error: identifier "__atomic_fetch_add" is undefined

/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ext/atomicity.h(52): error: identifier "__atomic_fetch_add" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_0000191a_00000000-6_pi_cuda.cpp1.ii".
make[1]: *** [pi_cuda.o] Error 2
make[1]: Leaving directory `/run/arrayfire/examples/benchmarks'
make: *** [examples/benchmarks/_all] Error 2


as for hello world, the compilation works fine.
Adakite
 
Posts: 5
Joined: Sun Mar 17, 2013 5:39 am

Re: libGL error: failed to load driver: swrast

Postby pavanky » Wed Mar 20, 2013 7:23 pm

Hi,

nvcc is not compatible with gcc 4.7. pi_cuda.cu uses nvcc and is having trouble compiling.
If you are in the benchmarks folder, can you do make blas and see if it succeeds ?
Pavan Yalamanchili,
ArrayFire
--
~ If it is not broken, you have not tried hard enough ~
User avatar
pavanky
Site Admin
 
Posts: 1123
Joined: Mon Mar 15, 2010 7:39 pm
Location: Atlanta, GA

Re: libGL error: failed to load driver: swrast

Postby Adakite » Sat Mar 23, 2013 6:50 am

I know this issue with gcc4.7 but I was able to build the Nvidia SDK's examples. So I guess I might be able to use arrayfire as well.

here is the output for blas as you requested:

Code: Select all
Benchmark N-by-N matrix multiply
libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
ArrayFire v1.9 (build bbeef42) by AccelerEyes (64-bit Linux)
License: Server (27000@server.accelereyes.com)
CUDA toolkit 5.0, driver 313.18
GPU0 GeForce GTX 660 Ti, 3072 MB, Compute 3.0 (single,double)
Display Device: GPU0 GeForce GTX 660 Ti
Memory Usage: 2882 MB free (3072 MB total)
Adakite
 
Posts: 5
Joined: Sun Mar 17, 2013 5:39 am

Re: libGL error: failed to load driver: swrast

Postby pavanky » Sat Mar 23, 2013 10:19 am

Hi,

You can run and build SDK examples as long as it is a .cpp file (no kernel involved). .cu files require nvcc which requires older gcc.

It looks like arrayfire seems to work except for examples involving graphics (examples in image_processing machine_learning and visualization).

Any reason you want to try the graphics examples in particular ?
Pavan Yalamanchili,
ArrayFire
--
~ If it is not broken, you have not tried hard enough ~
User avatar
pavanky
Site Admin
 
Posts: 1123
Joined: Mon Mar 15, 2010 7:39 pm
Location: Atlanta, GA

Re: libGL error: failed to load driver: swrast

Postby Adakite » Sat Mar 23, 2013 11:51 am

I see, that makes sense. Thanks for the hint.

As for your question, yeah actually yes, ArrayFire comes with a nice feature : the visualization. I tried in the past some of the examples provided with ArrayFire and it is really helpful for what I want/need. So basically, the only reason (so far) I wanted to use Arrayfire is the visualization features, because it provides a mush more efficient way to explore my data from simulation and image analysis output.

I still do not understand why libGL is not happy. I'm using the very last version of the NVIDIA driver and everything else that calls OpenGL is working smoothly on this station. Why here it's not working.

Weird isn't it?
Adakite
 
Posts: 5
Joined: Sun Mar 17, 2013 5:39 am

Re: libGL error: failed to load driver: swrast

Postby pavanky » Sat Mar 23, 2013 11:55 am

Hi,

We will need to setup a fedora box in house to test this. Alternative would be to see if we can help you remotely. If remotely accessing your system is possible, please contact us via support@accelereyes.com
Pavan Yalamanchili,
ArrayFire
--
~ If it is not broken, you have not tried hard enough ~
User avatar
pavanky
Site Admin
 
Posts: 1123
Joined: Mon Mar 15, 2010 7:39 pm
Location: Atlanta, GA


Return to [archive-commercial] Download & Installation

cron